Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

Drop-Down Button

The Drop-Down Button consists of a button that when clicked displays a drop-down list of mutually exclusive items.


This control is useful for exposing closely related items in cases where no obvious default is available and where the individual items can be represented by an image, text, or both.

The following screen shot illustrates the Ribbon Drop-Down Button in a sample Ribbon.

Screen shot of a DropDownButton control in a sample Ribbon.

Drop-Down Button Properties

The Ribbon framework defines a collection of property keys for the Drop-Down Button control.

Typically, a Drop-Down Button property is updated in the ribbon UI by invalidating the Command associated with the control through a call to the IUIFramework::InvalidateUICommand method. The invalidation event is handled, and the property updates defined, by the IUICommandHandler::UpdateProperty callback method.

The IUICommandHandler::UpdateProperty callback method is not executed, and the application queried for an updated property value, until the property is required by the framework. For example, when a tab is activated and a control revealed in the ribbon UI, or when a tooltip is displayed.

Note  In some cases, a property can be retrieved through the IUIFramework::GetUICommandProperty method and set with the IUIFramework::SetUICommandProperty method.

The following table lists the property keys that are associated with the Drop-Down Button control.

Property KeyNotes
UI_PKEY_Categories Supports IUIFramework::GetUICommandProperty and IUIFramework::SetUICommandProperty.

Supports IUIFramework::GetUICommandProperty and IUIFramework::SetUICommandProperty.

If all child items are disabled, the framework sets UI_PKEY_Enabled to false (0). Otherwise, if one or more child items are enabled, UI_PKEY_Enabled is set to true (-1).

Important  The UI_PKEY_Enabled property for the Drop-Down Button control should be invalidated after one or more child items are enabled or disabled. This ensures that the framework queries the updated property value and refreshes the state of the Drop-Down Button control in the ribbon UI.

UI_PKEY_ItemsSource Supports IUIFramework::GetUICommandProperty and IUIFramework::SetUICommandProperty.
UI_PKEY_Keytip Can only be updated through invalidation.
UI_PKEY_Label Can only be updated through invalidation.
UI_PKEY_LargeHighContrastImage Can only be updated through invalidation.
UI_PKEY_LargeImage Can only be updated through invalidation.
UI_PKEY_SelectedItem Supports IUIFramework::GetUICommandProperty and IUIFramework::SetUICommandProperty.

Note  If the Command associated with the control is invalidated through a call to IUIFramework::InvalidateUICommand, the framework queries this property when UI_INVALIDATIONS_VALUE is passed as the value of flags.

UI_PKEY_SmallHighContrastImage Can only be updated through invalidation.
UI_PKEY_SmallImage Can only be updated through invalidation.
UI_PKEY_TooltipDescription Can only be updated through invalidation.
UI_PKEY_TooltipTitle Can only be updated through invalidation.


Related topics

Windows Ribbon Framework Control Library
DropDownButton markup element



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.