public PresentationPage GetPage( int pageIndex )
Public Function GetPage( _ ByVal pageIndex As Integer _ ) As PresentationPage
Parameters
- pageIndex
- The index of the page
public PresentationPage GetPage( int pageIndex )
Public Function GetPage( _ ByVal pageIndex As Integer _ ) As PresentationPage
//Must be on the QueuedTask await QueuedTask.Run(() => { //Reference a map page var mpage = activePresentationView.Presentation.GetPage(4) as MapPresentationPage; //Set the map frame extent based on the new camera's X,Y, Scale and heading values Camera cam = new Camera(329997.6648, 6248553.1457, 2403605.8968, 24); mpage.SetCamera(cam); });
//Must be on the QueuedTask await QueuedTask.Run(() => { //Reference map page var mpage = activePresentationView.Presentation.GetPage(4) as MapPresentationPage; //Reference map and layer MapProjectItem mp = Project.Current.FindItem("Page name") as MapProjectItem; Map map = mp.GetMap(); FeatureLayer lyr = map.FindLayers("GreatLakes").First() as FeatureLayer; //Set the map frame extent to all features in the layer mpage.SetCamera(lyr); });
// create customized margin and color CIMMargin pMargin = new CIMMargin() { Left = 0.2, Right = 0.3, Top = 0.15, Bottom = 0.25 }; CIMRGBColor pColor = new CIMRGBColor() { R = 255, G = 255, B = 0, Alpha = 50 }; //Reference a page and its transition var page = activePresentationView.Presentation.GetPage(0); CIMPresentationTransition transition = page.Transition; // update the transition style transition.TransitionType = PresentationTransitionType.Swipe; transition.Duration = 2.0; transition.SwipeDirection = SwipeDirection.Top; //Must be on the QueuedTask await QueuedTask.Run(() => { //Set the new margin, new background color and new transition effect page.SetMargin(pMargin); page.SetBackgroundColor(pColor); page.SetTransition(transition); });
Target Platforms: Windows 11, Windows 10