Share via


ItemsView.CurrentItemIndex 屬性

定義

取得具有焦點的最後一個專案索引,如果有的話。

public:
 property int CurrentItemIndex { int get(); };
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
int CurrentItemIndex();
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")]
public int CurrentItemIndex { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="-1")] get; }
var int32 = itemsView.currentItemIndex;
Public ReadOnly Property CurrentItemIndex As Integer

屬性值

Int32

int

具有焦點的最後一個專案索引;或 -1 沒有目前專案時,當數據收集是空的,或控件永遠不會取得焦點時發生。

屬性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

適用於