RibbonGallery.SelectedItemIndex Property

Gets or sets the index of the currently selected RibbonDropDownItem.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

[BrowsableAttribute(false)]
int SelectedItemIndex { get; set; }

Property Value

Type: System.Int32
The index of the currently selected RibbonDropDownItem.

Changing the SelectedItemIndex property changes the value returned by the SelectedItem property. In effect, changing the SelectedItemIndex property changes the selection.

Values assigned to the SelectedItemIndex must be from 0 (zero) through (Items.Count - 1).

If the Items collection is empty, this property returns -1.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft