This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapFrame Interface > IMapFrame.CreateSurroundFrame Method (ArcObjects .NET 10.5 SDK) |
Returns the map surround frame element of the type given in clsid. An optional style object may be specified.
[Visual Basic .NET] Public Function CreateSurroundFrame ( _ ByVal CLSID As UID, _ ByVal optionalStyle As IMapSurround _ ) As IMapSurroundFrame
[C#] public IMapSurroundFrame CreateSurroundFrame ( UID CLSID, IMapSurround optionalStyle );
[C++]
HRESULT CreateSurroundFrame(
IUID* CLSID,
IMapSurround* optionalStyle,
IMapSurroundFrame** MapSurroundFrame
);
[C++]
Parameters CLSID [in]
CLSID is a parameter of type IUID optionalStyle [in]
optionalStyle is a parameter of type IMapSurround MapSurroundFrame [out, retval]
MapSurroundFrame is a parameter of type IMapSurroundFrame
CreateSurroundFrame is used to create a new map surround element (north arrow, scale bar, etc.) based on the current map frame. For instance, if I create a new scale bar with CreateSurroundFrame, the scale bar will be related to the map frame and updates to the map within the frame will be reflected in the scale bar.
Use this method when you want to create a new map surround object related to the current map frame.
THE CLSID paramter refers to the Class ID of the object that will be created and housed in the frame. Common Class IDs used in this paramter are:
{6589F147-F7F7-11d2-B872-00600802E603} AlternatingScaleBar
{6589F148-F7F7-11d2-B872-00600802E603} DoubleAlternatingScaleBar
{6589F143-F7F7-11d2-B872-00600802E603} HollowScaleBar
{7A3F91E4-B9E3-11d1-8756-0000F8751720} Legend
{7A3F91E3-B9E3-11d1-8756-0000F8751720} MapInset
{7A3F91DF-B9E3-11d1-8756-0000F8751720} MapTitle
{7A3F91DD-B9E3-11d1-8756-0000F8751720} MarkerNorthArrow
{7A3F91DE-B9E3-11d1-8756-0000F8751720} Overview
{6589F140-F7F7-11d2-B872-00600802E603} ScaleLine
{7A3F91DC-B9E3-11d1-8756-0000F8751720} ScaleText
{6589F146-F7F7-11d2-B872-00600802E603} SingleDivisionScaleBar
{6589F141-F7F7-11d2-B872-00600802E603} SteppedScaleLine