ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Core.UnitFormats Namespace / DisplayUnitFormat Class / DisplayName Property
Example

In This Topic
    DisplayName Property (DisplayUnitFormat)
    In This Topic
    Gets and sets the display name of the unit format
    Syntax
    public string DisplayName {get; set;}
    Public Property DisplayName As String
    Remarks
    This name is typically localized
    Example
    Get the Current Map Location Unit
    //var map = MapView.Active.Map;
    //Must be on the QueuedTask.Run()
    
    //Get the current location unit
    var loc_unit = map.GetLocationUnitFormat();
    var line = $"{loc_unit.DisplayName}, {loc_unit.UnitCode}";
    System.Diagnostics.Debug.WriteLine(line);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also