TabViewItem.IconSource 属性

定义

获取或设置要在选项卡中显示的 IconSource 的值。

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

属性值

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

示例

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

适用于