TreeView.SelectedItem 属性

定义

获取或设置 TreeView 的 SelectedItem 属性。

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

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

void SelectedItem(IInspectable value);
public object SelectedItem { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public object SelectedItem { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
var object = treeView.selectedItem;
treeView.selectedItem = object;
Public Property SelectedItem As Object
<TreeView SelectedItem="bindingReference" .../>

属性值

Object

Platform::Object

IInspectable

获取或设置选定项。 默认值为 null。

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

适用于

另请参阅