共用方式為


NavigationViewItemBase.IsSelected 屬性

定義

取得或設定值,這個值表示是否已選取 NavigationViewItem。

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

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

void IsSelected(bool value);
public bool IsSelected { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public bool IsSelected { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
var boolean = navigationViewItemBase.isSelected;
navigationViewItemBase.isSelected = boolean;
Public Property IsSelected As Boolean

屬性值

Boolean

bool

如果目前已選取專案,則為 true,否則為 false

屬性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

適用於