RadLabelElement
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
public RadLabelElement()
Fields
Identifies the BorderVisible dependency property that controls border visibility.
public static RadProperty BorderVisibleProperty
Identifies the DisplayStyle dependency property.
public static RadProperty DisplayStyleProperty
Identifies the ImageAlignment dependency property that controls image positioning within the element.
public static RadProperty ImageAlignmentProperty
Identifies the ImageIndex dependency property.
public static RadProperty ImageIndexProperty
Identifies the ImageKey dependency property.
public static RadProperty ImageKeyProperty
Identifies the Image dependency property for raster image content.
public static RadProperty ImageProperty
Identifies the SvgImage dependency property for vector image content.
public static RadProperty SvgImageProperty
Identifies the TextAlignment dependency property that controls text positioning within the element.
public static RadProperty TextAlignmentProperty
Identifies the TextImageRelation dependency property that defines the spatial relationship between text and image elements.
public static RadProperty TextImageRelationProperty
Properties
Gets or sets a value indicating whether the border around the label element is visible.
public bool BorderVisible { get; set; }
Gets or sets the raster image that is displayed in the label element.
[TypeConverter(typeof(ImageTypeConverter))]
public virtual Image Image { get; set; }
Gets or sets the alignment of image content within the label element's boundaries.
public virtual ContentAlignment ImageAlignment { get; set; }
Gets or sets the image list index value of the image displayed in the label element.
[RelatedImageList("ElementTree.Control.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.2.702.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual int ImageIndex { get; set; }
Gets or sets the key accessor for the image in the associated ImageList.
[RelatedImageList("ElementTree.Control.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.2.702.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual string ImageKey { get; set; }
Gets the border primitive element responsible for rendering the border around the label.
public BorderPrimitive LabelBorder { get; }
Gets the fill primitive element responsible for painting the background fill of the label.
public FillPrimitive LabelFill { get; }
Gets the image primitive element responsible for rendering the image of the label.
public ImagePrimitive LabelImage { get; }
Gets the text primitive element responsible for rendering the text in the label.
public TextPrimitive LabelText { get; }
Gets or sets the vector image that is displayed in the label element.
public RadSvgImage SvgImage { get; set; }
Gets or sets the alignment of text content within the label element's boundaries.
public virtual ContentAlignment TextAlignment { get; set; }
Gets or sets the spatial relationship between text and image content within the label element.
public virtual TextImageRelation TextImageRelation { get; set; }
Gets or sets a value indicating whether the text should wrap to fit within the available layout rectangle.
public bool TextWrap { get; set; }
Gets or sets a value indicating whether the text can contain keyboard mnemonics indicated by an ampersand character.
public bool UseMnemonic { get; set; }
Methods
Creates the child elements that comprise the label including border, fill, text, and image primitives.
protected override void CreateChildElements()
Overrides:
Measures the desired size of the label element within the specified available size constraints.
Handles property changes and updates related elements accordingly.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The event arguments containing information about the changed property.
Overrides:
Determines whether the specified property should be serialized based on its value source and current state.
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
The property descriptor to evaluate for serialization.
Returns:bool?
True if the property should be serialized; otherwise, false.
Overrides: