skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadButton

Represents a button control that responds to user clicks and provides comprehensive Windows Forms integration with dialog support and accessibility features. The button control serves as a RadButtonElement wrapper, implementing all logic and presentation features through a parallel hierarchy of objects. This allows RadButtonElement to be nested in any other Telerik control, item, or element for maximum flexibility.

Inheritance
System.Object
RadControl
RadButtonBase
RadButton
MessageBoxDetailsButton
RadRepeatButton
Inherited Members
RadButtonBase.InitializeRootElement(RootRadElement)
RadButtonBase.CreateAccessibilityInstance()
RadButtonBase.CreateChildItems(RadElement)
RadButtonBase.CreateButtonElement()
RadButtonBase.ControlDefinesThemeForElement(RadElement)
RadButtonBase.ProcessMnemonic(Char)
RadButtonBase.OnGotFocus(EventArgs)
RadButtonBase.OnClick(EventArgs)
RadButtonBase.DefaultSize
RadButtonBase.DefaultTextAlignment
RadButtonBase.Text
RadButtonBase.AllowShowFocusCues
RadButtonBase.ButtonElement
RadButtonBase.MeasureTrailingSpaces
RadButtonBase.SvgImage
RadButtonBase.SvgImageXml
RadButtonBase.Image
RadButtonBase.ImageIndex
RadButtonBase.ImageKey
RadButtonBase.DisplayStyle
RadButtonBase.TextWrap
RadButtonBase.TextImageRelation
RadButtonBase.ImageAlignment
RadButtonBase.TextAlignment
RadButtonBase.UseMnemonic
RadButtonBase.Font
RadButtonBase.DoubleClick
RadButtonBase.MouseDoubleClick
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Dispose(Boolean)
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.CreateRootElement()
RadControl.LoadElementTree()
RadControl.LoadElementTree(Size)
RadControl.SetIsInitializing(Boolean)
RadControl.ShouldSerializeBackColor()
RadControl.ShouldSerializeForeColor()
RadControl.ShouldSerializeFont()
RadControl.OnKeyDown(KeyEventArgs)
RadControl.OnKeyUp(KeyEventArgs)
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.OnKeyPress(KeyPressEventArgs)
RadControl.OnDoubleClick(EventArgs)
RadControl.OnMouseDown(MouseEventArgs)
RadControl.OnMouseUp(MouseEventArgs)
RadControl.OnMouseEnter(EventArgs)
RadControl.OnMouseLeave(EventArgs)
RadControl.OnMouseMove(MouseEventArgs)
RadControl.OnMouseHover(EventArgs)
RadControl.OnMouseWheel(MouseEventArgs)
RadControl.OnMouseCaptureChanged(EventArgs)
RadControl.OnLostFocus(EventArgs)
RadControl.OnCreateControl()
RadControl.OnHandleDestroyed(EventArgs)
RadControl.OnParentChanged(EventArgs)
RadControl.OnVisibleChanged(EventArgs)
RadControl.OnFontChanged(EventArgs)
RadControl.OnForeColorChanged(EventArgs)
RadControl.OnBackColorChanged(EventArgs)
RadControl.OnEnabledChanged(EventArgs)
RadControl.OnBindingContextChanged(EventArgs)
RadControl.OnLocationChanged(EventArgs)
RadControl.OnPaddingChanged(EventArgs)
RadControl.OnRightToLeftChanged(EventArgs)
RadControl.OnPaint(PaintEventArgs)
RadControl.OnLayout(LayoutEventArgs)
RadControl.OnAutoSizeChanged(EventArgs)
RadControl.OnInvalidated(RadElement)
RadControl.OnLoad(Size)
RadControl.OnCaptureLosing()
RadControl.OnThemeChanged()
RadControl.OnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.OnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.ProcessFocusRequested(RadElement)
RadControl.ProcessCaptureChangeRequested(RadElement, Boolean)
RadControl.ProcessAutoSizeChanged(Boolean)
RadControl.CallOnMouseCaptureChanged(EventArgs)
RadControl.CallBaseOnGotFocus(EventArgs)
RadControl.CallBaseOnLostFocus(EventArgs)
RadControl.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.CallOnMouseUp(MouseEventArgs)
RadControl.CallOnMouseDown(MouseEventArgs)
RadControl.CallOnClick(EventArgs)
RadControl.CallOnDoubleClick(EventArgs)
RadControl.CallOnMouseEnter(EventArgs)
RadControl.CallOnMouseWheel(MouseEventArgs)
RadControl.CallOnMouseLeave(EventArgs)
RadControl.CallOnMouseMove(MouseEventArgs)
RadControl.CallOnMouseHover(EventArgs)
RadControl.CallOnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.CallBaseOnKeyDown(KeyEventArgs)
RadControl.CallOnKeyDown(KeyEventArgs)
RadControl.CallBaseOnKeyPress(KeyPressEventArgs)
RadControl.CallOnKeyPress(KeyPressEventArgs)
RadControl.IsInputKey(Keys)
RadControl.GetInputElement()
RadControl.CallBaseOnKeyUp(KeyEventArgs)
RadControl.CallOnKeyUp(KeyEventArgs)
RadControl.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.CallOnVisibleChanged(EventArgs)
RadControl.BeginInit()
RadControl.EndInit()
RadControl.OnNotifyPropertyChanged(String)
RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadControl.IComponentTreeHandler.GetShowFocusCues()
RadControl.IComponentTreeHandler.CreateRootElement()
RadControl.IComponentTreeHandler.CreateChildItems(RadElement)
RadControl.IComponentTreeHandler.InitializeRootElement(RootRadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement, Rectangle)
RadControl.IComponentTreeHandler.InvalidateIfNotSuspended()
RadControl.IComponentTreeHandler.GetAmbientPropertyValue(RadProperty)
RadControl.IComponentTreeHandler.ControlThemeChangedCallback()
RadControl.IComponentTreeHandler.OnAmbientPropertyChanged(RadProperty)
RadControl.IComponentTreeHandler.OnFocusRequested(RadElement)
RadControl.IComponentTreeHandler.OnCaptureChangeRequested(RadElement, Boolean)
RadControl.IComponentTreeHandler.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnMouseCaptureChanged(EventArgs)
RadControl.IComponentTreeHandler.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.IComponentTreeHandler.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.GetPreferredSize(Size)
RadControl.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
RadControl.GetRootElementDesiredSize(Int32, Int32, Int32, Int32)
RadControl.OnZoomGesture(ZoomGestureEventArgs)
RadControl.OnRotateGesture(RotateGestureEventArgs)
RadControl.OnPanGesture(PanGestureEventArgs)
RadControl.OnTwoFingerTapGesture(GestureEventArgs)
RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)
RadControl.OnGesture(GestureEventArgs)
RadControl.ProcessGesture(Message)
RadControl.EnableGesture(GestureType)
RadControl.DisableGesture(GestureType)
RadControl.Refresh()
RadControl.SuspendUpdate()
RadControl.ResumeUpdate()
RadControl.ResumeUpdate(Boolean)
RadControl.InvokeLayoutCallback(LayoutCallback)
RadControl.RegisterHostedControl(RadHostItem)
RadControl.UnregisterHostedControl(RadHostItem, Boolean)
RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)
RadControl.GetPlainText()
RadControl.CanEditUIElement(RadElement)
RadControl.GetChildAt(Int32)
RadControl.ShouldSerializeProperty(RadProperty)
RadControl.ShouldSerializeProperty(RadProperty, RadObject)
RadControl.ResetProperty(RadProperty, RadObject)
RadControl.CanEditElementAtDesignTime(RadElement)
RadControl.GetControlDefaultSize()
RadControl.GetDpiScaledSize(Size)
RadControl.GetDpiScaledSize(SizeF)
RadControl.FindPropertyInChildren(RadControl, IPCMessage)
RadControl.CallAccessibilityNotifyClients(AccessibleEvents, Int32)
RadControl.IPCHost.ProcessMessage(IPCMessage)
RadControl.ScaleControl(SizeF, BoundsSpecified)
RadControl.PerformRadAutoScale(Nullable<BoundsSpecified>)
RadControl.SetRadAutoScale(Boolean)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableRadAutoScale
RadControl.EnableRadFormInitialDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageList
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.AutoSize
RadControl.MaximumSize
RadControl.MinimumSize
RadControl.Focusable
RadControl.Site
RadControl.CausesValidation
RadControl.IsInitializing
RadControl.SmallImageList
RadControl.SmallImageScalingSize
RadControl.IsDesignMode
RadControl.IsDisplayed
RadControl.FocusedElement
RadControl.ShowItemToolTips
RadControl.CommandBindings
RadControl.EnableKeyMap
RadControl.BackColor
RadControl.ForeColor
RadControl.ValidationCancel
RadControl.IComponentTreeHandler.IsDesignMode
RadControl.IComponentTreeHandler.ElementTree
RadControl.IComponentTreeHandler.Behavior
RadControl.IComponentTreeHandler.Initializing
RadControl.IComponentTreeHandler.ThemeClassName
RadControl.EnableGestures
RadControl.EnableAnalytics
RadControl.AnalyticsName
RadControl.EnableRadAccessibilityObjects
RadControl.AccessibilityRequested
RadControl.EnableCodedUITests
RadControl.EnableCodedUITestsDefaultValue
RadControl.EnableUIAutomationDefaultValue
RadControl.IPCHost.Context
RadControl.ElementInvalidated
RadControl.ToolTipTextNeeded
RadControl.ScreenTipNeeded
RadControl.ThemeNameChanged
RadControl.Initialized
RadControl.PropertyChanged
RadControl.ZoomGesture
RadControl.RotateGesture
RadControl.PanGesture
RadControl.TwoFingerTapGesture
RadControl.PressAndTapGesture
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

public class RadButton : RadButtonBase, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IButtonControl, ISupportRootUIAutomation

Constructors

RadButton()

Declaration
public RadButton()

Properties

DialogResult

Gets or sets the dialog result value that is returned to the parent form when the button is clicked. This property is used to determine which button was clicked in modal dialogs. When a button with a DialogResult value is clicked, the form automatically closes and returns this value.

Declaration
public DialogResult DialogResult { get; set; }
Property Value
System.Windows.Forms.DialogResult

One of the DialogResult enumeration values. The default is DialogResult.None.

Remarks

This property is commonly used in dialog boxes to indicate the user's choice. Setting this property to any value other than DialogResult.None will cause the form to close when the button is clicked.

EnableUIAutomation

Gets or sets a value indicating whether UI Automation support is enabled for this button control. When enabled, screen readers and other accessibility tools can interact with the control. UI Automation provides programmatic access to user interface elements for assistive technology products.

Declaration
public override bool EnableUIAutomation { get; set; }
Property Value
System.Boolean

Overrides
RadControl.EnableUIAutomation
Implements
ISupportRootUIAutomation.EnableUIAutomation
Remarks

Disabling UI Automation may improve performance but will make the control inaccessible to screen readers. This property should typically remain enabled unless performance is critical and accessibility is not required.

Methods

NotifyDefault(Boolean)

Notifies the button whether it is the default button so that it can adjust its appearance accordingly. Default buttons typically have a thicker border or different visual styling to indicate their special status.

Declaration
public void NotifyDefault(bool value)
Parameters
System.Boolean value

True if the button is to have the appearance of the default button; otherwise, false.

Remarks

This method is typically called by the parent form to notify the button of its default status. Default buttons are activated when the user presses the Enter key within the form.

PerformClick()

Generates a Click event for the button, simulating a user click. This method can be called programmatically to trigger the button's click behavior.

Declaration
public override void PerformClick()
Overrides
RadButtonBase.PerformClick()
Remarks

This method checks if the Escape key is currently pressed and prevents the click if it is, unless this button is designated as the form's cancel button. This behavior ensures proper handling of dialog cancellation scenarios.

ProcessCmdKey(ref Message, Keys)

Processes command keys for the button control.

Declaration
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameters
System.Windows.Forms.Message msg

A Message, passed by reference, that represents the window message to process.

System.Windows.Forms.Keys keyData

One of the Keys values that represents the key to process.

Returns
System.Boolean

True if the command key was processed by this method; otherwise, false.

ProcessCodedUIMessage(ref IPCMessage)

Processes Coded UI test messages for automated testing scenarios.

Declaration
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Parameters
IPCMessage request

The IPC message containing the test command and parameters.

Overrides
RadControl.ProcessCodedUIMessage(ref IPCMessage)

ResetBackColorThemeOverrides()

Resets theme value overrides for the BackColor property.

Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
RadControl.ResetBackColorThemeOverrides()

ResetForeColorThemeOverrides()

Resets theme value overrides for the ForeColor property, restoring default theme behavior.

Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
RadControl.ResetForeColorThemeOverrides()

SetBackColorThemeOverrides()

Sets theme value overrides for the BackColor property of the button.

Declaration
protected override void SetBackColorThemeOverrides()
Overrides
RadControl.SetBackColorThemeOverrides()

SetForeColorThemeOverrides()

Sets theme value overrides for the ForeColor property of the button.

Declaration
protected override void SetForeColorThemeOverrides()
Overrides
RadControl.SetForeColorThemeOverrides()

WndProc(ref Message)

Processes Windows messages sent to the control.

Declaration
protected override void WndProc(ref Message m)
Parameters
System.Windows.Forms.Message m

The Windows Message to process.

Overrides
RadControl.WndProc(ref Message)

Explicit Interface Implementations

ISupportRootUIAutomation.DisposeUIAutomationProvider()

Clears the UI Automation provider for this control.

Declaration
void ISupportRootUIAutomation.DisposeUIAutomationProvider()
Implements
ISupportRootUIAutomation.DisposeUIAutomationProvider()

ISupportRootUIAutomation.InitializeUIAutomationProvider()

Creates the UI Automation provider for this control.

Declaration
void ISupportRootUIAutomation.InitializeUIAutomationProvider()
Implements
ISupportRootUIAutomation.InitializeUIAutomationProvider()

ISupportRootUIAutomation.RootUIAutomationManager

Gets the UI Automation Manager.

Declaration
IRootUIAutomationManager ISupportRootUIAutomation.RootUIAutomationManager { get; }
Returns
IRootUIAutomationManager

Implements
ISupportRootUIAutomation.RootUIAutomationManager

ISupportRootUIAutomation.UIAutomationProvider

Gets the UI Automation Provider.

Declaration
IRadRawElementProviderFragmentRoot ISupportRootUIAutomation.UIAutomationProvider { get; }
Returns
IRadRawElementProviderFragmentRoot

Implements
ISupportRootUIAutomation.UIAutomationProvider

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.