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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class UIItemBase : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBase...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the UIItemBase class with default settings.
protected UIItemBase()
Properties
Gets or sets the second color used in gradient fill effects.
public abstract Color BackColor2 { get; set; }
Implements:
Gets or sets the third color used in multi-color gradient fill effects.
public abstract Color BackColor3 { get; set; }
Implements:
Gets or sets the fourth color used in multi-color gradient fill effects.
public abstract Color BackColor4 { get; set; }
Implements:
Gets or sets the color of the bottom border when using individual border configuration.
public abstract Color BorderBottomColor { get; set; }
Gets or sets the shadow color for the bottom border, providing visual depth effects.
public abstract Color BorderBottomShadowColor { get; set; }
Gets or sets the width of the bottom border when using individual border configuration.
public abstract float BorderBottomWidth { get; set; }
Gets or sets the border box style that determines how the border is rendered and configured.
public abstract BorderBoxStyle BorderBoxStyle { get; set; }
Gets or sets the primary border color used for solid borders or as the first color in gradient border effects.
public abstract Color BorderColor { get; set; }
Gets or sets the second color used in gradient border effects.
public abstract Color BorderColor2 { get; set; }
Gets or sets the third color used in multi-color gradient border effects.
public abstract Color BorderColor3 { get; set; }
Gets or sets the fourth color used in multi-color gradient border effects.
public abstract Color BorderColor4 { get; set; }
Gets or sets the custom dash pattern for border lines when using custom dash styles.
public abstract float[] BorderDashPattern { get; set; }
Implements:
Gets or sets the dash style for border lines, determining whether borders are solid, dashed, dotted, etc.
public abstract DashStyle BorderDashStyle { get; set; }
Implements:
Gets or sets the border drawing mode that controls the order in which border lines are drawn when using four borders.
public abstract BorderDrawModes BorderDrawMode { get; set; }
Implements:
Gets or sets the angle in degrees for gradient border effects.
public abstract float BorderGradientAngle { get; set; }
Gets or sets the gradient style used for rendering gradient border effects.
public abstract GradientStyles BorderGradientStyle { get; set; }
Gets or sets the primary inner border color used in composite border styles.
public abstract Color BorderInnerColor { get; set; }
Gets or sets the second inner border color used in gradient inner border effects.
public abstract Color BorderInnerColor2 { get; set; }
Gets or sets the third inner border color used in multi-color gradient inner border effects.
public abstract Color BorderInnerColor3 { get; set; }
Gets or sets the fourth inner border color used in multi-color gradient inner border effects.
public abstract Color BorderInnerColor4 { get; set; }
Gets or sets the color of the left border when using individual border configuration.
public abstract Color BorderLeftColor { get; set; }
Gets or sets the shadow color for the left border, providing visual depth effects.
public abstract Color BorderLeftShadowColor { get; set; }
Gets or sets the width of the left border when using individual border configuration.
public abstract float BorderLeftWidth { get; set; }
Gets or sets the color of the right border when using individual border configuration.
public abstract Color BorderRightColor { get; set; }
Gets or sets the shadow color for the right border, providing visual depth effects.
public abstract Color BorderRightShadowColor { get; set; }
Gets or sets the width of the right border when using individual border configuration.
public abstract float BorderRightWidth { get; set; }
Gets or sets the color of the top border when using individual border configuration.
public abstract Color BorderTopColor { get; set; }
Gets or sets the shadow color for the top border, providing visual depth effects.
public abstract Color BorderTopShadowColor { get; set; }
Gets or sets the width of the top border when using individual border configuration.
public abstract float BorderTopWidth { get; set; }
Gets or sets the uniform width of all border sides when using single border configuration.
public abstract float BorderWidth { get; set; }
Gets or sets a value indicating whether the element should render its border during painting operations.
public abstract bool DrawBorder { get; set; }
Gets or sets a value indicating whether the element should render its background fill during painting operations.
public abstract bool DrawFill { get; set; }
Implements:
Gets or sets the angle in degrees for gradient fill effects.
public abstract float GradientAngle { get; set; }
Implements:
Gets or sets the first gradient percentage for controlling color distribution in gradient fill effects.
public abstract float GradientPercentage { get; set; }
Implements:
Gets or sets the second gradient percentage for controlling color distribution in gradient fill effects.
public abstract float GradientPercentage2 { get; set; }
Implements:
Gets or sets the gradient style that determines how colors are blended in gradient fill effects.
public abstract GradientStyles GradientStyle { get; set; }
Implements:
Gets or sets the number of colors to use in gradient fill effects.
public abstract int NumberOfColors { get; set; }
Implements:
Methods
Releases managed resources used by this element.
protected override void DisposeManagedResources()
Overrides:
Calculates the rectangle area that should be used for painting the border of the element, considering border width and scaling factors.
protected virtual RectangleF GetBorderPaintRect(float angle, SizeF scale)
The rotation angle in degrees to consider for rectangle calculation.
scaleSizeFThe scaling factors to consider for rectangle calculation.
Returns:A RectangleF representing the area where the border should be painted.
Calculates the rectangle area that should be used for painting the background fill of the element.
protected virtual RectangleF GetFillPaintRect(float angle, SizeF scale)
The rotation angle in degrees to consider for rectangle calculation.
scaleSizeFThe scaling factors to consider for rectangle calculation.
Returns:A RectangleF representing the area where the background fill should be painted.
Gets the border width that should be used for painting operations, typically inherited from the parent element.
public virtual float GetPaintingBorderWidth()
The border width in pixels, or 0 if no parent element is available.
Handles the bounds changed event by updating the fill primitive implementation and invoking the base class handler.
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
Event arguments containing information about the property change, including the old bounds value.
Overrides:
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Event arguments containing information about the property that changed.
Overrides:
Renders the border of the element within the specified rectangle using the provided graphics context, rotation angle, and scaling factor.
protected virtual void PaintBorder(IGraphics graphics, float angle, SizeF scale, RectangleF preferedRectangle)
The graphics context used for painting operations.
anglefloatThe rotation angle in degrees to apply during painting.
scaleSizeFThe scaling factors to apply for width and height during painting.
preferedRectangleRectangleFThe specific rectangle area where the border should be painted.
Renders the border of the element using the specified graphics context, rotation angle, and scaling factor.
protected virtual void PaintBorder(IGraphics graphics, float angle, SizeF scale)
The graphics context used for painting operations.
anglefloatThe rotation angle in degrees to apply during painting.
scaleSizeFThe scaling factors to apply for width and height during painting.
Renders the background fill of the element within the specified rectangle using the provided graphics context, rotation angle, and scaling factor.
protected virtual void PaintFill(IGraphics graphics, float angle, SizeF scale, RectangleF prefferedRectangle)
The graphics context used for painting operations.
anglefloatThe rotation angle in degrees to apply during painting.
scaleSizeFThe scaling factors to apply for width and height during painting.
prefferedRectangleRectangleFThe specific rectangle area where the background fill should be painted.
Renders the background fill of the element using the specified graphics context, rotation angle, and scaling factor.
protected virtual void PaintFill(IGraphics graphics, float angle, SizeF scale)
The graphics context used for painting operations.
anglefloatThe rotation angle in degrees to apply during painting.
scaleSizeFThe scaling factors to apply for width and height during painting.