RadSplitButton
Represents a split button that facilitates a primary action and offers a drop-down menu with additional supplementary actions. This class includes properties for managing the visibility of its components, the ability to check and uncheck the button, and control over the drop-down menu's appearance and behavior. The RadSplitButton supports events for actions such as clicking the button, opening, closing, and toggling the drop-down. It is designed to be styled and customized, providing features like auto-open delays and command binding for integration into MVVM architectures.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[TelerikToolboxCategory("Buttons")]
public class RadSplitButton : ContentControl, ICommandSource, IDisposable
Inheritance: objectRadSplitButton
Derived Classes:
Implements:
Constructors
Initializes a new instance of the RadSplitButton class.
public RadSplitButton()
Fields
ActivateEvent
RoutedEvent
Identifies the Activate routed event.
public static readonly RoutedEvent ActivateEvent
AutoOpenDelayProperty
DependencyProperty
Identifies the AutoOpenDelay property.
public static readonly DependencyProperty AutoOpenDelayProperty
ButtonCornerRadiusProperty
DependencyProperty
Identifies the ButtonCornerRadius property.
public static readonly DependencyProperty ButtonCornerRadiusProperty
ButtonPartStyleProperty
DependencyProperty
Identifies the ButtonPartStyle dependency property.
public static readonly DependencyProperty ButtonPartStyleProperty
CheckedEvent
RoutedEvent
Occurs when the Button part become checked.
public static readonly RoutedEvent CheckedEvent
ClickEvent
RoutedEvent
Identifies the Click property.
public static readonly RoutedEvent ClickEvent
CloseOnEscapeProperty
DependencyProperty
Identifies the CloseOnEscape property.
public static readonly DependencyProperty CloseOnEscapeProperty
CloseOnPopupMouseLeftButtonUpProperty
DependencyProperty
Identifies the CloseOnPopupMouseLeftButtonUp property.
public static readonly DependencyProperty CloseOnPopupMouseLeftButtonUpProperty
CommandParameterProperty
DependencyProperty
Identifies the CommandParameter property.
public static readonly DependencyProperty CommandParameterProperty
CommandProperty
DependencyProperty
Identifies the Command property.
public static readonly DependencyProperty CommandProperty
CommandTargetProperty
DependencyProperty
Identifies the CommandTarget property.
public static readonly DependencyProperty CommandTargetProperty
CornerRadiusProperty
DependencyProperty
Identifies the CornerRadius property.
public static readonly DependencyProperty CornerRadiusProperty
DropDownButtonPositionProperty
DependencyProperty
Identifies the DropDownButtonPosition property.
public static readonly DependencyProperty DropDownButtonPositionProperty
DropDownClosedEvent
RoutedEvent
Identifies the DropDownClosed property.
public static readonly RoutedEvent DropDownClosedEvent
DropDownContentProperty
DependencyProperty
Identifies the DropDownContent property.
public static readonly DependencyProperty DropDownContentProperty
DropDownContentTemplateProperty
DependencyProperty
Identifies the DropDownContentTemplate property.
public static readonly DependencyProperty DropDownContentTemplateProperty
DropDownContentTemplateSelectorProperty
DependencyProperty
Identifies the DropDownContentTemplateSelector property.
public static readonly DependencyProperty DropDownContentTemplateSelectorProperty
DropDownHeightProperty
DependencyProperty
Identifies the PopupHeight property.
public static readonly DependencyProperty DropDownHeightProperty
DropDownIndicatorVisibilityProperty
DependencyProperty
Identifies the DropDownContent property.
public static readonly DependencyProperty DropDownIndicatorVisibilityProperty
DropDownMaxHeightProperty
DependencyProperty
Identifies the PopupMaxHeight property.
public static readonly DependencyProperty DropDownMaxHeightProperty
DropDownMaxWidthProperty
DependencyProperty
Identifies the PopupMaxWidth property.
public static readonly DependencyProperty DropDownMaxWidthProperty
DropDownOpenedEvent
RoutedEvent
Identifies the DropDownOpened property.
public static readonly RoutedEvent DropDownOpenedEvent
DropDownOpeningEvent
RoutedEvent
Identifies the DropDownOpening property.
public static readonly RoutedEvent DropDownOpeningEvent
DropDownPlacementProperty
DependencyProperty
Identifies the PopupPlacement property.
public static readonly DependencyProperty DropDownPlacementProperty
DropDownWidthProperty
DependencyProperty
Identifies the PopupWidth property.
public static readonly DependencyProperty DropDownWidthProperty
IsBackgroundVisibleProperty
DependencyProperty
Identifies the IsBackgroundVisible property.
public static readonly DependencyProperty IsBackgroundVisibleProperty
IsButtonPartVisibleProperty
DependencyProperty
Identifies the IsButtonPartVisible property.
public static readonly DependencyProperty IsButtonPartVisibleProperty
IsCheckedProperty
DependencyProperty
Identifies the IsChecked property.
public static readonly DependencyProperty IsCheckedProperty
IsFocusedProperty
DependencyProperty
Identifies the IsFocused dependency property.
public static readonly DependencyProperty IsFocusedProperty
IsOpenProperty
DependencyProperty
Identifies the IsOpen property.
public static readonly DependencyProperty IsOpenProperty
IsToggleProperty
DependencyProperty
Identifies the IsToggle property.
public static readonly DependencyProperty IsToggleProperty
PopupAnimationProperty
DependencyProperty
Identifies the PopupAnimation property.
public static readonly DependencyProperty PopupAnimationProperty
ToggleContentRotateAngleProperty
DependencyProperty
Identifies the ToggleContentRotateAngle dependency property.
public static readonly DependencyProperty ToggleContentRotateAngleProperty
ToggleCornerRadiusProperty
DependencyProperty
Identifies the ToggleCornerRadius property.
public static readonly DependencyProperty ToggleCornerRadiusProperty
TogglePartStyleProperty
DependencyProperty
Identifies the ToggleButtonStyle dependency property.
public static readonly DependencyProperty TogglePartStyleProperty
UncheckedEvent
RoutedEvent
Occurs when the Button part become unchecked.
public static readonly RoutedEvent UncheckedEvent
Properties
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.
[Browsable(false)]
public TimeSpan AutoOpenDelay { get; set; }
ButtonCornerRadius
CornerRadius
Gets or sets the ButtonCornerRadius dependency property.
public CornerRadius ButtonCornerRadius { get; set; }
ButtonPartStyle
Style
Gets or sets the style for the Button used by the SplitButton.
public Style ButtonPartStyle { get; set; }
Gets or sets whether the popup closes when the Escape key toggles. This is a dependency property.
public bool CloseOnEscape { get; set; }
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.
public bool CloseOnPopupMouseLeftButtonUp { get; set; }
Gets the command that will be executed when the command source is invoked. This is a dependency property.
[TypeConverter(typeof(CommandConverter))]
public ICommand Command { get; set; }
Represents a user defined data value that can be passed to the command when it is executed. This is a dependency property.
public object CommandParameter { get; set; }
CommandTarget
IInputElement
The object that the command is being executed on. This is a dependency property.
public IInputElement CommandTarget { get; set; }
CornerRadius
CornerRadius
Gets or sets a value that represents the degree to which the corners of the control are rounded. This is a dependency property.
public CornerRadius CornerRadius { get; set; }
Gets or sets the position of the drop down indicator. This is a dependency property.
public DropDownButtonPosition DropDownButtonPosition { get; set; }
Gets or sets a content to popup. This is a dependency property.
public object DropDownContent { get; set; }
DropDownContentTemplate
DataTemplate
Gets or sets the template used to display the drop-down content of the button. This is a dependency property.
public DataTemplate DropDownContentTemplate { get; set; }
DropDownContentTemplateSelector
DataTemplateSelector
Gets or sets the template used to display the drop-down content of the button. This is a dependency property.
public DataTemplateSelector DropDownContentTemplateSelector { get; set; }
Gets or sets the Height of the popup. This is a dependency property.
public double DropDownHeight { get; set; }
DropDownIndicatorVisibility
Visibility
Gets or sets whether the DropDown indicator visibility. This is a dependency property.
public Visibility DropDownIndicatorVisibility { get; set; }
Gets or sets the MaxHeight of the popup. This is a dependency property.
public double DropDownMaxHeight { get; set; }
Gets or sets the MaxWidth of the popup. This is a dependency property.
public double DropDownMaxWidth { get; set; }
DropDownPlacement
PlacementMode
Gets or sets the position of the popup. This is a dependency property.
public PlacementMode DropDownPlacement { get; set; }
Gets or sets the Width of the popup. This is a dependency property.
public double DropDownWidth { get; set; }
Sets the visual appearance of the chrome not to render in Normal mode.
[Browsable(false)]
public bool IsBackgroundVisible { get; set; }
Gets or sets whether the button part is visible.
public bool IsButtonPartVisible { get; set; }
Simulates the IsChecked of the ToggleButton. This is a dependency property.
public bool IsChecked { get; set; }
Gets a value that becomes the return value of in derived classes.
protected override bool IsEnabledCore { get; }
true if the element is enabled; otherwise, false.
Gets or sets whether the popup window is expanded. This is a dependency property.
public bool IsOpen { get; set; }
Gets or sets whether the popup supports toggle mode. This is a dependency property.
public bool IsToggle { get; set; }
PopupAnimation
PopupAnimation
Gets or sets the animation that will be used for the popup element.
public PopupAnimation PopupAnimation { get; set; }
ToggleCornerRadius
CornerRadius
Gets or sets the ToggleCornerRadius dependency property.
public CornerRadius ToggleCornerRadius { get; set; }
TogglePartStyle
Style
Gets or sets the style for the ToggleButton used by the SplitButton.
public Style TogglePartStyle { get; set; }
Methods
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Implements:
Gets the ToggleContentRotateAngle property.
public static double GetToggleContentRotateAngle(DependencyObject obj)
Raises the event.
protected virtual void OnActivate()
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .
public override void OnApplyTemplate()
Called when IsChecked property is initialised to true. Raises the Checked events.
protected virtual void OnChecked()
Toggle the IsOpen property and execute the associated Command.
protected virtual void OnClick()
OnCreateAutomationPeer()
AutomationPeer
Creates a RadSplitButtonAutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Called when the value of the drop-down content changes.
protected virtual void OnDropDownContentChanged(object oldValue, object newValue)
The previous value of the drop-down content.
newValueobjectThe new value of the drop-down content.
This method is invoked whenever the drop-down content is updated. Derived classes can override this method to perform custom logic in response to the content change. The base implementation does nothing.
Called when the DropDownContentTemplate property of a RadSplitButton changes.
protected virtual void OnDropDownContentTemplateChanged(DataTemplate oldValue, DataTemplate newValue)
The old value of the DropDownContentTemplate property.
newValueDataTemplateThe new value of the DropDownContentTemplate property.
Called when the DropDownContentTemplateSelector property of a RadSplitButton changes.
protected virtual void OnDropDownContentTemplateSelectorChanged(DataTemplateSelector oldValue, DataTemplateSelector newValue)
The old value of the DropDownContentTemplateSelector property.
newValueDataTemplateSelectorThe new value of the DropDownContentTemplateSelector property.
Called when [drop down placement changed].
protected virtual void OnDropDownPlacementChanged(PlacementMode newValue, PlacementMode oldValue)
The new value.
oldValuePlacementModeThe old value.
Called on got focus.
protected override void OnGotFocus(RoutedEventArgs e)
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when the visibility of the button part changes.
protected virtual void OnIsButtonPartVisibleChanged(bool oldValue, bool newValue)
The previous visibility state of the button part.
newValueboolThe new visibility state of the button part.
This method is invoked to handle changes in the visibility of the button part. Derived classes can override this method to provide custom behavior when the visibility changes.
Closes the popup on Escape key.
protected override void OnKeyDown(KeyEventArgs e)
Called on lost focus.
protected override void OnLostFocus(RoutedEventArgs e)
Handles the mouse over and starts the auto open timer.
protected override void OnMouseEnter(MouseEventArgs e)
Handles the mouse over and stops the auto open timer.
protected override void OnMouseLeave(MouseEventArgs e)
Restarts the auto open timer.
protected override void OnMouseMove(MouseEventArgs e)
protected override void OnMouseWheel(MouseWheelEventArgs e)
Toggle the IsChecked property and raise the Checked/Unchecked events.
protected virtual void OnToggle()
Called when IsChecked property is initialised to false. Raises the Unchecked events.
protected virtual void OnUnchecked()
Sets the ToggleContentRotateAngle property.
public static void SetToggleContentRotateAngle(DependencyObject obj, double value)
Events
Occurs when the action button is clicked.
public event EventHandler<RadRoutedEventArgs> Activate
Checked
RoutedEventHandler
Occurs when the action button is checked.
public event RoutedEventHandler Checked
Click
RoutedEventHandler
Occurs when the action button is clicked.
public event RoutedEventHandler Click
DropDownClosed
RoutedEventHandler
Occurs when the Popup closed.
public event RoutedEventHandler DropDownClosed
DropDownOpened
RoutedEventHandler
Occurs when the Popup opened.
public event RoutedEventHandler DropDownOpened
DropDownOpening
RoutedEventHandler
Occurs when the Popup will be opened. If the event handler set True for the Handled property then the Popup doesn't open.
public event RoutedEventHandler DropDownOpening
Unchecked
RoutedEventHandler
Occurs when the action button is unchecked.
public event RoutedEventHandler Unchecked