Share via


ItemContainer.IsSelected Property

Definition

Gets or sets a value that indicates whether the item is currently selected.

public:
 property bool IsSelected { bool get(); void set(bool value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
bool IsSelected();

void IsSelected(bool value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
bool IsSelected();

void IsSelected(bool value);
public bool IsSelected { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")]
public bool IsSelected { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="false")] set; }
var boolean = itemContainer.isSelected;
itemContainer.isSelected = boolean;
Public Property IsSelected As Boolean

Property Value

Boolean

bool

A value that indicates whether the item is currently selected. The default is false.

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Remarks

This property sets the selection state for an individual instance of ItemContainer. Setting this property toggles the visibility of the item container's selection visual.

This property is automatically synchronized with the selection model of the ItemsView that this container belongs to.

Applies to