Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.07 KB

iconsourceelement.md

File metadata and controls

37 lines (26 loc) · 1.07 KB
-api-id -api-type
T:Microsoft.UI.Xaml.Controls.IconSourceElement
winrt class

Microsoft.UI.Xaml.Controls.IconSourceElement

-description

Represents an icon that uses an IconSource as its content.

-remarks

IconSource is similar to IconElement. However, because it is not a FrameworkElement, it can be shared.

IconSourceElement provides a wrapper that lets you use an IconSource in places that require an IconElement. For example, the AppBarButton.Icon property takes an IconElement. You can use an IconSource derived class as the icon like this:

<AppBarButton Label="Accept">
    <AppBarButton.Icon>
        <IconSourceElement>
            <IconSourceElement.IconSource>
                <SymbolIconSource Symbol="Accept"/>
            </IconSourceElement.IconSource>
        </IconSourceElement>
    </AppBarButton.Icon>
</AppBarButton>

-see-also

-examples