Class RadButtonElement
Represents a button element. The button element could be placed in each control's Items collection. It encapsulates all the necessary logic related to the user interaction and UI. The RadButton class is a simple wrapper for the RadButtonElement class. The RadButton acts to transfer events to and from its corresponding RadButtonElement instance. The RadButtonElement which is essentially the RadButton control may be nested in other telerik controls.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[ComVisible(false)]
public class RadButtonElement : RadButtonItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IButtonControl, IImageElement
Constructors
RadButtonElement()
Initializes a new instance of the RadButtonElement class.
Declaration
public RadButtonElement()
RadButtonElement(String)
Declaration
public RadButtonElement(string text)
Parameters
System.String
text
|
RadButtonElement(String, Image)
Declaration
public RadButtonElement(string text, Image image)
Parameters
System.String
text
|
System.Drawing.Image
image
|
Fields
LargeImageIndexProperty
LargeImageKeyProperty
LargeImageProperty
SmallImageIndexProperty
SmallImageKeyProperty
SmallImageProperty
UseSmallImageListProperty
Properties
BorderElement
Gets the BorderPrimitive element that is responsible for painting of the border of the control
Declaration
public BorderPrimitive BorderElement { get; protected set; }
Property Value
BorderPrimitive
|
ButtonFillElement
Gets the FillPrimitive element that is responsible for painting of the background of the control
Declaration
public FillPrimitive ButtonFillElement { get; protected set; }
Property Value
FillPrimitive
|
FocusPrimitive
Gets a reference to the FocusPrimitive of the RadButtonElement.
Declaration
public FocusPrimitive FocusPrimitive { get; }
Property Value
FocusPrimitive
|
ImagePrimitive
Gets a reference to the ImagePrimitive of the RadButtonElement.
Declaration
public ImagePrimitive ImagePrimitive { get; protected set; }
Property Value
ImagePrimitive
|
ImagePrimitiveAngleTransform
Angle of rotation for the button image. Unlike AngleTransform the property ImagePrimitiveAngleTransform rotates the image only. AngleTransform rotates the whole button
Declaration
[RadDefaultValue("AngleTransform", typeof(ImagePrimitive))]
public float ImagePrimitiveAngleTransform { get; set; }
Property Value
System.Single
|
IsCancelClicked
This property is used internally!
Declaration
public bool IsCancelClicked { get; set; }
Property Value
System.Boolean
|
LargeImage
Gets the large image that is displayed on a button element.
Declaration
[RadPropertyDefaultValue("LargeImage", typeof(RadButtonElement))]
public virtual Image LargeImage { get; }
Property Value
System.Drawing.Image
|
LargeImageIndex
Gets the large image list index value of the image displayed on the button control.
Declaration
[RadPropertyDefaultValue("LargeImageIndex", typeof(RadButtonElement))]
public virtual int LargeImageIndex { get; }
Property Value
System.Int32
|
LargeImageKey
Gets the large key accessor for the image in the ImageList.
Declaration
[RadPropertyDefaultValue("LargeImageKey", typeof(RadButtonElement))]
public virtual string LargeImageKey { get; }
Property Value
System.String
|
LayoutPanel
Gets a reference to the ImageAndTextLayoutPanel of the RadButtonElement.
Declaration
public ImageAndTextLayoutPanel LayoutPanel { get; protected set; }
Property Value
ImageAndTextLayoutPanel
|
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.
Declaration
public bool MeasureTrailingSpaces { get; set; }
Property Value
System.Boolean
|
ShowBorder
Gets or sets a value indicating whether the border is shown.
Declaration
public bool ShowBorder { get; set; }
Property Value
System.Boolean
|
SmallImage
Gets or sets the large image that is displayed on a button element.
Declaration
[RadPropertyDefaultValue("SmallImage", typeof(RadButtonElement))]
public virtual Image SmallImage { get; set; }
Property Value
System.Drawing.Image
|
SmallImageIndex
Gets or sets the small image list index value of the image displayed on the button control.
Declaration
[RadPropertyDefaultValue("SmallImageIndex", typeof(RadButtonElement))]
public virtual int SmallImageIndex { get; set; }
Property Value
System.Int32
|
SmallImageKey
Gets or sets the small key accessor for the image in the ImageList.
Declaration
[RadPropertyDefaultValue("SmallImageKey", typeof(RadButtonElement))]
public virtual string SmallImageKey { get; set; }
Property Value
System.String
|
TextElement
Gets the TextPrimitive element that is responsible for painting of the text of the control
Declaration
public TextPrimitive TextElement { get; protected set; }
Property Value
TextPrimitive
|
TextWrap
Declaration
[RadPropertyDefaultValue("TextWrap", typeof(TextPrimitive))]
public bool TextWrap { get; set; }
Property Value
System.Boolean
|
UseSmallImageList
Specifies whether the button should use the original image list or the small image list.
Declaration
public virtual bool UseSmallImageList { get; set; }
Property Value
System.Boolean
|
Methods
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
DpiScaleChanged(SizeF)
Declaration
public override void DpiScaleChanged(SizeF scaleFactor)
Parameters
System.Drawing.SizeF
scaleFactor
|
Overrides
GetVistaVisualStyle()
Declaration
public override VisualStyleElement GetVistaVisualStyle()
Returns
System.Windows.Forms.VisualStyles.VisualStyleElement
|
Overrides
GetXPVisualStyle()
Declaration
public override VisualStyleElement GetXPVisualStyle()
Returns
System.Windows.Forms.VisualStyles.VisualStyleElement
|
Overrides
InitializeFields()
InitializeSystemSkinPaint()
Declaration
protected override void InitializeSystemSkinPaint()
Overrides
MeasureButtonChildren(SizeF)
Declaration
protected SizeF MeasureButtonChildren(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
OnClick(EventArgs)
Declaration
protected override void OnClick(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
ShouldPaintChild(RadElement)
Declaration
protected override bool ShouldPaintChild(RadElement element)
Parameters
RadElement
element
|
Returns
System.Boolean
|