ArcGIS Explorer Component Help |
Graphic..::.LabelVisibility Property |
Graphic Class Example See Also |
Gets or sets the label visibility for a Graphic.
Namespace:
ESRI.ArcGISExplorer.MappingAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public LabelVisibility LabelVisibility { get; set; } |
Visual Basic (Declaration) |
---|
Public Property LabelVisibility As LabelVisibility |
Field Value
One of the LabelVisibility values which determines whether labels should be displayed permantently or when the mouse moves over the Graphic or not at all.Remarks
Version Information: This property is supported from version 2.0.0.1500.
Examples
The code demonstrates how to use the LabelVisibility property set the labels of all point notes in the map to Visible.
CopyC#
ESRI.ArcGISExplorer.Mapping.MapDisplay disp = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay; //Iterate over all Notes in the map foreach (Note mapNote in disp.Map.GetMapItems<Note>()) { //Check for Point Notes if (mapNote.Graphic.ShapeType == ShapeType.Point) { //Set the LabelVisibility to Visible so the labels are permanently displayed mapNote.Graphic.LabelVisibility = LabelVisibility.Visible; } }
CopyVB.NET
Dim disp As ESRI.ArcGISExplorer.Mapping.MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay 'Iterate over all Notes in the map For Each mapNote As Note In disp.Map.GetMapItems(Of Note)() 'Check for Point Notes If mapNote.Graphic.ShapeType = ShapeType.Point Then 'Set the LabelVisibility to Visible so the labels are permanently displayed mapNote.Graphic.LabelVisibility = LabelVisibility.Visible End If Next
Exceptions
Exception | Condition |
---|---|
System..::.NotSupportedException | A Graphic comprising of a Polygon or Polyline Geometry cannot be set to Visible. |