ClassRadButtonBase
Represents a base button control. The button control serves as a RadButtonElement wrapper. All logic and presentation features are implemented in a parallel hierarchy of objects. For this reason, RadButtonElement may be nested in any other telerik control, item, or element.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[DefaultBindingProperty("Text")]
public class RadButtonBase : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadButtonBase
Derived Classes:
Implements:
Inherited Members
Constructors
RadButtonBase()
Initializes a new instance of the RadButtonBase class.
Declaration
public RadButtonBase()
Properties
AllowShowFocusCues
Indicates focus cues display, when available, based on the corresponding control type and the current UI state.
Declaration
[Browsable(true)]
public override bool AllowShowFocusCues { get; set; }
Property Value
Overrides
ButtonElement
Gets the instance of RadButtonElement wrapped by this control. RadButtonElement is the main element in the hierarchy tree and encapsulates the actual functionality of RadButton.
Declaration
[Browsable(false)]
public RadButtonElement ButtonElement { get; }
Property Value
DefaultSize
Gets the default size for the button control, which is 110 pixels wide by 24 pixels high.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
DefaultTextAlignment
Gets the default text alignment for the button element by retrieving the value from the button element's metadata or override settings.
Declaration
protected virtual ContentAlignment DefaultTextAlignment { get; }
Property Value
DisplayStyle
Specifies the options for display of image and text primitives in the element.
Declaration
[Browsable(true)]
public DisplayStyle DisplayStyle { get; set; }
Property Value
Font
Gets or sets the Font of the control. This actually the Font property of the root element. Setting to [null] resets the value and the font from the applied theme will be used.
ImageAlignment
Gets or sets the alignment of image content on the drawing surface.
Declaration
public ContentAlignment ImageAlignment { get; set; }
Property Value
ImageIndex
Declaration
[RelatedImageList("ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.1.217.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public int ImageIndex { get; set; }
Property Value
ImageKey
Declaration
[RelatedImageList("ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.1.217.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public string ImageKey { get; set; }
Property Value
MeasureTrailingSpaces
Includes the trailing space at the end of each line. By default the boundary rectangle returned by the Overload:System.Drawing.Graphics.MeasureString method excludes the space at the end of each line. Set this flag to include that space in measurement.
SvgImage
Gets or sets the Svg Image.
Text
Gets or sets the text associated with this item.
Declaration
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Property Value
Overrides
TextAlignment
Gets or sets the alignment of text content on the drawing surface.
Declaration
public ContentAlignment TextAlignment { get; set; }
Property Value
TextImageRelation
Gets or sets the position of text and image relative to each other.
Declaration
public TextImageRelation TextImageRelation { get; set; }
Property Value
UseMnemonic
Determines whether the button can be clicked by using mnemonic characters.
Methods
ControlDefinesThemeForElement(RadElement)
Determines whether this control defines the theme for the specified element. Returns true for RadButtonElement instances.
Declaration
public override bool ControlDefinesThemeForElement(RadElement element)
Parameters
element
The RadElement to check for theme definition.
Returns
True if this control defines the theme for the element; otherwise, false.
Overrides
CreateAccessibilityInstance()
Creates an accessibility instance for the button control to support assistive technologies and screen readers.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
An AccessibleObject that provides accessibility support for the button control.
Overrides
CreateButtonElement()
Override this method to create custom main element. By default the main element is an instance of RadButtonElement.
Declaration
protected virtual RadButtonElement CreateButtonElement()
Returns
Instance of the one-and-only child of the root element of RadButton.
CreateChildItems(RadElement)
Creates the child elements for the button control, specifically the main RadButtonElement and sets up event handling.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent RadElement to which the child elements will be added.
Overrides
InitializeRootElement(RootRadElement)
Initializes the root element and configures focus cues behavior to allow display when the OS supports focus indicators for buttons.
Declaration
protected override void InitializeRootElement(RootRadElement rootElement)
Parameters
rootElement
The root RootRadElement to initialize.
Overrides
OnClick(EventArgs)
Handles the Click event. This method is intentionally empty as click handling is delegated to the button element.
OnGotFocus(EventArgs)
Handles the GotFocus event by calling the base implementation and setting focus to the button element.
PerformClick()
Programmatically performs a button click by validating the currently active control and triggering the click event if the button is enabled.
Declaration
public virtual void PerformClick()
ProcessMnemonic(char)
Processes mnemonic characters for the button, performing a click if the mnemonic character matches and the Alt key is pressed.
ShouldSerializeChildProperty(RadProperty, RadObject)
Declaration
public override bool ShouldSerializeChildProperty(RadProperty property, RadObject element)
Parameters
property
element
Returns
Overrides
Events
DoubleClick
Declaration
[Browsable(false)]
public event EventHandler DoubleClick
Event Value
MouseDoubleClick
Declaration
[Browsable(false)]
public event MouseEventHandler MouseDoubleClick
Event Value