RadButton
Represents a customizable button control within the Telerik UI for WPF framework. The RadButton class derives from the Button class and includes additional properties, events, and behaviors that enhance its functionality, such as support for hover effects, corner radius customization, and command binding. It introduces dependency properties like HoverDelay to manage hover interactions, CornerRadius and InnerCornerRadius for visual styling, and routed events like Activate and Hover to handle button interactions. The RadButton also provides visual state management and integrates well with command patterns for MVVM design.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[TelerikToolboxCategory("Buttons")]
public class RadButton : Button
Inheritance: objectRadButton
Derived Classes:
Constructors
Initializes a new instance of the RadButton class.
public RadButton()
Fields
ActivateEvent
RoutedEvent
Identifies the Activate routed event.
public static readonly RoutedEvent ActivateEvent
CornerRadiusProperty
DependencyProperty
Identifies the CornerRadius property.
public static readonly DependencyProperty CornerRadiusProperty
HoverDelayProperty
DependencyProperty
Identifies the HoverDelay property.
public static readonly DependencyProperty HoverDelayProperty
HoverEvent
RoutedEvent
Identifies the Hover routed event.
public static readonly RoutedEvent HoverEvent
IsBackgroundVisibleProperty
DependencyProperty
Identifies the IsBackgroundVisible property.
public static readonly DependencyProperty IsBackgroundVisibleProperty
Properties
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 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 HoverDelay { get; set; }
Sets the visual appearance of the chrome not to render in Normal mode.
[Browsable(false)]
public bool IsBackgroundVisible { get; set; }
Methods
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()
Invoke the base OnClick and execute the associated Command.
protected override void OnClick()
OnCreateAutomationPeer()
AutomationPeer
Creates a RadButtonAutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Invoked on got focus.
protected override void OnGotFocus(RoutedEventArgs e)
Invocated when the hover happens.
protected virtual void OnHover()
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 IsPressed property changes.
protected override void OnIsPressedChanged(DependencyPropertyChangedEventArgs e)
Invoked on focus lost.
protected override void OnLostFocus(RoutedEventArgs e)
Starts the auto open timer.
protected override void OnMouseEnter(MouseEventArgs e)
Stops the auto open timer.
protected override void OnMouseLeave(MouseEventArgs e)
Restarts the auto open timer.
protected override void OnMouseMove(MouseEventArgs e)
Events
Occurs when button is clicked.
public event EventHandler<RadRoutedEventArgs> Activate
Occurs when button is hovered.
[Browsable(false)]
public event EventHandler<RadRoutedEventArgs> Hover