RibbonDropDown.SelectedItem Property (2007 System)
Gets or sets the RibbonDropDownItem that is currently selected.
Namespace: Microsoft.Office.Tools.Ribbon
Assembly: Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public Property SelectedItem As RibbonDropDownItem
'Usage
Dim instance As RibbonDropDown
Dim value As RibbonDropDownItem
value = instance.SelectedItem
instance.SelectedItem = value
[BrowsableAttribute(false)]
public RibbonDropDownItem SelectedItem { get; set; }
[BrowsableAttribute(false)]
public:
property RibbonDropDownItem^ SelectedItem {
RibbonDropDownItem^ get ();
void set (RibbonDropDownItem^ value);
}
public function get SelectedItem () : RibbonDropDownItem
public function set SelectedItem (value : RibbonDropDownItem)
Property Value
Type: Microsoft.Office.Tools.Ribbon.RibbonDropDownItem
The RibbonDropDownItem that is currently selected.
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 nulla null reference (Nothing in Visual Basic). By default, this property refers to the first item in the Items collection.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Office.Tools.Ribbon Namespace