Creating different kinds of custom elements


In this topic


Creating point, line, and fill graphic elements

Generally, one-dimensional and two-dimensional elements do not need to account for AutoTransformation in their ITransform2D methods, as it is the shape (geometry) of the element that is transformed.
Implementing the appropriate symbol interface (IMarkerElement, ILineElement, or IFillShapeElement) improves integration with ArcGIS and automatically displays the appropriate Symbol property page to allow users to change the appearance of the element.

Creating a FrameElement

If you need to add a neatline around an element, you can implement IFrameElement. The frame of a frame element generally surrounds another object (IFrameElement.Object), such as a map or legend, which knows how to draw itself.
FrameElements should also implement IFrameDraw and IFrameProperties. The IFrameDraw interface contains methods that are called to draw the parts of the element separately. First, the background (IFrameElement.DrawBackground) is drawn. Next, if IFrameElement.DraftMode is true, DrawDraftMode is called. In this method, you should add simple text to the name of the element. If DraftMode is false, IElement.Draw is called, at which point you should draw the contained object over its background. Last, DrawForeground is called, at which point you should draw the frame.
By implementing IFrameProperties, the frame property page applies to your element. If you create a property page that can be successfully applied to all frame elements, you should register the page to the ESRI Frame Element Property Pages component category instead of ESRI Element Property Pages category. For example, existing frame element property pages provide a user interface for setting the background and border of IFrameElement. Otherwise, register the page to the ESRI Element Property Pages category.


See Also:

Creating custom elements




Development licensingDeployment licensing
ArcGIS for Desktop BasicArcGIS for Desktop Basic
ArcGIS for Desktop StandardArcGIS for Desktop Standard
ArcGIS for Desktop AdvancedArcGIS for Desktop Advanced
Engine Developer KitEngine