Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

TabViewItem.IconSource Property

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets or sets the icon to be displayed within the tab.

public:
 property IconSource ^ IconSource { IconSource ^ get(); void set(IconSource ^ value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
IconSource IconSource();

void IconSource(IconSource value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
IconSource IconSource();

void IconSource(IconSource value);
public IconSource IconSource { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public IconSource IconSource { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
var iconSource = tabViewItem.iconSource;
tabViewItem.iconSource = iconSource;
Public Property IconSource As IconSource

Property Value

The icon to be displayed within the tab.

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

Examples

<TabView>
 <TabView.TabItems>
 <TabViewItem Header="Home" IsClosable="False">
 <TabViewItem.IconSource>
 <SymbolIconSource Symbol="Home" />
 </TabViewItem.IconSource>
 <!-- The content of the TabViewItem -->
 </TabViewItem>
 </TabView.TabItems>
</TabView>

Remarks

If the Header property is set, the icon appears inside the tab UI to the left of the header content.

Applies to

See also


Feedback

Was this page helpful?