Compartilhar via


RibbonGallery.SelectedItem Property

Definition

Gets or sets the currently selected item.

public:
 property Microsoft::Office::Tools::Ribbon::RibbonDropDownItem ^ SelectedItem { Microsoft::Office::Tools::Ribbon::RibbonDropDownItem ^ get(); void set(Microsoft::Office::Tools::Ribbon::RibbonDropDownItem ^ value); };
[System.ComponentModel.Browsable(false)]
public Microsoft.Office.Tools.Ribbon.RibbonDropDownItem SelectedItem { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.SelectedItem : Microsoft.Office.Tools.Ribbon.RibbonDropDownItem with get, set
Public Property SelectedItem As RibbonDropDownItem

Property Value

The currently selected RibbonDropDownItem.

Attributes

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 null. 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.

Applies to