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

ScaleBar Property
Gets or sets the ArcGIS.Core.CIM.CIMScaleBar of the scale bar style item.
Syntax
public CIMScaleBar ScaleBar {get; set;}
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

ArcGIS Pro version: 3 or higher.
See Also