ClassRadLabelElement
Represents a label element that displays text, images, and various content alignment options with comprehensive layout and styling capabilities.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadLabelElement : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadLabelElement
Derived Classes:
Implements:
Inherited Members
Constructors
RadLabelElement()
Declaration
public RadLabelElement()
Fields
BorderVisibleProperty
Identifies the BorderVisible dependency property that controls border visibility.
Declaration
public static RadProperty BorderVisibleProperty
Field Value
DisplayStyleProperty
Identifies the DisplayStyle dependency property.
Declaration
public static RadProperty DisplayStyleProperty
Field Value
ImageAlignmentProperty
Identifies the ImageAlignment dependency property that controls image positioning within the element.
Declaration
public static RadProperty ImageAlignmentProperty
Field Value
ImageIndexProperty
Identifies the ImageIndex dependency property.
ImageKeyProperty
Identifies the ImageKey dependency property.
ImageProperty
Identifies the Image dependency property for raster image content.
SvgImageProperty
Identifies the SvgImage dependency property for vector image content.
TextAlignmentProperty
Identifies the TextAlignment dependency property that controls text positioning within the element.
Declaration
public static RadProperty TextAlignmentProperty
Field Value
TextImageRelationProperty
Identifies the TextImageRelation dependency property that defines the spatial relationship between text and image elements.
Declaration
public static RadProperty TextImageRelationProperty
Field Value
Properties
BorderVisible
Gets or sets a value indicating whether the border around the label element is visible.
Image
Gets or sets the raster image that is displayed in the label element.
Declaration
[TypeConverter(typeof(ImageTypeConverter))]
public virtual Image Image { get; set; }
Property Value
ImageAlignment
Gets or sets the alignment of image content within the label element's boundaries.
Declaration
public virtual ContentAlignment ImageAlignment { get; set; }
Property Value
ImageIndex
Gets or sets the image list index value of the image displayed in the label element.
Declaration
[RelatedImageList("ElementTree.Control.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.1.217.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual int ImageIndex { get; set; }
Property Value
ImageKey
Gets or sets the key accessor for the image in the associated ImageList.
Declaration
[RelatedImageList("ElementTree.Control.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.1.217.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual string ImageKey { get; set; }
Property Value
LabelBorder
Gets the border primitive element responsible for rendering the border around the label.
Declaration
public BorderPrimitive LabelBorder { get; }
Property Value
LabelFill
Gets the fill primitive element responsible for painting the background fill of the label.
LabelImage
Gets the image primitive element responsible for rendering the image of the label.
Declaration
public ImagePrimitive LabelImage { get; }
Property Value
LabelText
Gets the text primitive element responsible for rendering the text in the label.
SvgImage
Gets or sets the vector image that is displayed in the label element.
TextAlignment
Gets or sets the alignment of text content within the label element's boundaries.
Declaration
public virtual ContentAlignment TextAlignment { get; set; }
Property Value
TextImageRelation
Gets or sets the spatial relationship between text and image content within the label element.
Declaration
public virtual TextImageRelation TextImageRelation { get; set; }
Property Value
TextWrap
Gets or sets a value indicating whether the text should wrap to fit within the available layout rectangle.
UseMnemonic
Gets or sets a value indicating whether the text can contain keyboard mnemonics indicated by an ampersand character.
Methods
CreateChildElements()
Creates the child elements that comprise the label including border, fill, text, and image primitives.
Declaration
protected override void CreateChildElements()
Overrides
MeasureOverride(SizeF)
Measures the desired size of the label element within the specified available size constraints.
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property changes and updates related elements accordingly.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
The event arguments containing information about the changed property.
Overrides
ShouldSerializeProperty(PropertyDescriptor)
Determines whether the specified property should be serialized based on its value source and current state.
Declaration
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
Parameters
property
The property descriptor to evaluate for serialization.
Returns
bool?
True if the property should be serialized; otherwise, false.
Overrides