Delen via


PathIcon.Data Property

Definition

Gets or sets a Geometry that specifies the shape to be drawn. In XAML. this can also be set using a string that describes Move and draw commands syntax.

public:
 property Geometry ^ Data { Geometry ^ get(); void set(Geometry ^ value); };
Geometry Data();

void Data(Geometry value);
public Geometry Data { get; set; }
var geometry = pathIcon.data;
pathIcon.data = geometry;
Public Property Data As Geometry
<PathIcon>
  <PathIcon.Data>
    singleGeometry
  </PathIcon.Data>
</PathIcon>
- or -
<PathIcon Data="moveAndDrawCommands"/>

Property Value

A description of the shape to be drawn.

Examples

This example shows an AppBarButton with a PathIcon.

<!-- App bar button with path icon. -->
<AppBarButton Label="PathIcon" Click="AppBarButton_Click">
    <AppBarButton.Icon>
        <PathIcon Data="F1 M 16,12 20,2L 20,16 1,16" HorizontalAlignment="Center"/>
    </AppBarButton.Icon>
</AppBarButton>

Applies to

See also