Class LightVisualElement
Represents a lightweight visual element that supports text, border, image, background color, and foreground color with various layout adjustments. This element provides efficient rendering capabilities for common UI scenarios while implementing text and image primitive interfaces.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class LightVisualElement : UIItemBase, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
LightVisualElement()
Declaration
public LightVisualElement()
Fields
BackColor2Property
BackColor3Property
BackColor4Property
BackgroundImageLayoutProperty
BackgroundImageProperty
BorderBottomColorProperty
BorderBottomShadowColorProperty
BorderBottomWidthProperty
BorderBoxStyleProperty
BorderColor2Property
BorderColor3Property
BorderColor4Property
BorderColorProperty
BorderDashPatternProperty
BorderDashStyleProperty
BorderDrawModeProperty
BorderGradientAngleProperty
BorderGradientStyleProperty
BorderInnerColor2Property
BorderInnerColor3Property
BorderInnerColor4Property
BorderInnerColorProperty
BorderLeftColorProperty
BorderLeftShadowColorProperty
BorderLeftWidthProperty
BorderRightColorProperty
BorderRightShadowColorProperty
BorderRightWidthProperty
BorderTopColorProperty
BorderTopShadowColorProperty
BorderTopWidthProperty
BorderWidthProperty
ClipTextProperty
DisabledTextRenderingHintProperty
DrawBackgroundImageProperty
DrawBorderProperty
DrawFillProperty
DrawImageProperty
DrawTextProperty
EnableImageTransparencyProperty
GradientAngleProperty
GradientPercentage2Property
GradientPercentageProperty
GradientStyleProperty
HorizontalLineColorProperty
HorizontalLineWidthProperty
ImageAlignmentProperty
ImageIndexProperty
ImageKeyProperty
ImageLayoutProperty
ImageOpacityProperty
ImageProperty
ImageTransparentColorProperty
NumberOfColorsProperty
ShowHorizontalLineProperty
SvgImageProperty
TextAlignmentProperty
TextImageRelationProperty
TextRenderingHintProperty
TextWrapProperty
Properties
AutoEllipsis
Gets or sets a value indicating whether automatic text ellipsis will be applied when text cannot fit within the available space.
Declaration
public bool AutoEllipsis { get; set; }
Property Value
|
System.Boolean
|
Implements
BackColor2
Gets or sets the second background color used in gradient fill effects for multi-color gradient styles.
Declaration
[RadPropertyDefaultValue("BackColor2", typeof(LightVisualElement))]
public override Color BackColor2 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BackColor3
Gets or sets the third background color used in gradient fill effects for multi-color gradient styles.
Declaration
[RadPropertyDefaultValue("BackColor3", typeof(LightVisualElement))]
public override Color BackColor3 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BackColor4
Gets or sets the fourth background color used in gradient fill effects for multi-color gradient styles.
Declaration
[RadPropertyDefaultValue("BackColor4", typeof(LightVisualElement))]
public override Color BackColor4 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BackgroundImage
Gets or sets the background image displayed behind the element's content. This image is rendered according to the BackgroundImageLayout property.
Declaration
[RadPropertyDefaultValue("BackgroundImage", typeof(LightVisualElement))]
public virtual Image BackgroundImage { get; set; }
Property Value
|
System.Drawing.Image
|
BackgroundImageLayout
Gets or sets the layout mode for the background image, determining how it is positioned and scaled within the element bounds.
Declaration
public virtual ImageLayout BackgroundImageLayout { get; set; }
Property Value
|
System.Windows.Forms.ImageLayout
|
BorderBottomColor
Gets or sets the color of the bottom border when using FourBorders style.
Declaration
[RadPropertyDefaultValue("BorderBottomColor", typeof(LightVisualElement))]
public override Color BorderBottomColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderBottomShadowColor
Gets or sets the shadow color for the bottom border, providing a visual depth effect when rendered.
Declaration
[RadPropertyDefaultValue("BorderBottomShadowColor", typeof(LightVisualElement))]
public override Color BorderBottomShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderBottomWidth
Gets or sets the width of the bottom border when using FourBorders style. This value is automatically scaled based on the current DPI settings of the display.
Declaration
[RadPropertyDefaultValue("BorderBottomWidth", typeof(LightVisualElement))]
public override float BorderBottomWidth { get; set; }
Property Value
|
System.Single
|
Overrides
BorderBoxStyle
Gets or sets the border drawing style that determines how border appearance is configured. SingleBorder applies uniform appearance to all sides, while FourBorders allows individual configuration of each side's color, width, and shadow properties.
Declaration
[RadPropertyDefaultValue("BorderBoxStyle", typeof(LightVisualElement))]
public override BorderBoxStyle BorderBoxStyle { get; set; }
Property Value
|
BorderBoxStyle
|
Overrides
BorderColor
Gets or sets the primary border color used for solid borders or as the first color in gradient border effects.
Declaration
[RadPropertyDefaultValue("BorderColor", typeof(LightVisualElement))]
public override Color BorderColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderColor2
Gets or sets the second color used in gradient border effects for radial, glass, office glass, gel, and vista gradient styles.
Declaration
[RadPropertyDefaultValue("BorderColor2", typeof(LightVisualElement))]
public override Color BorderColor2 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderColor3
Gets or sets the third color used in gradient border effects for radial, glass, office glass, and vista gradient styles.
Declaration
[RadPropertyDefaultValue("BorderColor3", typeof(LightVisualElement))]
public override Color BorderColor3 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderColor4
Gets or sets the fourth color used in gradient border effects for radial, glass, office glass, and vista gradient styles.
Declaration
[RadPropertyDefaultValue("BorderColor4", typeof(LightVisualElement))]
public override Color BorderColor4 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderDashPattern
Gets or sets the custom dash pattern array for border rendering when using custom dashed line styles.
Declaration
[RadPropertyDefaultValue("BorderDashPattern", typeof(LightVisualElement))]
public override float[] BorderDashPattern { get; set; }
Property Value
|
System.Single[]
|
Overrides
BorderDashStyle
Gets or sets the style of dashed lines used for border rendering when dashed border effects are applied.
Declaration
[RadPropertyDefaultValue("BorderDashStyle", typeof(LightVisualElement))]
public override DashStyle BorderDashStyle { get; set; }
Property Value
|
System.Drawing.Drawing2D.DashStyle
|
Overrides
BorderDrawMode
Gets or sets the drawing order for border lines when using FourBorders style. This property determines which border lines are drawn on top when borders overlap at corners.
Declaration
[RadPropertyDefaultValue("BorderDrawMode", typeof(LightVisualElement))]
public override BorderDrawModes BorderDrawMode { get; set; }
Property Value
|
BorderDrawModes
|
Overrides
BorderGradientAngle
Gets or sets the angle in degrees for linear gradient borders. This property determines the direction of the gradient effect when BorderGradientStyle is set to linear gradient.
Declaration
[RadPropertyDefaultValue("BorderGradientAngle", typeof(LightVisualElement))]
public override float BorderGradientAngle { get; set; }
Property Value
|
System.Single
|
Overrides
BorderGradientStyle
Gets or sets the gradient style for border rendering. Available styles include solid, linear, radial, glass, office glass, gel, and vista. Each style provides different visual effects for the border appearance.
Declaration
[RadPropertyDefaultValue("BorderGradientStyle", typeof(LightVisualElement))]
public override GradientStyles BorderGradientStyle { get; set; }
Property Value
|
GradientStyles
|
Overrides
BorderInnerColor
Gets or sets the primary inner border color used in outer-inner border configurations for gradient border effects.
Declaration
[RadPropertyDefaultValue("BorderInnerColor", typeof(LightVisualElement))]
public override Color BorderInnerColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderInnerColor2
Gets or sets the second inner border color used in outer-inner border configurations for gradient border effects.
Declaration
[RadPropertyDefaultValue("BorderInnerColor2", typeof(LightVisualElement))]
public override Color BorderInnerColor2 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderInnerColor3
Gets or sets the third inner border color used in outer-inner border configurations for gradient border effects.
Declaration
[RadPropertyDefaultValue("BorderInnerColor3", typeof(LightVisualElement))]
public override Color BorderInnerColor3 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderInnerColor4
Gets or sets the fourth inner border color used in outer-inner border configurations for gradient border effects.
Declaration
[RadPropertyDefaultValue("BorderInnerColor4", typeof(LightVisualElement))]
public override Color BorderInnerColor4 { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderLeftColor
Gets or sets the color of the left border when using FourBorders style.
Declaration
[RadPropertyDefaultValue("BorderLeftColor", typeof(LightVisualElement))]
public override Color BorderLeftColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderLeftShadowColor
Gets or sets the shadow color for the left border, providing a visual depth effect when rendered.
Declaration
[RadPropertyDefaultValue("BorderLeftShadowColor", typeof(LightVisualElement))]
public override Color BorderLeftShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderLeftWidth
Gets or sets the width of the left border when using FourBorders style. This value is automatically scaled based on the current DPI settings of the display.
Declaration
[RadPropertyDefaultValue("BorderLeftWidth", typeof(LightVisualElement))]
public override float BorderLeftWidth { get; set; }
Property Value
|
System.Single
|
Overrides
BorderRightColor
Gets or sets the color of the right border when using FourBorders style.
Declaration
[RadPropertyDefaultValue("BorderRightColor", typeof(LightVisualElement))]
public override Color BorderRightColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderRightShadowColor
Gets or sets the shadow color for the right border, providing a visual depth effect when rendered.
Declaration
[RadPropertyDefaultValue("BorderRightShadowColor", typeof(LightVisualElement))]
public override Color BorderRightShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderRightWidth
Gets or sets the width of the right border when using FourBorders style. This value is automatically scaled based on the current DPI settings of the display.
Declaration
[RadPropertyDefaultValue("BorderRightWidth", typeof(LightVisualElement))]
public override float BorderRightWidth { get; set; }
Property Value
|
System.Single
|
Overrides
BorderTopColor
Gets or sets the color of the top border when using FourBorders style.
Declaration
[RadPropertyDefaultValue("BorderTopColor", typeof(LightVisualElement))]
public override Color BorderTopColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderTopShadowColor
Gets or sets the shadow color for the top border, providing a visual depth effect when rendered.
Declaration
[RadPropertyDefaultValue("BorderTopShadowColor", typeof(LightVisualElement))]
public override Color BorderTopShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
BorderTopWidth
Gets or sets the width of the top border when using FourBorders style. This value is automatically scaled based on the current DPI settings of the display.
Declaration
[RadPropertyDefaultValue("BorderTopWidth", typeof(LightVisualElement))]
public override float BorderTopWidth { get; set; }
Property Value
|
System.Single
|
Overrides
BorderWidth
Gets or sets the uniform width of all border sides when using SingleBorder style. This value is automatically scaled based on the current DPI settings of the display.
Declaration
[RadPropertyDefaultValue("BorderWidth", typeof(LightVisualElement))]
public override float BorderWidth { get; set; }
Property Value
|
System.Single
|
Overrides
CanFocus
Declaration
public override bool CanFocus { get; set; }
Property Value
|
System.Boolean
|
Overrides
CheckDrawBorderOnMeasure
This property is not relevant for this class.
Declaration
public virtual bool CheckDrawBorderOnMeasure { get; set; }
Property Value
|
System.Boolean
|
ClipText
Gets or sets a value indicating whether text should be clipped to the calculated text painting rectangle boundaries.
Declaration
[RadPropertyDefaultValue("ClipText", typeof(LightVisualElement))]
public bool ClipText { get; set; }
Property Value
|
System.Boolean
|
DisabledImageOpacity
Gets or sets the opacity level applied to images when they are in a disabled state.
Declaration
public virtual double DisabledImageOpacity { get; set; }
Property Value
|
System.Double
|
Remarks
If the value is set to a number outside the range 0.0 to 1.0, the property will use the value of the ImageOpacity property instead. The opacity value must be between 0.0 (fully transparent) and 1.0 (fully opaque).
DisabledTextRenderingHint
Gets or sets the text rendering hint used specifically when this element is in a disabled state. This allows for different text rendering quality when the element is disabled versus enabled.
Declaration
[RadPropertyDefaultValue("TextRenderingHint", typeof(VisualElement))]
public virtual TextRenderingHint DisabledTextRenderingHint { get; set; }
Property Value
|
System.Drawing.Text.TextRenderingHint
|
DisableHTMLRendering
Gets or sets a value indicating whether HTML formatting in text content should be disabled, forcing plain text rendering.
Declaration
public bool DisableHTMLRendering { get; set; }
Property Value
|
System.Boolean
|
DrawBackgroundImage
Gets or sets a value indicating whether the element should render its background image during the paint operation. This property controls the visibility of the image specified by the BackgroundImage property.
Declaration
[RadPropertyDefaultValue("DrawBackgroundImage", typeof(LightVisualElement))]
public bool DrawBackgroundImage { get; set; }
Property Value
|
System.Boolean
|
DrawBorder
Gets or sets a value indicating whether the element should render its border during the paint operation. This property controls the visibility of all border styles including single borders, four borders, and outer-inner borders.
Declaration
[RadPropertyDefaultValue("DrawBorder", typeof(LightVisualElement))]
public override bool DrawBorder { get; set; }
Property Value
|
System.Boolean
|
Overrides
DrawFill
Gets or sets a value indicating whether the element should render its background fill during the paint operation. This property controls the visibility of gradient fills, solid colors, and other background painting effects.
Declaration
[RadPropertyDefaultValue("DrawFill", typeof(LightVisualElement))]
public override bool DrawFill { get; set; }
Property Value
|
System.Boolean
|
Overrides
DrawImage
Gets or sets a value indicating whether the element should render its main image during the paint operation. This property controls the visibility of the image specified by the Image property.
Declaration
[RadPropertyDefaultValue("DrawImage", typeof(LightVisualElement))]
public bool DrawImage { get; set; }
Property Value
|
System.Boolean
|
DrawText
Gets or sets a value indicating whether the element should render its text content during the paint operation. When set to false, the text will not be visible even if the text property is set.
Declaration
[RadPropertyDefaultValue("DrawText", typeof(LightVisualElement))]
public virtual bool DrawText { get; set; }
Property Value
|
System.Boolean
|
EnableImageTransparency
Gets or sets a value indicating whether image transparency effects are enabled for this element.
Declaration
[RadPropertyDefaultValue("EnableImageTransparency", typeof(LightVisualElement))]
public bool EnableImageTransparency { get; set; }
Property Value
|
System.Boolean
|
GradientAngle
Gets or sets the angle in degrees for linear gradient background effects. This determines the direction of the gradient.
Declaration
[RadPropertyDefaultValue("GradientAngle", typeof(LightVisualElement))]
public override float GradientAngle { get; set; }
Property Value
|
System.Single
|
Overrides
GradientPercentage
Gets or sets the first gradient percentage that controls the distribution of colors in gradient background effects.
Declaration
[RadPropertyDefaultValue("GradientPercentage", typeof(LightVisualElement))]
public override float GradientPercentage { get; set; }
Property Value
|
System.Single
|
Overrides
GradientPercentage2
Gets or sets the second gradient percentage that controls the distribution of colors in gradient background effects.
Declaration
[RadPropertyDefaultValue("GradientPercentage2", typeof(LightVisualElement))]
public override float GradientPercentage2 { get; set; }
Property Value
|
System.Single
|
Overrides
GradientStyle
Gets or sets the gradient style for background fill rendering. Available styles include solid, linear, radial, glass, office glass, gel, and vista.
Declaration
[RadPropertyDefaultValue("GradientStyle", typeof(LightVisualElement))]
public override GradientStyles GradientStyle { get; set; }
Property Value
|
GradientStyles
|
Overrides
HorizontalLineColor
Gets or sets the color of the horizontal line when ShowHorizontalLine is enabled.
Declaration
[RadPropertyDefaultValue("HorizontalLineColor", typeof(LightVisualElement))]
public virtual Color HorizontalLineColor { get; set; }
Property Value
|
System.Drawing.Color
|
HorizontalLineWidth
Gets or sets the width in pixels of the horizontal line when ShowHorizontalLine is enabled. This value is automatically scaled based on current DPI settings.
Declaration
[RadPropertyDefaultValue("HorizontalLineWidth", typeof(LightVisualElement))]
public virtual int HorizontalLineWidth { get; set; }
Property Value
|
System.Int32
|
Image
Gets or sets the main image displayed on the element. The image position is controlled by ImageAlignment and TextImageRelation properties.
Declaration
[RadPropertyDefaultValue("Image", typeof(LightVisualElement))]
public virtual Image Image { get; set; }
Property Value
|
System.Drawing.Image
|
Implements
ImageAlignment
Gets or sets the alignment of the image within the element bounds, controlling both horizontal and vertical positioning.
Declaration
public virtual ContentAlignment ImageAlignment { get; set; }
Property Value
|
System.Drawing.ContentAlignment
|
ImageDrawType
Gets or sets the type of image to draw, determining whether to render bitmap images or SVG images based on availability and configuration. Determines whether the Image or SvgImage property will be painted. Note that if SvgImage == null, this property will always return "ImageDrawType.Image".
Declaration
public virtual ImageDrawType ImageDrawType { get; set; }
Property Value
|
ImageDrawType
|
ImageIndex
Gets or sets the index of the image from the associated Telerik.WinControls.UI.LightVisualElement.ImageList to display on this element.
Declaration
[RadPropertyDefaultValue("ImageIndex", typeof(LightVisualElement))]
public virtual int ImageIndex { get; set; }
Property Value
|
System.Int32
|
Implements
ImageKey
Gets or sets the key of the image from the associated Telerik.WinControls.UI.LightVisualElement.ImageList to display on this element.
Declaration
[RadPropertyDefaultValue("ImageKey", typeof(LightVisualElement))]
public virtual string ImageKey { get; set; }
Property Value
|
System.String
|
Implements
ImageLayout
Gets or sets the layout mode for the main image, determining how it is positioned and scaled within the element bounds.
Declaration
public virtual ImageLayout ImageLayout { get; set; }
Property Value
|
System.Windows.Forms.ImageLayout
|
ImageOpacity
Gets or sets the opacity level for image rendering, where 1.0 represents fully opaque and 0.0 represents fully transparent.
Declaration
[RadPropertyDefaultValue("ImageOpacity", typeof(LightVisualElement))]
public virtual double ImageOpacity { get; set; }
Property Value
|
System.Double
|
ImageTransparentColor
Gets or sets the color that will be treated as transparent when rendering images on this element.
Declaration
[RadPropertyDefaultValue("ImageTransparentColor", typeof(LightVisualElement))]
public Color ImageTransparentColor { get; set; }
Property Value
|
System.Drawing.Color
|
Layout
Gets the layout manager that controls the positioning and sizing of text and image content within this element.
Declaration
public virtual LayoutManagerPart Layout { get; }
Property Value
|
LayoutManagerPart
|
MeasureTrailingSpaces
Gets or sets a value indicating whether trailing spaces in text should be included in text measurement calculations.
Declaration
public bool MeasureTrailingSpaces { get; set; }
Property Value
|
System.Boolean
|
Implements
NumberOfColors
Gets or sets the number of colors used in gradient background effects. This determines how many color properties are utilized.
Declaration
[RadPropertyDefaultValue("NumberOfColors", typeof(LightVisualElement))]
public override int NumberOfColors { get; set; }
Property Value
|
System.Int32
|
Overrides
Shadow
This property is not relevant for this class.
Declaration
public ShadowSettings Shadow { get; set; }
Property Value
|
ShadowSettings
|
Implements
ShouldPaint
Declaration
public override bool ShouldPaint { get; set; }
Property Value
|
System.Boolean
|
Overrides
ShowHorizontalLine
Gets or sets a value indicating whether a horizontal line should be rendered across the element.
Declaration
[RadPropertyDefaultValue("ShowHorizontalLine", typeof(LightVisualElement))]
public virtual bool ShowHorizontalLine { get; set; }
Property Value
|
System.Boolean
|
ShowKeyboardCues
Gets or sets a value indicating whether keyboard access cues (underlines for mnemonics) should be displayed for this element.
Declaration
public virtual bool ShowKeyboardCues { get; set; }
Property Value
|
System.Boolean
|
Implements
SvgImage
Gets or sets the SVG image to be displayed on this element as a scalable vector graphic.
Declaration
public virtual RadSvgImage SvgImage { get; set; }
Property Value
|
RadSvgImage
|
SvgImageXml
Gets or sets the Svg Image as string.
Declaration
[VsbBrowsable(false)]
public virtual string SvgImageXml { get; set; }
Property Value
|
System.String
|
TextAlignment
Gets or sets the alignment of text within the element bounds, controlling both horizontal and vertical positioning.
Declaration
public virtual ContentAlignment TextAlignment { get; set; }
Property Value
|
System.Drawing.ContentAlignment
|
Implements
TextBlock
This property is not relevant for this class.
Declaration
public virtual FormattedTextBlock TextBlock { get; set; }
Property Value
|
FormattedTextBlock
|
TextImageRelation
Gets or sets the spatial relationship between text and image content. This determines how text and image are positioned relative to each other.
Declaration
[RadPropertyDefaultValue("TextImageRelation", typeof(LightVisualElement))]
public TextImageRelation TextImageRelation { get; set; }
Property Value
|
System.Windows.Forms.TextImageRelation
|
TextParams
This property is not relevant for this class.
Declaration
public TextParams TextParams { get; }
Property Value
|
TextParams
|
TextRenderingHint
Gets or sets the text rendering hint that determines the quality and anti-aliasing mode used when rendering text on this element. This property affects the visual appearance and readability of text displayed by the element.
Declaration
[RadPropertyDefaultValue("TextRenderingHint", typeof(VisualElement))]
public virtual TextRenderingHint TextRenderingHint { get; set; }
Property Value
|
System.Drawing.Text.TextRenderingHint
|
TextWrap
Gets or sets a value indicating whether text will automatically wrap to multiple lines when it exceeds the element's width.
Declaration
[RadPropertyDefaultValue("TextWrap", typeof(LightVisualElement))]
public virtual bool TextWrap { get; set; }
Property Value
|
System.Boolean
|
Implements
UseMnemonic
Gets or sets a value indicating whether ampersand characters (&) in text will be treated as mnemonic access key indicators.
Declaration
public virtual bool UseMnemonic { get; set; }
Property Value
|
System.Boolean
|
Implements
Methods
AnimateImage(Image, Boolean)
Declaration
protected virtual void AnimateImage(Image image, bool isBackgroundImage)
Parameters
|
System.Drawing.Image
image
|
|
System.Boolean
isBackgroundImage
|
ArrangeElement(RadElement, SizeF)
Arranges a single child element according to its fit-to-size mode within the allocated space.
Declaration
protected virtual void ArrangeElement(RadElement element, SizeF finalSize)
Parameters
|
RadElement
element
The child element to arrange. |
|
System.Drawing.SizeF
finalSize
The final size available for arranging the element. |
ArrangeOverride(SizeF)
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
The final area within the parent that this element should use to arrange itself and its children. |
Returns
|
System.Drawing.SizeF
The actual size used by the element after arrangement. |
Overrides
CalculateDesiredSize(SizeF, SizeF, SizeF)
Calculates the final desired size by combining the element's content size with child elements' size requirements.
Declaration
protected virtual SizeF CalculateDesiredSize(SizeF availableSize, SizeF desiredSize, SizeF elementsDesiredSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available space that a parent element can allocate. |
|
System.Drawing.SizeF
desiredSize
The desired size calculated from content and layout requirements. |
|
System.Drawing.SizeF
elementsDesiredSize
The desired size calculated from child elements. |
Returns
|
System.Drawing.SizeF
The final desired size taking into account all size constraints. |
ClipImage(Image, Rectangle, Size)
Clips an image to fit within the specified rectangle and size constraints, creating a new image if necessary.
Declaration
protected virtual Image ClipImage(Image image, Rectangle imageRectange, Size size)
Parameters
|
System.Drawing.Image
image
The source image to clip. |
|
System.Drawing.Rectangle
imageRectange
The rectangle defining the clipping area within the source image. |
|
System.Drawing.Size
size
The target size for the clipped image. |
Returns
|
System.Drawing.Image
The clipped image, or the original image if no clipping is needed. |
CreateTextParams()
DisposeManagedResources()
Disposes of managed resources including cached images and SVG images when the element is being disposed.
Declaration
protected override void DisposeManagedResources()
Overrides
DrawHorizontalLine(IGraphics)
Draws a horizontal line across the element when text is present, positioning the line based on text alignment and size.
Declaration
protected virtual void DrawHorizontalLine(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for rendering the horizontal line. |
DrawHorizontalLineWithoutText(IGraphics)
Draws a horizontal line across the element when no text is present and ShowHorizontalLine is enabled.
Declaration
protected virtual void DrawHorizontalLineWithoutText(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for rendering the horizontal line. |
GetAsBitmapEx(Color, Single, SizeF)
Declaration
public override Bitmap GetAsBitmapEx(Color backColor, float totalAngle, SizeF totalScale)
Parameters
|
System.Drawing.Color
backColor
|
|
System.Single
totalAngle
|
|
System.Drawing.SizeF
totalScale
|
Returns
|
System.Drawing.Bitmap
|
Overrides
GetBorderThickness(Boolean)
Gets the border thickness for this element instance by delegating to the static GetBorderThickness(LightVisualElement, Boolean) method.
Declaration
protected virtual Padding GetBorderThickness(bool checkDrawBorder)
Parameters
|
System.Boolean
checkDrawBorder
When true, returns zero thickness if DrawBorder is false. |
Returns
|
System.Windows.Forms.Padding
A System.Windows.Forms.Padding structure representing the border thickness. |
GetBorderThickness(LightVisualElement, Boolean)
Calculates the border thickness for a LightVisualElement based on its border configuration and drawing state.
Declaration
public static Padding GetBorderThickness(LightVisualElement element, bool checkDrawBorder)
Parameters
|
LightVisualElement
element
The LightVisualElement instance to calculate border thickness for. |
|
System.Boolean
checkDrawBorder
When true, returns zero thickness if DrawBorder is false; otherwise ignores the drawing state. |
Returns
|
System.Windows.Forms.Padding
A System.Windows.Forms.Padding structure representing the calculated border thickness for all sides. |
GetClientOffset(Boolean)
Calculates the client area offset by combining padding and optionally border thickness.
Declaration
protected virtual Padding GetClientOffset(bool includeBorder)
Parameters
|
System.Boolean
includeBorder
When true, includes border thickness in the offset calculation. |
Returns
|
System.Windows.Forms.Padding
A System.Windows.Forms.Padding structure representing the total client area offset. |
GetClientRectangle(Boolean, SizeF)
Calculates the client rectangle area available for content within the element bounds, optionally including border space.
Declaration
protected virtual RectangleF GetClientRectangle(bool includeBorder, SizeF finalSize)
Parameters
|
System.Boolean
includeBorder
When true, accounts for border thickness in the client rectangle calculation. |
|
System.Drawing.SizeF
finalSize
The total size of the element from which to calculate the client rectangle. |
Returns
|
System.Drawing.RectangleF
A System.Drawing.RectangleF representing the available client area for content. |
GetClientRectangle(SizeF)
Declaration
protected override RectangleF GetClientRectangle(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
|
Returns
|
System.Drawing.RectangleF
|
Overrides
GetClipRect()
Calculates the clipping rectangle for this element, taking into account border thickness and padding.
Declaration
protected override RectangleF GetClipRect()
Returns
|
System.Drawing.RectangleF
A System.Drawing.RectangleF representing the clipping bounds for content rendering. |
Overrides
GetFaceRectangle()
Declaration
public RectangleF GetFaceRectangle()
Returns
|
System.Drawing.RectangleF
|
Implements
GetImageDrawTypeLocalValue()
Declaration
protected ImageDrawType? GetImageDrawTypeLocalValue()
Returns
|
System.Nullable<ImageDrawType>
|
GetPaintingBorderWidth()
Declaration
public override float GetPaintingBorderWidth()
Returns
|
System.Single
|
Overrides
GetStylablePropertiesFilter()
GetTextAlignment()
Declaration
protected ContentAlignment GetTextAlignment()
Returns
|
System.Drawing.ContentAlignment
|
GetTextAlignment(ContentAlignment)
Declaration
protected ContentAlignment GetTextAlignment(ContentAlignment textAlignment)
Parameters
|
System.Drawing.ContentAlignment
textAlignment
|
Returns
|
System.Drawing.ContentAlignment
|
GetTextSize(SizeF, TextParams)
Calculates the size required to display the text content within the proposed size constraints.
Declaration
public SizeF GetTextSize(SizeF proposedSize, TextParams textParams)
Parameters
|
System.Drawing.SizeF
proposedSize
The proposed size constraints for the text measurement. |
|
TextParams
textParams
The text parameters containing formatting and display options. |
Returns
|
System.Drawing.SizeF
A System.Drawing.SizeF representing the calculated text size. |
Implements
GetTextSize(TextParams)
Calculates the size required to display the text content using the specified text parameters.
Declaration
public SizeF GetTextSize(TextParams textParams)
Parameters
|
TextParams
textParams
The text parameters containing formatting and display options. |
Returns
|
System.Drawing.SizeF
A System.Drawing.SizeF representing the calculated text size. |
Implements
InitializeFields()
Initializes the internal fields and components of the LightVisualElement. This method sets up text primitives, image primitives, and layout management components.
Declaration
protected override void InitializeFields()
Overrides
MapStyleProperty(RadProperty, String)
Declaration
public override RadProperty MapStyleProperty(RadProperty propertyToMap, string settingType)
Parameters
|
RadProperty
propertyToMap
|
|
System.String
settingType
|
Returns
|
RadProperty
|
Overrides
MeasureElements(SizeF, SizeF, Padding)
Measures all child elements when auto-sizing is enabled, calculating the space required for child elements.
Declaration
protected virtual SizeF MeasureElements(SizeF availableSize, SizeF clientSize, Padding borderThickness)
Parameters
|
System.Drawing.SizeF
availableSize
The available space that a parent element can allocate. |
|
System.Drawing.SizeF
clientSize
The client area size available for content. |
|
System.Windows.Forms.Padding
borderThickness
The thickness of the border that affects available space. |
Returns
|
System.Drawing.SizeF
The desired size needed to accommodate all child elements. |
MeasureOverride(SizeF)
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available space that a parent element can allocate to this element. |
Returns
|
System.Drawing.SizeF
The desired size of the element including content, padding, and border space. |
Overrides
MeasureOverride(SizeF, TextParams)
Measures the desired size of the text content given the available space and text parameters.
Declaration
public SizeF MeasureOverride(SizeF availableSize, TextParams textParams)
Parameters
|
System.Drawing.SizeF
availableSize
The available space for measuring the text content. |
|
TextParams
textParams
The text parameters containing formatting and display options. |
Returns
|
System.Drawing.SizeF
A System.Drawing.SizeF representing the desired size of the text content. |
Implements
OnAnimatedImageFrameChanged()
Called when animated image frame changes.
Declaration
protected virtual void OnAnimatedImageFrameChanged()
OnBitStateChanged(Int64, Boolean, Boolean)
Handles state changes for bit flags, particularly managing text primitive implementation when HTML rendering is disabled.
Declaration
protected override void OnBitStateChanged(long key, bool oldValue, bool newValue)
Parameters
|
System.Int64
key
The bit flag key that was changed. |
|
System.Boolean
oldValue
The previous value of the bit flag. |
|
System.Boolean
newValue
The new value of the bit flag. |
Overrides
OnLoaded()
OnMouseMove(Object, MouseEventArgs)
Handles mouse movement events for the text primitive, enabling text interaction features.
Declaration
public void OnMouseMove(object sender, MouseEventArgs e)
Parameters
|
System.Object
sender
The source of the mouse move event. |
|
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.MouseEventArgs containing event data. |
Implements
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
|
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
|
RadPropertyChangedEventArgs
e
|
Overrides
OnTunnelEvent(RadElement, RoutedEventArgs)
Declaration
protected override void OnTunnelEvent(RadElement sender, RoutedEventArgs args)
Parameters
|
RadElement
sender
|
|
RoutedEventArgs
args
|
Overrides
PaintBackgroundImage(IGraphics)
Renders the background image of the element according to the specified BackgroundImageLayout setting.
Declaration
protected virtual void PaintBackgroundImage(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for rendering the background image. |
PaintContent(IGraphics)
Orchestrates the painting of all content elements including background image, main image or SVG image, and text.
Declaration
protected virtual void PaintContent(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for rendering content. |
PaintElement(IGraphics, Single, SizeF)
Performs the main painting operation for the element, rendering fill, content, and border in the correct order.
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
Parameters
|
IGraphics
graphics
The graphics context used for rendering. |
|
System.Single
angle
The rotation angle to apply during painting. |
|
System.Drawing.SizeF
scale
The scaling factor to apply during painting. |
Overrides
PaintImage(IGraphics)
Renders the main image of the element, handling image animation and thread-safe access to the cached image.
Declaration
protected virtual void PaintImage(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for rendering the image. |
PaintPrimitive(IGraphics, Single, SizeF, TextParams)
Paints the text primitive with the specified graphics context, transformation, and text parameters.
Declaration
public void PaintPrimitive(IGraphics graphics, float angle, SizeF scale, TextParams textParams)
Parameters
|
IGraphics
graphics
The graphics context used for painting. |
|
System.Single
angle
The rotation angle to apply during painting. |
|
System.Drawing.SizeF
scale
The scale factor to apply during painting. |
|
TextParams
textParams
The text parameters containing formatting and display options. |
Implements
PaintPrimitive(IGraphics, TextParams)
Paints the text primitive with the specified graphics context and text parameters.
Declaration
public void PaintPrimitive(IGraphics graphics, TextParams textParams)
Parameters
|
IGraphics
graphics
The graphics context used for painting. |
|
TextParams
textParams
The text parameters containing formatting and display options. |
Implements
PaintSvgImage(IGraphics)
Renders the SVG image of the element when an SvgImage is available and image drawing is enabled.
Declaration
protected virtual void PaintSvgImage(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for rendering the SVG image. |
PaintText(IGraphics)
Renders the text content of the element, including horizontal line effects when enabled.
Declaration
protected virtual void PaintText(IGraphics graphics)
Parameters
|
IGraphics
graphics
The graphics context used for rendering text. |
PaintTextCore(IGraphics)
ShouldSerializeProperty(PropertyDescriptor)
Declaration
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
Parameters
|
System.ComponentModel.PropertyDescriptor
property
|
Returns
|
System.Nullable<System.Boolean>
|
Overrides
ToggleTextPrimitive(RadProperty)
Toggles the text primitive when text related properties are change.
Declaration
protected virtual void ToggleTextPrimitive(RadProperty property)
Parameters
|
RadProperty
property
The changed property. |