RibbonGallery.SelectedItem Property

Gets or sets the currently selected item.

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Property SelectedItem As RibbonDropDownItem
[BrowsableAttribute(false)]
RibbonDropDownItem SelectedItem { get; set; }

Property Value

Type: Microsoft.Office.Tools.Ribbon.RibbonDropDownItem
The currently selected RibbonDropDownItem.

Remarks

The currently selected item is only visually distinguishable from the rest of the items if the ShowItemSelection property is set to true.

If this RibbonGallery has at least one RibbonDropDownItem in its Items collection, then SelectedItem is guaranteed not to be nulla null reference (Nothing in Visual Basic). By default, the first RibbonDropDownItem in the Items collection is selected.

This property can only be set to RibbonDropDownItem components that are in this RibbonGallery control's Items collection.

.NET Framework Security

See Also

Reference

RibbonGallery Interface

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

Ribbon Object Model Overview