Parameters
- mapFrame
- MapFrame
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
await QueuedTask.Run(() => { LayoutProjectItem layoutItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(item => item.Name.Equals("Layout Name")); Layout lyt = layoutItem.GetLayout(); MapFrame mf = lyt.FindElement("Map1 Map Frame") as MapFrame; MapSurround ms = lyt.FindElement("Scale Bar") as MapSurround; ms.SetMapFrame(mf); });
Target Platforms: Windows 10, Windows 8.1, Windows 7