ClassRadDropDownButton
Represents a customizable drop-down button that combines the functionalities of a standard button and a pop-up. The RadDropDownButton allows for displaying a drop-down content area when clicked, enabling users to select options or display additional information. This control offers features such as:
- Configurable drop-down content and templates
- Options to manage the button's open and close behaviors, including automatic closing on Escape or Enter key presses
- Control of visibility, position, and dimensions of the drop-down area
- Events to handle opening and closing of the drop-down, providing a rich user interaction experience.
The RadDropDownButton is designed for use in UI scenarios where hierarchical options or extended actions need to be displayed without cluttering the main interface.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[TelerikToolboxCategory("Buttons")]
public class RadDropDownButton : RadButton, IDisposable
Inheritance: objectRadButtonRadDropDownButton
Derived Classes:
Implements:
Inherited Members
Constructors
RadDropDownButton()
Initializes a new instance of the RadDropDownButton class.
Declaration
public RadDropDownButton()
Fields
AutoOpenDelayProperty
Identifies the AutoOpenDelay property.
Declaration
public static readonly DependencyProperty AutoOpenDelayProperty
Field Value
DependencyProperty
CloseOnEnterProperty
Identifies the CloseOnEnter property.
Declaration
public static readonly DependencyProperty CloseOnEnterProperty
Field Value
DependencyProperty
CloseOnEscapeProperty
Identifies the CloseOnEscape property.
Declaration
public static readonly DependencyProperty CloseOnEscapeProperty
Field Value
DependencyProperty
CloseOnPopupMouseLeftButtonUpProperty
Identifies the CloseOnPopupMouseLeftButtonUp property.
Declaration
public static readonly DependencyProperty CloseOnPopupMouseLeftButtonUpProperty
Field Value
DependencyProperty
DropDownButtonPositionProperty
Identifies the DropDownButtonPosition property.
Declaration
public static readonly DependencyProperty DropDownButtonPositionProperty
Field Value
DependencyProperty
DropDownClosedEvent
Identifies the DropDownClosed property.
Declaration
public static readonly RoutedEvent DropDownClosedEvent
Field Value
RoutedEvent
DropDownContentProperty
Identifies the DropDownContent property.
Declaration
public static readonly DependencyProperty DropDownContentProperty
Field Value
DependencyProperty
DropDownContentTemplateProperty
Identifies the DropDownContentTemplate property.
Declaration
public static readonly DependencyProperty DropDownContentTemplateProperty
Field Value
DependencyProperty
DropDownContentTemplateSelectorProperty
Identifies the DropDownContentTemplateSelector property.
Declaration
public static readonly DependencyProperty DropDownContentTemplateSelectorProperty
Field Value
DependencyProperty
DropDownHeightProperty
Identifies the PopupHeight property.
Declaration
public static readonly DependencyProperty DropDownHeightProperty
Field Value
DependencyProperty
DropDownIndicatorVisibilityProperty
Identifies the DropDownContent property.
Declaration
public static readonly DependencyProperty DropDownIndicatorVisibilityProperty
Field Value
DependencyProperty
DropDownMaxHeightProperty
Identifies the PopupMaxHeight property.
Declaration
public static readonly DependencyProperty DropDownMaxHeightProperty
Field Value
DependencyProperty
DropDownMaxWidthProperty
Identifies the PopupMaxWidth property.
Declaration
public static readonly DependencyProperty DropDownMaxWidthProperty
Field Value
DependencyProperty
DropDownMinHeightProperty
Identifies the DropDownMinHeight property.
Declaration
public static readonly DependencyProperty DropDownMinHeightProperty
Field Value
DependencyProperty
DropDownMinWidthProperty
Identifies the DropDownMinWidth property.
Declaration
public static readonly DependencyProperty DropDownMinWidthProperty
Field Value
DependencyProperty
DropDownOpenedEvent
Identifies the DropDownOpened property.
Declaration
public static readonly RoutedEvent DropDownOpenedEvent
Field Value
RoutedEvent
DropDownOpeningEvent
Identifies the DropDownOpening property.
Declaration
public static readonly RoutedEvent DropDownOpeningEvent
Field Value
RoutedEvent
DropDownPlacementProperty
Identifies the DropDownPlacement property.
Declaration
public static readonly DependencyProperty DropDownPlacementProperty
Field Value
DependencyProperty
DropDownWidthProperty
Identifies the PopupWidth property.
Declaration
public static readonly DependencyProperty DropDownWidthProperty
Field Value
DependencyProperty
IsOpenProperty
Identifies the IsOpen property.
Declaration
public static readonly DependencyProperty IsOpenProperty
Field Value
DependencyProperty
KeepOpenProperty
Identifies the KeepOpen property.
Declaration
public static readonly DependencyProperty KeepOpenProperty
Field Value
DependencyProperty
PopupAnimationProperty
Identifies the PopupAnimation property.
Declaration
public static readonly DependencyProperty PopupAnimationProperty
Field Value
DependencyProperty
PopupPlacementTargetProperty
Identifies the PopupPlacementTarget property.
Declaration
public static readonly DependencyProperty PopupPlacementTargetProperty
Field Value
DependencyProperty
Properties
AutoOpenDelay
Gets or sets whether the popup opens when mouse hovers for pointed milliseconds. Value of zero means no auto open. This is a dependency property.
Declaration
[Browsable(false)]
public TimeSpan AutoOpenDelay { get; set; }
Property Value
CloseOnEnter
Gets or sets whether the popup closes when the Enter key toggles. This is a dependency property.
CloseOnEscape
Gets or sets whether the popup closes when the Escape key toggles. This is a dependency property.
CloseOnPopupMouseLeftButtonUp
Gets or sets whether the Popup should be closed when the user clicks on the DropDownContent. The closing is executed on MouseLeftButtonUp event of the Popup. This is a dependency property.
Declaration
public bool CloseOnPopupMouseLeftButtonUp { get; set; }
Property Value
DropDownButtonPosition
Gets or sets the position of the drop down indicator. This is a dependency property.
Declaration
public DropDownButtonPosition DropDownButtonPosition { get; set; }
Property Value
DropDownContent
Gets or sets the drop-down area's content. This is a dependency property.
DropDownContentTemplate
Gets or sets the template used to display the drop-down content of the button. This is a dependency property.
Declaration
public DataTemplate DropDownContentTemplate { get; set; }
Property Value
DataTemplate
DropDownContentTemplateSelector
Gets or sets the template-selector used to display the drop-down content of the button. This is a dependency property.
Declaration
public DataTemplateSelector DropDownContentTemplateSelector { get; set; }
Property Value
DataTemplateSelector
DropDownHeight
Gets or sets the Height of the drop-down area. This is a dependency property.
DropDownIndicatorVisibility
Gets or sets whether the DropDown indicator is visible. This is a dependency property.
Declaration
public Visibility DropDownIndicatorVisibility { get; set; }
Property Value
Visibility
DropDownMaxHeight
Gets or sets the MaxHeight of the drop-down area. This is a dependency property.
DropDownMaxWidth
Gets or sets the MaxWidth of the drop-down area. This is a dependency property.
DropDownMinHeight
Gets or sets the MinHeight of the drop-down area. This is a dependency property.
DropDownMinWidth
Gets or sets the MinWidth of the drop-down area. This is a dependency property.
DropDownPlacement
Gets or sets the position of the drop-down area. This is a dependency property.
Declaration
public PlacementMode DropDownPlacement { get; set; }
Property Value
DropDownWidth
Gets or sets the Width of the drop-down area. This is a dependency property.
IsOpen
Gets or sets whether the drop-down area is opened. This is a dependency property.
KeepOpen
Gets or sets whether the drop-down area should remain opened. This is a dependency property.
PopupAnimation
Gets or sets the animation that will be used for the popup element.
Declaration
public PopupAnimation PopupAnimation { get; set; }
Property Value
PopupAnimation
PopupPlacementTarget
Get/set the placement for the popup element.
Declaration
public FrameworkElement PopupPlacementTarget { get; set; }
Property Value
FrameworkElement
Methods
ApplyDropDownButtonPosition()
Initializes the position of the DropDown indicator and correct the placement of the Popup window.
Declaration
protected virtual void ApplyDropDownButtonPosition()
ApplyPopupPlacement()
Set the placement of the Popup window.
Declaration
protected virtual void ApplyPopupPlacement()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Finalize()
Releases unmanaged resources and performs other cleanup operations before the RadDropDownButton is reclaimed by garbage collection.
Declaration
[SuppressMessage("Design", "CA1063:Implement IDisposable Correctly", Justification = "<Pending>")]
protected override void Finalize()
OnActivate()
Raises the event.
Declaration
protected override void OnActivate()
Overrides
OnApplyTemplate()
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
Declaration
public override void OnApplyTemplate()
Overrides
OnClick()
Invoke the base OnClick and toggle the IsOpen property.
Declaration
protected override void OnClick()
Overrides
OnCreateAutomationPeer()
Creates a RadDropDownButtonAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
Overrides
OnDropDownContentChanged(object, object)
Called when the DropDownContent property of a RadDropDownButton changes.
OnDropDownContentTemplateChanged(DataTemplate, DataTemplate)
Called when the DropDownContentTemplate property of a RadDropDownButton changes.
Declaration
protected virtual void OnDropDownContentTemplateChanged(DataTemplate oldValue, DataTemplate newValue)
Parameters
oldValue
DataTemplate
The old value of the DropDownContentTemplate property.
newValue
DataTemplate
The new value of the DropDownContentTemplate property.
OnDropDownContentTemplateSelectorChanged(DataTemplateSelector, DataTemplateSelector)
Called when the DropDownContentTemplateSelector property of a RadDropDownButton changes.
Declaration
protected virtual void OnDropDownContentTemplateSelectorChanged(DataTemplateSelector oldValue, DataTemplateSelector newValue)
Parameters
oldValue
DataTemplateSelector
The old value of the DropDownContentTemplateSelector property.
newValue
DataTemplateSelector
The new value of the DropDownContentTemplateSelector property.
OnDropDownPlacementChanged(DataTemplate, DataTemplate)
Called when the DropDownPlacement property of a RadDropDownButton changes.
Declaration
protected virtual void OnDropDownPlacementChanged(DataTemplate oldValue, DataTemplate newValue)
Parameters
oldValue
DataTemplate
The old value of the DropDownPlacement property.
newValue
DataTemplate
The new value of the DropDownPlacement property.
OnHover()
Invocated when the hover happens.
Declaration
protected override void OnHover()
Overrides
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
Overrides
OnIsOpenChanged(bool, bool)
Called when [is open changed].
OnKeyDown(KeyEventArgs)
Closes the popup on Escape key.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgs
OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
Called when an element loses keyboard focus.
Declaration
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
e
KeyboardFocusChangedEventArgs
The event data for the event.
OnMouseLeftButtonDown(MouseButtonEventArgs)
Provides class handling for the routed event that occurs when the left mouse button is pressed while the mouse pointer is over this control.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
e
MouseButtonEventArgs
The event data.
OnMouseLeftButtonUp(MouseButtonEventArgs)
Invoked when an unhandled routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
e
MouseButtonEventArgs
The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.
OnMouseWheel(MouseWheelEventArgs)
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
e
MouseWheelEventArgs
Events
DropDownClosed
Occurs when the Popup is closed.
Declaration
public event RoutedEventHandler DropDownClosed
Event Value
RoutedEventHandler
DropDownOpened
Occurs when the Popup is opened.
Declaration
public event RoutedEventHandler DropDownOpened
Event Value
RoutedEventHandler
DropDownOpening
Occurs when the Popup is opening.
Declaration
public event RoutedEventHandler DropDownOpening
Event Value
RoutedEventHandler