Parameters
- bookmark
- Bookmark
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
//Set the extent of a map frame to a bookmark. //Perform on the worker thread await QueuedTask.Run(() => { //Reference MapFrame MapFrame mf_bk = layout.FindElement("Map Frame") as MapFrame; //Reference a bookmark that belongs to a map associated with the map frame Map m = mf_bk.Map; Bookmark bk = m.GetBookmarks().FirstOrDefault(item => item.Name.Equals("Lakes")); //Set the map frame extent using the bookmark mf_bk.SetCamera(bk); });
Target Platforms: Windows 10, Windows 8.1