PathIcon PathIcon PathIcon Class

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

Syntax

Declaration

public class PathIconpublic class PathIconPublic Class PathIcon
<PathIcon .../>

Inheritance Hierarchy

Inherited Members

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Tag
Tag
Tag
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

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.

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>

Constructors summary

Initializes a new instance of the PathIcon class.

Properties summary

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.

Identifies the Data dependency property.

Constructors

  • PathIcon()
    PathIcon()
    PathIcon()
    PathIcon()

    Initializes a new instance of the PathIcon class.

    public PathIcon()public PathIcon()Public Function PathIcon() As

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
    <PathIcon>
      <PathIcon.Data>
        singleGeometry
      </PathIcon.Data>
    </PathIcon>
    

    Property Value

    Remarks

    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>
    
  • 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

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.ComposableAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.StaticAttribute

Details

Assembly

Windows.UI.Xaml.Controls.dll