SymbolIcon SymbolIcon SymbolIcon Class

Represents an icon that uses a glyph from the Segoe MDL2 Assets font as its content.

Syntax

Declaration

public sealed class SymbolIconpublic sealed class SymbolIconPublic NotInheritable Class SymbolIcon
<SymbolIcon .../>

Inheritance Hierarchy

Inherited Members

Inherited properties

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

Inherited events

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Inherited methods

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Remarks

The most common way to specify the icon for an app bar button is to use one of the standard glyphs provided by the Segoe MDL2 Assets font, as specified in the Symbol enumeration. You can use a SymbolIcon by setting the Icon property of an AppBarButton directly to a value of the Symbol enumeration.

Note

You can set the Foreground property on the AppBarButton or on the SymbolIcon. 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 SymbolIcon, the color is applied to all visual states.

Windows 8/8.1 On Windows 8, the standard glyphs are provided by the Segoe UI Symbol font.

Examples

This example shows two ways to use a SymbolIcon an AppBarButton. The second button icon has its Foreground set to "Green".


<AppBarButton Icon="Like" Label="Like"/>

<AppBarButton Label="Accept">
    <AppBarButton.Icon>
        <SymbolIcon Symbol="Accept" Foreground="Green"/>
    </AppBarButton.Icon>
</AppBarButton>

Constructors summary

Initializes a new instance of the SymbolIcon class.

Initializes a new instance of the SymbolIcon class using the specified symbol.

Properties summary

Gets or sets the Segoe MDL2 Assets glyph used as the icon content.

Identifies the Symbol dependency property.

Constructors

  • SymbolIcon()
    SymbolIcon()
    SymbolIcon()
    SymbolIcon()

    Initializes a new instance of the SymbolIcon class.

    public SymbolIcon()public New()Public Sub New()public SymbolIcon()
  • SymbolIcon(Symbol)
    SymbolIcon(Symbol)
    SymbolIcon(Symbol)
    SymbolIcon(Symbol)

    Initializes a new instance of the SymbolIcon class using the specified symbol.

    public SymbolIcon(Symbol symbol)public New(Symbol symbol)Public Sub New(symbol As Symbol)public SymbolIcon(Symbol symbol)

    Parameters

    • symbol

      A named constant of the enumeration that specifies the Segoe MDL2 Assets glyph to use. The default is null.

    Remarks

    Windows 8/8.1 On Windows 8, the standard glyphs are provided by the Segoe UI Symbol font.

Properties

  • Symbol
    Symbol
    Symbol
    Symbol

    Gets or sets the Segoe MDL2 Assets glyph used as the icon content.

    public Symbol Symbol { get; set; }public Symbol Symbol { get; set; }Public ReadWrite Property Symbol As Symbolpublic Symbol Symbol { get; set; }
    <SymbolIcon Symbol="symbolName"/>
    

    Property Value

    • A named constant of the numeration that specifies the Segoe MDL2 Assets glyph to use.

    Remarks

    Windows 8/8.1 On Windows 8, the standard glyphs are provided by the Segoe UI Symbol font.

    Examples

    
    <AppBarButton Label="Accept">
        <AppBarButton.Icon>
            <SymbolIcon Symbol="Accept"/>
        </AppBarButton.Icon>
    </AppBarButton>
    
  • SymbolProperty
    SymbolProperty
    SymbolProperty
    SymbolProperty

    Identifies the Symbol dependency property.

    public static DependencyProperty SymbolProperty { get; }public static DependencyProperty SymbolProperty { get; }Public Static ReadOnly Property SymbolProperty As DependencyPropertypublic static DependencyProperty SymbolProperty { get; }

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

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

Details

Assembly

Windows.UI.Xaml.Controls.dll