RadLabel
Represents a label control that provides run-time information or descriptive text for a control.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[DefaultBindingProperty("Text")]
public class RadLabel : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, ISupportRootUIAutomation
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadLabel...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadLabel class.
public RadLabel()
Properties
Gets or sets a value indicating whether the control is automatically resized to display its entire contents.
[Browsable(true)]
public override bool AutoSize { get; set; }
Overrides:
Gets or sets a value indicating whether the border is visible.
public bool BorderVisible { get; set; }
Gets the default size of the control.
protected override Size DefaultSize { get; }
Overrides:
Gets or sets a value indicating whether UI Automation support is enabled for the label. Default value is true.
public override bool EnableUIAutomation { get; set; }
Overrides:
Implements:
Gets or sets the image that is displayed on the label.
public Image Image { get; set; }
Gets or sets the alignment of image content on the drawing surface.
public ContentAlignment ImageAlignment { get; set; }
Gets or sets the image list index value of the image displayed on the label control.
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.3.1014.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
[RelatedImageList("ImageList")]
public int ImageIndex { get; set; }
Gets or sets the key accessor for the image in the label.
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.3.1014.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
[RelatedImageList("ImageList")]
public virtual string ImageKey { get; set; }
Gets the RadLabelElement that represents the visual element of this label control.
[Browsable(false)]
public RadLabelElement LabelElement { get; }
Gets or sets the SVG image displayed on the label.
public RadSvgImage SvgImage { get; set; }
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; }
Gets or sets a value indicating whether the text should wrap to the available layout rectangle.
public bool TextWrap { get; set; }
Gets or sets a value indicating whether the first character preceded by an ampersand will be used as the label's mnemonic key.
public bool UseMnemonic { get; set; }
Methods
Creates the RadLabelAccessibleObject instance for this control.
protected override AccessibleObject CreateAccessibilityInstance()
An AccessibleObject instance for this control.
Overrides:
Creates the child items within the specified parent element.
protected override void CreateChildItems(RadElement parent)
The parent element that will contain the child items.
Overrides:
Creates the RadLabelElement for this control.
protected virtual RadLabelElement CreateLabelElement()
A new RadLabelElement instance.
Creates the root element for RadLabel control.
protected override RootRadElement CreateRootElement()
A new RadLabelRootElement instance.
Overrides:
Raises the NotifyPropertyChanged event for the specified property.
protected override void OnNotifyPropertyChanged(string propertyName)
The name of the property that changed.
Overrides:
Raises the TextChanged event.
protected override void OnTextChanged(EventArgs e)
An EventArgs that contains the event data.
Overrides:
Resets the background color theme overrides for the label element.
protected override void ResetBackColorThemeOverrides()
Overrides:
Resets the fore color theme overrides for the label element.
protected override void ResetForeColorThemeOverrides()
Overrides:
Sets the background color theme overrides for the label element.
protected override void SetBackColorThemeOverrides()
Overrides:
Sets the fore color theme overrides for the label element.
protected override void SetForeColorThemeOverrides()
Overrides:
Determines whether a child property of the label element should be serialized, excluding the Text and Image properties of LabelElement which are already serialized at the control level.
public override bool ShouldSerializeChildProperty(RadProperty property, RadObject element)
The RadProperty to check.
elementRadObjectThe RadObject that owns the property.
Returns:True if the property should be serialized; otherwise, false.
Overrides:
Processes Windows messages sent to the control.
protected override void WndProc(ref Message m)
The Windows message to process.
Overrides: