ClassRadButton
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
RadButton()
Initializes a new instance of the RadButton class.
Declaration
public RadButton()
Fields
ActivateEvent
Identifies the Activate routed event.
Declaration
public static readonly RoutedEvent ActivateEvent
Field Value
RoutedEvent
CornerRadiusProperty
Identifies the CornerRadius property.
Declaration
public static readonly DependencyProperty CornerRadiusProperty
Field Value
DependencyProperty
HoverDelayProperty
Identifies the HoverDelay property.
Declaration
public static readonly DependencyProperty HoverDelayProperty
Field Value
DependencyProperty
HoverEvent
Identifies the Hover routed event.
Declaration
public static readonly RoutedEvent HoverEvent
Field Value
RoutedEvent
IsBackgroundVisibleProperty
Identifies the IsBackgroundVisible property.
Declaration
public static readonly DependencyProperty IsBackgroundVisibleProperty
Field Value
DependencyProperty
Properties
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
HoverDelay
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 HoverDelay { get; set; }
Property Value
IsBackgroundVisible
Sets the visual appearance of the chrome not to render in Normal mode.
Declaration
[Browsable(false)]
public bool IsBackgroundVisible { get; set; }
Property Value
Methods
OnApplyTemplate()
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .
Declaration
public override void OnApplyTemplate()
OnClick()
Invoke the base OnClick and execute the associated Command.
Declaration
protected override void OnClick()
OnCreateAutomationPeer()
Creates a RadButtonAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnGotFocus(RoutedEventArgs)
Invoked on got focus.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
OnHover()
Invocated when the hover happens.
Declaration
protected virtual void OnHover()
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.
OnIsPressedChanged(DependencyPropertyChangedEventArgs)
Called when the IsPressed property changes.
Declaration
protected override void OnIsPressedChanged(DependencyPropertyChangedEventArgs e)
Parameters
e
DependencyPropertyChangedEventArgs
OnLostFocus(RoutedEventArgs)
Invoked on focus lost.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
OnMouseEnter(MouseEventArgs)
Starts the auto open timer.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
e
MouseEventArgs
OnMouseLeave(MouseEventArgs)
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