TreeView.SelectionMode 属性

定义

获取或设置 TreeView 实例的选择行为。

本文档适用于 Windows 应用 SDKWinUI 的 WinUI 2 for UWP (,请参阅Windows 应用 SDK命名空间) 。

public:
 property TreeViewSelectionMode SelectionMode { TreeViewSelectionMode get(); void set(TreeViewSelectionMode value); };
TreeViewSelectionMode SelectionMode();

void SelectionMode(TreeViewSelectionMode value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TreeViewSelectionMode::Single")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TreeViewSelectionMode::Single")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TreeViewSelectionMode::Single")]
TreeViewSelectionMode SelectionMode();

void SelectionMode(TreeViewSelectionMode value);
public TreeViewSelectionMode SelectionMode { get; set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TreeViewSelectionMode::Single")]
public TreeViewSelectionMode SelectionMode { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TreeViewSelectionMode::Single")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TreeViewSelectionMode::Single")] set; }
Public Property SelectionMode As TreeViewSelectionMode

属性值

一个枚举值,该值指定 TreeView 的选择行为。 默认值为 “单 选”。

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

适用于