Share via


RibbonDropDown.SelectedItem Property

Definition

Gets or sets the RibbonDropDownItem that is currently selected.

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 RibbonDropDownItem that is currently selected.

Attributes

Remarks

Setting this property to a RibbonDropDownItem causes the item to appear in the text box portion of the drop-down list. The RibbonDropDownItem reference that you assign to the SelectedItem property must exist in this RibbonDropDown object's Items collection. Otherwise, an ArgumentException will be thrown.

Assigning a new value to the SelectedItem property does not cause a SelectionChanged event to be raised.

If the Items collection is not empty, then this property is not null. By default, this property refers to the first item in the Items collection.

Applies to