PathIcon PathIcon PathIcon PathIcon Class

Definition

Represents an icon that uses a vector path as its content.

public : class PathIcon : IconElement, IPathIconpublic class PathIcon : IconElement, IPathIconPublic Class PathIcon Inherits IconElement Implements IPathIcon// This API is not available in Javascript.
<PathIcon .../>
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited events

Inherited methods

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>

Remarks

Note

You can set the Foreground property on the AppBarButton or on the PathIcon. If you set the Foreground on the AppBarButton, it's applied only to the default visual state. It's not applied to the other visual states defined in the AppBarButton template, like MouseOver. If you set the Foreground on the PathIcon, the color is applied to all visual states.

Constructors

PathIcon() PathIcon() PathIcon() PathIcon()

Initializes a new instance of the PathIcon class.

public : PathIcon()public PathIcon()Public Sub New()// This API is not available in Javascript.

Properties

Data Data Data Data

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 : Geometry Data { get; set; }public Geometry Data { get; set; }Public ReadWrite Property Data As Geometry// This API is not available in Javascript.
<PathIcon>
  <PathIcon.Data>
    singleGeometry
  </PathIcon.Data>
</PathIcon>
Value
Geometry Geometry Geometry Geometry

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>
See Also

DataProperty DataProperty DataProperty DataProperty

Identifies the Data dependency property.

public : static DependencyProperty DataProperty { get; }public static DependencyProperty DataProperty { get; }Public Static ReadOnly Property DataProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Data dependency property.

See Also