I want a user to be able to click a button which will open the style properties for an element in a layout.
With a layout open, I can programmatically select the element from the layout (in this case, a text symbol), which will automatically open the ArcPro "Format Text" dockpane. This dockpane has multiple tabs and panels, however, and I'd like to have it automatically open to the "Text Symbol" tab's "Properties" subpanel. Is it possible to do that? Currently, it opens to the Text tab, and it takes several clicks to navigate to the actual font styling properties of interest.
I'd also be interested to know if there are other options for editing a layout symbol element's properties. Ideally, I'd like to open my own dialog/dockpane which has the contents of that particular subpanel from ArcPro's properties dockpane, but it doesn't look like that is accessible.
Solved! Go to Solution.
Hi
1. Currently there is no way to display the Layout Properties at the correct Tab using the API.
2. You can edit Layout Element properties using their "CIM" definition. For example, in the code snippet below, a Line Graphic element is created and its properties are set using the CIM.
GraphicElement lineElm = LayoutElementFactory.Instance.CreateLineGraphicElement(layout, polylineTic, lineSym);
CIMElement cimElement = lineElm.GetDefinition(); //Get the element's CIM Definition.
cimElement.Name = "Set Line Name"; //Set's its name
cimElement.Anchor = Anchor.BottomLeftCorner;
//You can set many other properties here.
lineElm.SetDefinition(cimElement); //Reset the definition back.
Thanks
Uma
Hi
1. Currently there is no way to display the Layout Properties at the correct Tab using the API.
2. You can edit Layout Element properties using their "CIM" definition. For example, in the code snippet below, a Line Graphic element is created and its properties are set using the CIM.
GraphicElement lineElm = LayoutElementFactory.Instance.CreateLineGraphicElement(layout, polylineTic, lineSym);
CIMElement cimElement = lineElm.GetDefinition(); //Get the element's CIM Definition.
cimElement.Name = "Set Line Name"; //Set's its name
cimElement.Anchor = Anchor.BottomLeftCorner;
//You can set many other properties here.
lineElm.SetDefinition(cimElement); //Reset the definition back.
Thanks
Uma
Thanks for the quick reply, Uma. Yes, we are manipulating CIMSymbols in code as you demonstrate above, and were mainly hoping to tie in a user-friendly UI component so that users could make their own customizations to particular properties of particular elements we are using.
It would be extremely convenient if Esri could expose both the controls (like the ArcGIS.Desktop.Internal.Mapping.Symbology.DoubleEditBox) as well as control groups (like the font and symbol styling control groups from the Format Element pane) in the .NET SDK so that we can use them in our own custom dockpanes to allow users to select the exact element properties we are interested in.
Thanks again for confirming that such an option does not currently exist.
Thanks for the feedback. I will let you know when these controls are on the pipeline for future releases.