TreeView.SelectionMode Property

Definition

Gets or sets the selection behavior for a TreeView instance.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

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

Property Value

An enumeration value that specifies the selection behavior for a TreeView. The default is Single selection.

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Applies to