Parameters
- linkChart
- The link chart to clear content.
| Exception | Description |
|---|---|
| System.ArgumentException | Map is not a link chart or does not contain a Knowledge Graph layer. |
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
{
await QueuedTask.Run(() =>
{
//Get the link chart to be cleared of content
var mapPanes = FrameworkApplication.Panes.OfType<IMapPane>().ToList();
var mapPane = mapPanes.First(
mp => mp.MapView.IsLinkChartView &&
mp.MapView.Map.Name == "Acme Link Chart");
var linkChartMap = mapPane.MapView.Map;
//Clear all content from the link chart
if (linkChartMap.CanClearLinkChartContent())
linkChartMap.ClearLinkChartContent();
});
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)