ClassBasePrimitive
Represents the base class for all primitive elements in the Telerik WinControls framework.
Definition
Namespace:Telerik.WinControls.Primitives
Assembly:Telerik.WinControls.dll
Syntax:
[TypeConverter(typeof(ExpandableObjectConverter))]
public class BasePrimitive : VisualElement, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementBasePrimitive
Derived Classes:
Implements:
Inherited Members
Constructors
BasePrimitive()
Declaration
public BasePrimitive()
Fields
Properties
IsEmpty
Gets a value indicating whether the primitive has visual content to render.
Declaration
[Browsable(false)]
public virtual bool IsEmpty { get; }
Property Value
true if the primitive has no content and should not be painted; otherwise, false.
The default implementation returns false, indicating the primitive has content.
Remarks
This property is used for optimization purposes to avoid unnecessary painting operations when a primitive has no visual content to display.
Methods
InitializeFields()
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
Declaration
protected override void InitializeFields()
Overrides
PaintElement(IGraphics, float, SizeF)
Paints the element's background and calls the base implementation to paint child elements.
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
Parameters
graphics
The graphics object used for painting.
angle
The rotation angle to apply during painting.
scale
The scale factor to apply during painting.
Overrides
PaintPrimitive(IGraphics, float, SizeF)
When overridden in a derived class, performs the actual painting of the primitive.
Declaration
public virtual void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters
graphics
The IGraphics object used for painting operations.
angle
The rotation angle in degrees to apply during painting.
scale
The scaling factor to apply during painting.
Implements
Remarks
This is the core method that derived primitive classes must override to implement their specific rendering logic. The base implementation is empty and should be overridden.