public void SetPage( CIMPage page, bool resizeElements )
Public Overloads Sub SetPage( _ ByVal page As CIMPage, _ ByVal resizeElements As Boolean _ )
Parameters
- page
- CIMPage
- resizeElements
- Scale the elements to fit the new page size
public void SetPage( CIMPage page, bool resizeElements )
Public Overloads Sub SetPage( _ ByVal page As CIMPage, _ ByVal resizeElements As Boolean _ )
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method must be called within the lambda passed to QueuedTask.Run. |
//Change the layout page size. //Reference the layout project item LayoutProjectItem lytItem = Project.Current.GetItems<LayoutProjectItem>() .FirstOrDefault(item => item.Name.Equals("MyLayout")); if (layoutItem != null) { await QueuedTask.Run(() => { //Get the layout Layout lyt = lytItem.GetLayout(); if (lyt != null) { //Change properties CIMPage page = lyt.GetPage(); page.Width = 8.5; page.Height = 11; //Apply the changes to the layout lyt.SetPage(page); } }); }
Target Platforms: Windows 11, Windows 10