Class UIItemBase
Provides an abstract base class for UI items used in various Telerik controls such as RadTreeView, RadPanelBar, and RadCalendar. This class incorporates essential functionality for painting gradient backgrounds and borders, similar to FillPrimitive and BorderPrimitive, while implementing multiple interfaces for comprehensive visual element support.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public abstract class UIItemBase : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement
Constructors
UIItemBase()
Initializes a new instance of the UIItemBase class with default settings.
Declaration
protected UIItemBase()
Properties
BackColor2
Gets or sets the second color used in gradient fill effects.
Declaration
public abstract Color BackColor2 { get; set; }
Property Value
|
System.Drawing.Color
|
Implements
BackColor3
Gets or sets the third color used in multi-color gradient fill effects.
Declaration
public abstract Color BackColor3 { get; set; }
Property Value
|
System.Drawing.Color
|
Implements
BackColor4
Gets or sets the fourth color used in multi-color gradient fill effects.
Declaration
public abstract Color BackColor4 { get; set; }
Property Value
|
System.Drawing.Color
|
Implements
BorderBottomColor
Gets or sets the color of the bottom border when using individual border configuration.
Declaration
public abstract Color BorderBottomColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderBottomShadowColor
Gets or sets the shadow color for the bottom border, providing visual depth effects.
Declaration
public abstract Color BorderBottomShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderBottomWidth
Gets or sets the width of the bottom border when using individual border configuration.
Declaration
public abstract float BorderBottomWidth { get; set; }
Property Value
|
System.Single
|
BorderBoxStyle
Gets or sets the border box style that determines how the border is rendered and configured.
Declaration
public abstract BorderBoxStyle BorderBoxStyle { get; set; }
Property Value
|
BorderBoxStyle
|
BorderColor
Gets or sets the primary border color used for solid borders or as the first color in gradient border effects.
Declaration
public abstract Color BorderColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderColor2
Gets or sets the second color used in gradient border effects.
Declaration
public abstract Color BorderColor2 { get; set; }
Property Value
|
System.Drawing.Color
|
BorderColor3
Gets or sets the third color used in multi-color gradient border effects.
Declaration
public abstract Color BorderColor3 { get; set; }
Property Value
|
System.Drawing.Color
|
BorderColor4
Gets or sets the fourth color used in multi-color gradient border effects.
Declaration
public abstract Color BorderColor4 { get; set; }
Property Value
|
System.Drawing.Color
|
BorderDashPattern
Gets or sets the custom dash pattern for border lines when using custom dash styles.
Declaration
public abstract float[] BorderDashPattern { get; set; }
Property Value
|
System.Single[]
|
Implements
BorderDashStyle
Gets or sets the dash style for border lines, determining whether borders are solid, dashed, dotted, etc.
Declaration
public abstract DashStyle BorderDashStyle { get; set; }
Property Value
|
System.Drawing.Drawing2D.DashStyle
|
Implements
BorderDrawMode
Gets or sets the border drawing mode that controls the order in which border lines are drawn when using four borders.
Declaration
public abstract BorderDrawModes BorderDrawMode { get; set; }
Property Value
|
BorderDrawModes
|
Implements
BorderGradientAngle
Gets or sets the angle in degrees for gradient border effects.
Declaration
public abstract float BorderGradientAngle { get; set; }
Property Value
|
System.Single
|
BorderGradientStyle
Gets or sets the gradient style used for rendering gradient border effects.
Declaration
public abstract GradientStyles BorderGradientStyle { get; set; }
Property Value
|
GradientStyles
|
BorderInnerColor
Gets or sets the primary inner border color used in composite border styles.
Declaration
public abstract Color BorderInnerColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderInnerColor2
Gets or sets the second inner border color used in gradient inner border effects.
Declaration
public abstract Color BorderInnerColor2 { get; set; }
Property Value
|
System.Drawing.Color
|
BorderInnerColor3
Gets or sets the third inner border color used in multi-color gradient inner border effects.
Declaration
public abstract Color BorderInnerColor3 { get; set; }
Property Value
|
System.Drawing.Color
|
BorderInnerColor4
Gets or sets the fourth inner border color used in multi-color gradient inner border effects.
Declaration
public abstract Color BorderInnerColor4 { get; set; }
Property Value
|
System.Drawing.Color
|
BorderLeftColor
Gets or sets the color of the left border when using individual border configuration.
Declaration
public abstract Color BorderLeftColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderLeftShadowColor
Gets or sets the shadow color for the left border, providing visual depth effects.
Declaration
public abstract Color BorderLeftShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderLeftWidth
Gets or sets the width of the left border when using individual border configuration.
Declaration
public abstract float BorderLeftWidth { get; set; }
Property Value
|
System.Single
|
BorderRightColor
Gets or sets the color of the right border when using individual border configuration.
Declaration
public abstract Color BorderRightColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderRightShadowColor
Gets or sets the shadow color for the right border, providing visual depth effects.
Declaration
public abstract Color BorderRightShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderRightWidth
Gets or sets the width of the right border when using individual border configuration.
Declaration
public abstract float BorderRightWidth { get; set; }
Property Value
|
System.Single
|
BorderTopColor
Gets or sets the color of the top border when using individual border configuration.
Declaration
public abstract Color BorderTopColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderTopShadowColor
Gets or sets the shadow color for the top border, providing visual depth effects.
Declaration
public abstract Color BorderTopShadowColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderTopWidth
Gets or sets the width of the top border when using individual border configuration.
Declaration
public abstract float BorderTopWidth { get; set; }
Property Value
|
System.Single
|
BorderWidth
Gets or sets the uniform width of all border sides when using single border configuration.
Declaration
public abstract float BorderWidth { get; set; }
Property Value
|
System.Single
|
DrawBorder
Gets or sets a value indicating whether the element should render its border during painting operations.
Declaration
public abstract bool DrawBorder { get; set; }
Property Value
|
System.Boolean
|
DrawFill
Gets or sets a value indicating whether the element should render its background fill during painting operations.
Declaration
public abstract bool DrawFill { get; set; }
Property Value
|
System.Boolean
|
Implements
GradientAngle
Gets or sets the angle in degrees for gradient fill effects.
Declaration
public abstract float GradientAngle { get; set; }
Property Value
|
System.Single
|
Implements
GradientPercentage
Gets or sets the first gradient percentage for controlling color distribution in gradient fill effects.
Declaration
public abstract float GradientPercentage { get; set; }
Property Value
|
System.Single
|
Implements
GradientPercentage2
Gets or sets the second gradient percentage for controlling color distribution in gradient fill effects.
Declaration
public abstract float GradientPercentage2 { get; set; }
Property Value
|
System.Single
|
Implements
GradientStyle
Gets or sets the gradient style that determines how colors are blended in gradient fill effects.
Declaration
public abstract GradientStyles GradientStyle { get; set; }
Property Value
|
GradientStyles
|
Implements
NumberOfColors
Gets or sets the number of colors to use in gradient fill effects.
Declaration
public abstract int NumberOfColors { get; set; }
Property Value
|
System.Int32
|
Implements
Methods
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
GetBorderPaintRect(Single, SizeF)
Calculates the rectangle area that should be used for painting the border of the element, considering border width and scaling factors.
Declaration
protected virtual RectangleF GetBorderPaintRect(float angle, SizeF scale)
Parameters
|
System.Single
angle
The rotation angle in degrees to consider for rectangle calculation. |
|
System.Drawing.SizeF
scale
The scaling factors to consider for rectangle calculation. |
Returns
|
System.Drawing.RectangleF
A System.Drawing.RectangleF representing the area where the border should be painted. |
GetFillPaintRect(Single, SizeF)
Calculates the rectangle area that should be used for painting the background fill of the element.
Declaration
protected virtual RectangleF GetFillPaintRect(float angle, SizeF scale)
Parameters
|
System.Single
angle
The rotation angle in degrees to consider for rectangle calculation. |
|
System.Drawing.SizeF
scale
The scaling factors to consider for rectangle calculation. |
Returns
|
System.Drawing.RectangleF
A System.Drawing.RectangleF representing the area where the background fill should be painted. |
GetPaintingBorderWidth()
Gets the border width that should be used for painting operations, typically inherited from the parent element.
Declaration
public virtual float GetPaintingBorderWidth()
Returns
|
System.Single
The border width in pixels, or 0 if no parent element is available. |
OnBoundsChanged(RadPropertyChangedEventArgs)
Handles the bounds changed event by updating the fill primitive implementation and invoking the base class handler.
Declaration
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
Parameters
|
RadPropertyChangedEventArgs
e
Event arguments containing information about the property change, including the old bounds value. |
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
|
RadPropertyChangedEventArgs
e
Event arguments containing information about the property that changed. |
Overrides
PaintBorder(IGraphics, Single, SizeF)
Renders the border of the element using the specified graphics context, rotation angle, and scaling factor.
Declaration
protected virtual void PaintBorder(IGraphics graphics, float angle, SizeF scale)
Parameters
|
IGraphics
graphics
The graphics context used for painting operations. |
|
System.Single
angle
The rotation angle in degrees to apply during painting. |
|
System.Drawing.SizeF
scale
The scaling factors to apply for width and height during painting. |
PaintBorder(IGraphics, Single, SizeF, RectangleF)
Renders the border of the element within the specified rectangle using the provided graphics context, rotation angle, and scaling factor.
Declaration
protected virtual void PaintBorder(IGraphics graphics, float angle, SizeF scale, RectangleF preferedRectangle)
Parameters
|
IGraphics
graphics
The graphics context used for painting operations. |
|
System.Single
angle
The rotation angle in degrees to apply during painting. |
|
System.Drawing.SizeF
scale
The scaling factors to apply for width and height during painting. |
|
System.Drawing.RectangleF
preferedRectangle
The specific rectangle area where the border should be painted. |
PaintFill(IGraphics, Single, SizeF)
Renders the background fill of the element using the specified graphics context, rotation angle, and scaling factor.
Declaration
protected virtual void PaintFill(IGraphics graphics, float angle, SizeF scale)
Parameters
|
IGraphics
graphics
The graphics context used for painting operations. |
|
System.Single
angle
The rotation angle in degrees to apply during painting. |
|
System.Drawing.SizeF
scale
The scaling factors to apply for width and height during painting. |
PaintFill(IGraphics, Single, SizeF, RectangleF)
Renders the background fill of the element within the specified rectangle using the provided graphics context, rotation angle, and scaling factor.
Declaration
protected virtual void PaintFill(IGraphics graphics, float angle, SizeF scale, RectangleF prefferedRectangle)
Parameters
|
IGraphics
graphics
The graphics context used for painting operations. |
|
System.Single
angle
The rotation angle in degrees to apply during painting. |
|
System.Drawing.SizeF
scale
The scaling factors to apply for width and height during painting. |
|
System.Drawing.RectangleF
prefferedRectangle
The specific rectangle area where the background fill should be painted. |
ShouldUsePaintBuffer()
Determines whether the element should use a paint buffer for rendering operations to improve performance.
Declaration
protected virtual bool ShouldUsePaintBuffer()
Returns
|
System.Boolean
True if a paint buffer should be used; otherwise, false. The default implementation returns the value of DrawFill. |
Explicit Interface Implementations
IBoxStyle.BottomColor
Declaration
Color IBoxStyle.BottomColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxStyle.BottomShadowColor
Declaration
Color IBoxStyle.BottomShadowColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxStyle.LeftColor
Declaration
Color IBoxStyle.LeftColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxStyle.LeftShadowColor
Declaration
Color IBoxStyle.LeftShadowColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxStyle.RightColor
Declaration
Color IBoxStyle.RightColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxStyle.RightShadowColor
Declaration
Color IBoxStyle.RightShadowColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxStyle.TopColor
Declaration
Color IBoxStyle.TopColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxStyle.TopShadowColor
Declaration
Color IBoxStyle.TopShadowColor { get; set; }
Returns
|
System.Drawing.Color
|
Implements
IBoxElement.BorderSize
Declaration
SizeF IBoxElement.BorderSize { get; }
Returns
|
System.Drawing.SizeF
|
Implements
IBoxElement.BottomWidth
Declaration
float IBoxElement.BottomWidth { get; set; }
Returns
|
System.Single
|
Implements
IBoxElement.HorizontalWidth
Declaration
float IBoxElement.HorizontalWidth { get; }
Returns
|
System.Single
|
Implements
IBoxElement.LeftWidth
Declaration
float IBoxElement.LeftWidth { get; set; }
Returns
|
System.Single
|
Implements
IBoxElement.Offset
Declaration
SizeF IBoxElement.Offset { get; }
Returns
|
System.Drawing.SizeF
|
Implements
IBoxElement.RightWidth
Declaration
float IBoxElement.RightWidth { get; set; }
Returns
|
System.Single
|
Implements
IBoxElement.TopWidth
Declaration
float IBoxElement.TopWidth { get; set; }
Returns
|
System.Single
|
Implements
IBoxElement.VerticalWidth
Declaration
float IBoxElement.VerticalWidth { get; }
Returns
|
System.Single
|
Implements
IBoxElement.Width
Declaration
float IBoxElement.Width { get; set; }
Returns
|
System.Single
|
Implements
IBorderElement.BoxStyle
IBorderElement.ForeColor
Declaration
Color IBorderElement.ForeColor { get; }
Returns
|
System.Drawing.Color
|
Implements
IBorderElement.ForeColor2
Declaration
Color IBorderElement.ForeColor2 { get; }
Returns
|
System.Drawing.Color
|
Implements
IBorderElement.ForeColor3
Declaration
Color IBorderElement.ForeColor3 { get; }
Returns
|
System.Drawing.Color
|
Implements
IBorderElement.ForeColor4
Declaration
Color IBorderElement.ForeColor4 { get; }
Returns
|
System.Drawing.Color
|
Implements
IBorderElement.GradientAngle
Declaration
float IBorderElement.GradientAngle { get; }
Returns
|
System.Single
|
Implements
IBorderElement.GradientStyle
IBorderElement.InnerColor
Declaration
Color IBorderElement.InnerColor { get; }
Returns
|
System.Drawing.Color
|
Implements
IBorderElement.InnerColor2
Declaration
Color IBorderElement.InnerColor2 { get; }
Returns
|
System.Drawing.Color
|
Implements
IBorderElement.InnerColor3
Declaration
Color IBorderElement.InnerColor3 { get; }
Returns
|
System.Drawing.Color
|
Implements
IBorderElement.InnerColor4
Declaration
Color IBorderElement.InnerColor4 { get; }
Returns
|
System.Drawing.Color
|
Implements
IPrimitiveElement.BorderThickness
Declaration
float IPrimitiveElement.BorderThickness { get; }
Returns
|
System.Single
|
Implements
IPrimitiveElement.GetExactPaintingRectangle(Single, SizeF)
Declaration
RectangleF IPrimitiveElement.GetExactPaintingRectangle(float angle, SizeF scale)
Parameters
|
System.Single
angle
|
|
System.Drawing.SizeF
scale
|
Returns
|
System.Drawing.RectangleF
|
Implements
IPrimitiveElement.GetPaintRectangle(Single, Single, SizeF)
Declaration
RectangleF IPrimitiveElement.GetPaintRectangle(float left, float angle, SizeF scale)
Parameters
|
System.Single
left
|
|
System.Single
angle
|
|
System.Drawing.SizeF
scale
|
Returns
|
System.Drawing.RectangleF
|
Implements
IPrimitiveElement.IsDesignMode
Declaration
bool IPrimitiveElement.IsDesignMode { get; }
Returns
|
System.Boolean
|
Implements
IPrimitiveElement.ShouldUsePaintBuffer()
Declaration
bool IPrimitiveElement.ShouldUsePaintBuffer()
Returns
|
System.Boolean
|