ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ScaleBarStyleItem Class / ScaleBar Property
Example

In This Topic
    ScaleBar Property
    In This Topic
    Gets or sets the ArcGIS.Core.CIM.CIMScaleBar of the scale bar style item.
    Syntax
    public CIMScaleBar ScaleBar {get; set;}
    Public Property ScaleBar As CIMScaleBar
    Exceptions
    ExceptionDescription
    This property must be called within the lambda passed to QueuedTask.Run
    Example
    Get scale bar from ScaleBarStyleItem
    ScaleBarStyleItem scaleBarItem = null;
    CIMScaleBar scaleBar = await QueuedTask.Run<CIMScaleBar>(() =>
    {
      return scaleBarItem.ScaleBar;
    });
    Get scale bar from ScaleBarStyleItem
    ScaleBarStyleItem scaleBarItem = null;
    CIMScaleBar scaleBar = await QueuedTask.Run<CIMScaleBar>(() =>
    {
      return scaleBarItem.ScaleBar;
    });
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also