Share via


RibbonGallery.ShowItemSelection Property

Gets or sets a value that indicates whether the currently selected RibbonDropDownItem is visually differentiated from the rest of the unselected items.

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

Syntax

'Declaration
Property ShowItemSelection As Boolean
bool ShowItemSelection { get; set; }

Property Value

Type: System.Boolean
true if selected items are highlighted, otherwise false. The default is false.

Remarks

Setting the ShowItemSelection property to false does not cause the current selection to go away. The current selection is just not visually identified in the user interface.

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

If the ShowItemSelection property is set to true, the Click event of the RibbonGallery is raised only when a user clicks an item that is not currently selected.

This property can be set at run time only under certain conditions. For more information, see Ribbon Object Model Overview.

.NET Framework Security

See Also

Reference

RibbonGallery Interface

Microsoft.Office.Tools.Ribbon Namespace

SelectedItem

SelectedItemIndex

Other Resources

Ribbon Object Model Overview