Dela via


RibbonGallery.SelectedItem Property (2007 System)

Gets or sets the currently selected item.

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 RibbonGallery 
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 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 Class

RibbonGallery Members

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

Ribbon Object Model Overview