Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.12 KB

iconsourceelement.md

File metadata and controls

40 lines (27 loc) · 1.12 KB
-api-id -api-type ms.custom
T:Windows.UI.Xaml.Controls.IconSourceElement
winrt class
RS5

Windows.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