RadButtonBase
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
Initializes a new instance of the RadButtonBase class.
public RadButtonBase()
Properties
Indicates focus cues display, when available, based on the corresponding control type and the current UI state.
[Browsable(true)]
public override bool AllowShowFocusCues { get; set; }
Overrides:
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.
[Browsable(false)]
public RadButtonElement ButtonElement { get; }
Gets the default size for the button control, which is 110 pixels wide by 24 pixels high.
protected override Size DefaultSize { get; }
Overrides:
Gets the default text alignment for the button element by retrieving the value from the button element's metadata or override settings.
protected virtual ContentAlignment DefaultTextAlignment { get; }
Specifies the options for display of image and text primitives in the element.
[Browsable(true)]
public DisplayStyle DisplayStyle { get; set; }
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.
public override Font Font { get; set; }
Overrides:
Gets or sets the alignment of image content on the drawing surface.
public ContentAlignment ImageAlignment { get; set; }
[RelatedImageList("ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.2.702.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public int ImageIndex { get; set; }
[RelatedImageList("ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.2.702.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public string ImageKey { get; set; }
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.
public bool MeasureTrailingSpaces { get; set; }
Gets or sets the Svg Image.
public RadSvgImage SvgImage { get; set; }
Gets or sets the text associated with this item.
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Overrides:
Gets or sets the alignment of text content on the drawing surface.
public ContentAlignment TextAlignment { get; set; }
Gets or sets the position of text and image relative to each other.
public TextImageRelation TextImageRelation { get; set; }
Determines whether the button can be clicked by using mnemonic characters.
public bool UseMnemonic { get; set; }
Methods
Determines whether this control defines the theme for the specified element. Returns true for RadButtonElement instances.
public override bool ControlDefinesThemeForElement(RadElement element)
The RadElement to check for theme definition.
Returns:True if this control defines the theme for the element; otherwise, false.
Overrides:
Creates an accessibility instance for the button control to support assistive technologies and screen readers.
protected override AccessibleObject CreateAccessibilityInstance()
An AccessibleObject that provides accessibility support for the button control.
Overrides:
Override this method to create custom main element. By default the main element is an instance of RadButtonElement.
protected virtual RadButtonElement CreateButtonElement()
Instance of the one-and-only child of the root element of RadButton.
Creates the child elements for the button control, specifically the main RadButtonElement and sets up event handling.
protected override void CreateChildItems(RadElement parent)
The parent RadElement to which the child elements will be added.
Overrides:
Initializes the root element and configures focus cues behavior to allow display when the OS supports focus indicators for buttons.
protected override void InitializeRootElement(RootRadElement rootElement)
The root RootRadElement to initialize.
Overrides:
Programmatically performs a button click by validating the currently active control and triggering the click event if the button is enabled.
public virtual void PerformClick()
Processes mnemonic characters for the button, performing a click if the mnemonic character matches and the Alt key is pressed.
public override bool ShouldSerializeChildProperty(RadProperty property, RadObject element)
Overrides:
Events
[Browsable(false)]
public event EventHandler DoubleClick
[Browsable(false)]
public event MouseEventHandler MouseDoubleClick