Back to Devexpress

MapItemsLayerBase.AttributeDisplayValueEdit Event

windowsforms-devexpress-dot-xtramap-dot-mapitemslayerbase-979373c9.md

latest3.1 KB
Original Source

MapItemsLayerBase.AttributeDisplayValueEdit Event

Occurs for each attribute value that is used in a title or tooltip before this title or tooltip is displayed.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public event AttributeDisplayValueEditEventHandler AttributeDisplayValueEdit
vb
Public Event AttributeDisplayValueEdit As AttributeDisplayValueEditEventHandler

Event Data

The AttributeDisplayValueEdit event's data class is AttributeDisplayValueEditEventArgs. The following properties provide information specific to this event:

PropertyDescription
DisplayValueGets or sets an attribute display value.
NameReturns the name of an attribute.
PatternFragmentReturns the pattern fragment which will be replaced with the AttributeDisplayValueEditEventArgs.DisplayValue.
ValueReturns an attribute value.

Remarks

Handle the AttributeDisplayValueEdit event to modify existing item attributes. Use the e.Name property to determine which attribute is processed. Use the e.DisplayValue property to specify a value you want to display.

csharp
private void VectorLayer_AttributeDisplayValueEdit(object sender, DevExpress.Map.AttributeDisplayValueEditEventArgs e) {
    if (e.Value == null && e.Name=="NAME"){
        e.DisplayValue = "Unknown";
    }
}
vb
Private Sub VectorLayer_AttributeDisplayValueEdit(ByVal sender As Object, ByVal e As DevExpress.Map.AttributeDisplayValueEditEventArgs)
    If e.Value Is Nothing AndAlso e.Name Is "NAME" Then
        e.DisplayValue = "Unknown"
    End If
End Sub

See Also

ToolTipPattern

MapItemsLayerBase Class

MapItemsLayerBase Members

DevExpress.XtraMap Namespace