ClassRadSplitButton
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
RadSplitButton()
Initializes a new instance of the RadSplitButton class.
Declaration
public RadSplitButton()
Fields
ActivateEvent
Identifies the Activate routed event.
Declaration
public static readonly RoutedEvent ActivateEvent
Field Value
RoutedEvent
AutoOpenDelayProperty
Identifies the AutoOpenDelay property.
Declaration
public static readonly DependencyProperty AutoOpenDelayProperty
Field Value
DependencyProperty
ButtonCornerRadiusProperty
Identifies the ButtonCornerRadius property.
Declaration
public static readonly DependencyProperty ButtonCornerRadiusProperty
Field Value
DependencyProperty
ButtonPartStyleProperty
Identifies the ButtonPartStyle dependency property.
Declaration
public static readonly DependencyProperty ButtonPartStyleProperty
Field Value
DependencyProperty
CheckedEvent
Occurs when the Button part become checked.
Declaration
public static readonly RoutedEvent CheckedEvent
Field Value
RoutedEvent
ClickEvent
Identifies the Click property.
Declaration
public static readonly RoutedEvent ClickEvent
Field Value
RoutedEvent
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
CommandParameterProperty
Identifies the CommandParameter property.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
DependencyProperty
CommandProperty
Identifies the Command property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
DependencyProperty
CommandTargetProperty
Identifies the CommandTarget property.
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
DependencyProperty
CornerRadiusProperty
Identifies the CornerRadius property.
Declaration
public static readonly DependencyProperty CornerRadiusProperty
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
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 PopupPlacement property.
Declaration
public static readonly DependencyProperty DropDownPlacementProperty
Field Value
DependencyProperty
DropDownWidthProperty
Identifies the PopupWidth property.
Declaration
public static readonly DependencyProperty DropDownWidthProperty
Field Value
DependencyProperty
IsBackgroundVisibleProperty
Identifies the IsBackgroundVisible property.
Declaration
public static readonly DependencyProperty IsBackgroundVisibleProperty
Field Value
DependencyProperty
IsButtonPartVisibleProperty
Identifies the IsButtonPartVisible property.
Declaration
public static readonly DependencyProperty IsButtonPartVisibleProperty
Field Value
DependencyProperty
IsCheckedProperty
Identifies the IsChecked property.
Declaration
public static readonly DependencyProperty IsCheckedProperty
Field Value
DependencyProperty
IsFocusedProperty
Identifies the IsFocused dependency property.
Declaration
public static readonly DependencyProperty IsFocusedProperty
Field Value
DependencyProperty
IsOpenProperty
Identifies the IsOpen property.
Declaration
public static readonly DependencyProperty IsOpenProperty
Field Value
DependencyProperty
IsToggleProperty
Identifies the IsToggle property.
Declaration
public static readonly DependencyProperty IsToggleProperty
Field Value
DependencyProperty
PopupAnimationProperty
Identifies the PopupAnimation property.
Declaration
public static readonly DependencyProperty PopupAnimationProperty
Field Value
DependencyProperty
ToggleContentRotateAngleProperty
Identifies the ToggleContentRotateAngle dependency property.
Declaration
public static readonly DependencyProperty ToggleContentRotateAngleProperty
Field Value
DependencyProperty
ToggleCornerRadiusProperty
Identifies the ToggleCornerRadius property.
Declaration
public static readonly DependencyProperty ToggleCornerRadiusProperty
Field Value
DependencyProperty
TogglePartStyleProperty
Identifies the ToggleButtonStyle dependency property.
Declaration
public static readonly DependencyProperty TogglePartStyleProperty
Field Value
DependencyProperty
UncheckedEvent
Occurs when the Button part become unchecked.
Declaration
public static readonly RoutedEvent UncheckedEvent
Field Value
RoutedEvent
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
ButtonCornerRadius
Gets or sets the ButtonCornerRadius dependency property.
Declaration
public CornerRadius ButtonCornerRadius { get; set; }
Property Value
CornerRadius
ButtonPartStyle
Gets or sets the style for the Button used by the SplitButton.
Declaration
public Style ButtonPartStyle { get; set; }
Property Value
Style
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
Command
Gets the command that will be executed when the command source is invoked. This is a dependency property.
Declaration
[TypeConverter(typeof(CommandConverter))]
public ICommand Command { get; set; }
Property Value
CommandParameter
Represents a user defined data value that can be passed to the command when it is executed. This is a dependency property.
CommandTarget
The object that the command is being executed on. This is a dependency property.
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
IInputElement
CornerRadius
Gets or sets a value that represents the degree to which the corners of the control are rounded. This is a dependency property.
Declaration
public CornerRadius CornerRadius { get; set; }
Property Value
CornerRadius
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 a content to popup. 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 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 popup. This is a dependency property.
DropDownIndicatorVisibility
Gets or sets whether the DropDown indicator visibility. This is a dependency property.
Declaration
public Visibility DropDownIndicatorVisibility { get; set; }
Property Value
Visibility
DropDownMaxHeight
Gets or sets the MaxHeight of the popup. This is a dependency property.
DropDownMaxWidth
Gets or sets the MaxWidth of the popup. This is a dependency property.
DropDownPlacement
Gets or sets the position of the popup. This is a dependency property.
Declaration
public PlacementMode DropDownPlacement { get; set; }
Property Value
PlacementMode
DropDownWidth
Gets or sets the Width of the popup. This is a dependency property.
IsBackgroundVisible
Sets the visual appearance of the chrome not to render in Normal mode.
Declaration
[Browsable(false)]
public bool IsBackgroundVisible { get; set; }
Property Value
IsButtonPartVisible
Gets or sets whether the button part is visible.
IsChecked
Simulates the IsChecked of the ToggleButton. This is a dependency property.
IsEnabledCore
Gets a value that becomes the return value of in derived classes.
Declaration
protected override bool IsEnabledCore { get; }
Property Value
true if the element is enabled; otherwise, false.
IsFocused
Gets or sets the IsFocused property.
IsOpen
Gets or sets whether the popup window is expanded. This is a dependency property.
IsToggle
Gets or sets whether the popup supports toggle mode. 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
ToggleCornerRadius
Gets or sets the ToggleCornerRadius dependency property.
Declaration
public CornerRadius ToggleCornerRadius { get; set; }
Property Value
CornerRadius
TogglePartStyle
Gets or sets the style for the ToggleButton used by the SplitButton.
Declaration
public Style TogglePartStyle { get; set; }
Property Value
Style
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
GetToggleContentRotateAngle(DependencyObject)
Gets the ToggleContentRotateAngle property.
Declaration
public static double GetToggleContentRotateAngle(DependencyObject obj)
Parameters
obj
DependencyObject
Returns
OnApplyTemplate()
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .
Declaration
public override void OnApplyTemplate()
OnChecked()
Called when IsChecked property is initialised to true. Raises the Checked events.
Declaration
protected virtual void OnChecked()
OnClick()
Toggle the IsOpen property and execute the associated Command.
Declaration
protected virtual void OnClick()
OnCreateAutomationPeer()
Creates a RadSplitButtonAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnDropDownContentChanged(object, object)
Called when the value of the drop-down content changes.
Declaration
protected virtual void OnDropDownContentChanged(object oldValue, object newValue)
Parameters
oldValue
The previous value of the drop-down content.
newValue
The new value of the drop-down content.
Remarks
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.
OnDropDownContentTemplateChanged(DataTemplate, DataTemplate)
Called when the DropDownContentTemplate property of a RadSplitButton 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 RadSplitButton 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(PlacementMode, PlacementMode)
Called when [drop down placement changed].
Declaration
protected virtual void OnDropDownPlacementChanged(PlacementMode newValue, PlacementMode oldValue)
Parameters
newValue
PlacementMode
The new value.
oldValue
PlacementMode
The old value.
OnGotFocus(RoutedEventArgs)
Called on got focus.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
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.
OnIsButtonPartVisibleChanged(bool, bool)
Called when the visibility of the button part changes.
Declaration
protected virtual void OnIsButtonPartVisibleChanged(bool oldValue, bool newValue)
Parameters
oldValue
The previous visibility state of the button part.
newValue
The new visibility state of the button part.
Remarks
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.
OnKeyDown(KeyEventArgs)
Closes the popup on Escape key.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgs
OnLostFocus(RoutedEventArgs)
Called on lost focus.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
OnMouseEnter(MouseEventArgs)
Handles the mouse over and starts the auto open timer.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
e
MouseEventArgs
OnMouseLeave(MouseEventArgs)
Handles the mouse over and stops the auto open timer.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
e
MouseEventArgs
OnMouseMove(MouseEventArgs)
Restarts the auto open timer.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
e
MouseEventArgs
OnMouseWheel(MouseWheelEventArgs)
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
e
MouseWheelEventArgs
OnToggle()
Toggle the IsChecked property and raise the Checked/Unchecked events.
Declaration
protected virtual void OnToggle()
OnUnchecked()
Called when IsChecked property is initialised to false. Raises the Unchecked events.
Declaration
protected virtual void OnUnchecked()
SetToggleContentRotateAngle(DependencyObject, double)
Sets the ToggleContentRotateAngle property.
Declaration
public static void SetToggleContentRotateAngle(DependencyObject obj, double value)
Parameters
obj
DependencyObject
value
Events
Activate
Occurs when the action button is clicked.
Declaration
public event EventHandler<RadRoutedEventArgs> Activate
Event Value
Checked
Occurs when the action button is checked.
Declaration
public event RoutedEventHandler Checked
Event Value
RoutedEventHandler
Click
Occurs when the action button is clicked.
Declaration
public event RoutedEventHandler Click
Event Value
RoutedEventHandler
DropDownClosed
Occurs when the Popup closed.
Declaration
public event RoutedEventHandler DropDownClosed
Event Value
RoutedEventHandler
DropDownOpened
Occurs when the Popup opened.
Declaration
public event RoutedEventHandler DropDownOpened
Event Value
RoutedEventHandler
DropDownOpening
Occurs when the Popup will be opened. If the event handler set True for the Handled property then the Popup doesn't open.
Declaration
public event RoutedEventHandler DropDownOpening
Event Value
RoutedEventHandler
Unchecked
Occurs when the action button is unchecked.
Declaration
public event RoutedEventHandler Unchecked
Event Value
RoutedEventHandler