![](dotnetdiagramimages/image1097.png)
public abstract class Element : ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase, ArcGIS.Desktop.Mapping.IElement, System.ComponentModel.INotifyPropertyChanged, System.IComparable, System.IDisposable, System.IEquatable<Element>
Public MustInherit Class Element Inherits ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase Implements ArcGIS.Desktop.Mapping.IElement, System.ComponentModel.INotifyPropertyChanged, System.IComparable, System.IDisposable, System.IEquatable(Of Element)
//Create a group with a single element at the root level of the contents pane. //Find an existing element Element titleElm = layout.FindElement("Title") as Element; //Construct on the worker thread await QueuedTask.Run(() => { //At 2.x - GroupElement groupWithSingleElementAtRoot = LayoutElementFactory.Instance.CreateGroupElement(layout, titleElm); // groupWithSingleElementAtRoot.SetName("Group with single element at root"); GroupElement groupWithSingleElementAtRoot = ElementFactory.Instance.CreateGroupElement(layout, new List<Element>() { titleElm }, "Group with single element at root"); });
//Create a group with a list of elements at the root level of the contents pane. //Find an existing elements Element scaleBar = layout.FindElement("Scale Bar") as Element; Element northArrow = layout.FindElement("North Arrow") as Element; Element legend = layout.FindElement("Legend") as Element; //Build a list and add the elements List<Element> elmList = new List<Element> { scaleBar, northArrow, legend }; //Construct on the worker thread await QueuedTask.Run(() => { //At 2.x - GroupElement groupWithListOfElementsAtRoot = LayoutElementFactory.Instance.CreateGroupElement(layout, elmList); // groupWithListOfElementsAtRoot.SetName("Group with list of elements at root"); GroupElement groupWithListOfElementsAtRoot = ElementFactory.Instance.CreateGroupElement(layout, elmList, "Group with list of elements at root"); });
System.Object
ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
ArcGIS.Desktop.Layouts.Element
ArcGIS.Desktop.Layouts.AttachmentFrame
ArcGIS.Desktop.Layouts.GraphicElement
ArcGIS.Desktop.Layouts.GroupElement
ArcGIS.Desktop.Layouts.MapFrame
ArcGIS.Desktop.Layouts.MapSurround
Target Platforms: Windows 11, Windows 10, Windows 8.1