-api-id | -api-type | ms.custom |
---|---|---|
T:Windows.UI.Xaml.Controls.IconSourceElement |
winrt class |
RS5 |
Represents an icon that uses an IconSource as its content.
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>