BulletedList.SelectedIndex Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the zero-based index of the currently selected item in a BulletedList control.
public:
virtual property int SelectedIndex { int get(); void set(int value); };
[System.ComponentModel.Bindable(false)]
public override int SelectedIndex { get; set; }
[<System.ComponentModel.Bindable(false)>]
member this.SelectedIndex : int with get, set
Public Overrides Property SelectedIndex As Integer
Property Value
Always returns -1.
- Attributes
Exceptions
An attempt was made to assign a value to the SelectedIndex.
Remarks
In the base class, ListControl, the SelectedIndex property returns a zero-based index of the currently selected item. The default is -1, which indicates that nothing is selected. The SelectedIndex property is not applicable to the BulletedList control.
Note When you use the get
accessor for the SelectedIndex property, it always returns -1
. An attempt to use the set
accessor for the SelectedIndex property raises a NotSupportedException.
Use the event data of the BulletedListEventArgs class to determine the index of the link button in a BulletedList control that was clicked.
This property is not bindable in visual designers, but is bindable at runtime. For more information, see BindableAttribute.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈