menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Primitive - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Primitive

    Represents primitive that can be displayed in GradientPanelExt.

    Inheritance
    System.Object
    Primitive
    CollapsePrimitive
    HostPrimitive
    ImagePrimitive
    TextPrimitive
    Implements
    System.ICloneable
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class Primitive : Component, ICloneable
    Remarks

    In order to display the Primitive, you must add it to the Primitive property of GradientPanelExt. This is normally achieved using simple drag-and-drop during design-time.

    The Primitive class provides properties that enable you to configure the appearance, behavior abd layoutof a primitive. For selecting a primitive you must click on it. You can change BorderColor,BackColor and PrimitiveBorderStyle. You can define Position of the Primitive in GradientPanel, Alignment inside GradientPanelExt.

    Constructors

    Primitive()

    Declaration
    public Primitive()

    Primitive(GradientPanelExt)

    Declaration
    public Primitive(GradientPanelExt owner)
    Parameters
    Type Name Description
    GradientPanelExt owner

    Primitive(Size, GradientPanelExt)

    Declaration
    public Primitive(Size size, GradientPanelExt owner)
    Parameters
    Type Name Description
    System.Drawing.Size size
    GradientPanelExt owner

    Primitive(Size, Int32, GradientPanelExt)

    Declaration
    public Primitive(Size size, int position, GradientPanelExt owner)
    Parameters
    Type Name Description
    System.Drawing.Size size
    System.Int32 position
    GradientPanelExt owner

    Fields

    c_primitiveSize

    Default size for primitive.

    Declaration
    protected static readonly Size c_primitiveSize
    Field Value
    Type
    System.Drawing.Size

    Properties

    Alignment

    Gets or set alignment of the primitive.

    Declaration
    public Alignment Alignment { get; set; }
    Property Value
    Type
    Alignment

    BackColor

    Gets or sets background color for primitive.

    Declaration
    public Color BackColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    BorderColor

    Gets or sets border color for primitive.

    Declaration
    public Color BorderColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ClientRect

    Gets rectangle of drawing primitive.

    Declaration
    protected Rectangle ClientRect { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    Position

    Gets or sets position of the primitive.

    Declaration
    public int Position { get; set; }
    Property Value
    Type
    System.Int32

    PrimitiveBorderStyle

    Gets or sets border style for primitive.

    Declaration
    public PrimitiveBorderStyle PrimitiveBorderStyle { get; set; }
    Property Value
    Type
    PrimitiveBorderStyle

    Size

    Gets or sets size of the primitive.

    Declaration
    public Size Size { get; set; }
    Property Value
    Type
    System.Drawing.Size

    Visible

    Gets or sets a value indicating whether the primitive is displayed.

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    Clone()

    Declaration
    public virtual object Clone()
    Returns
    Type
    System.Object

    Draw(Graphics)

    Draws primitive.

    Declaration
    public void Draw(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    DrawBackground(Graphics)

    Draws primitive.

    Declaration
    protected virtual void DrawBackground(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    DrawBorder(Graphics, PrimitiveBorderStyle)

    Draws border for primitive.

    Declaration
    protected virtual void DrawBorder(Graphics g, PrimitiveBorderStyle style)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    PrimitiveBorderStyle style

    DrawSelectedBorder(Graphics)

    Draws border for selected primitive in the designer.

    Declaration
    protected void DrawSelectedBorder(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    GetCenter()

    Gets center of the primitive.

    Declaration
    public Point GetCenter()
    Returns
    Type
    System.Drawing.Point

    Invalidate()

    Redraws primitive.

    Declaration
    public void Invalidate()

    OnAlignmentChanged()

    Declaration
    protected virtual void OnAlignmentChanged()

    OnBackColorChanged()

    Declaration
    protected virtual void OnBackColorChanged()

    OnBorderColorChanged()

    Declaration
    protected virtual void OnBorderColorChanged()

    OnBoundsChanged()

    Declaration
    protected virtual void OnBoundsChanged()

    OnMouseDown(MouseEventArgs)

    Declaration
    protected virtual void OnMouseDown(MouseEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs args

    OnMouseMove(MouseEventArgs)

    Declaration
    protected virtual void OnMouseMove(MouseEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs args

    OnOwnerControlChanged()

    Declaration
    protected virtual void OnOwnerControlChanged()

    OnPositionChanged()

    Declaration
    protected virtual void OnPositionChanged()

    OnPrimitiveBorderStyleChanged()

    Declaration
    protected virtual void OnPrimitiveBorderStyleChanged()

    OnSelectedChanged()

    Declaration
    protected virtual void OnSelectedChanged()

    OnSizeChanged()

    Declaration
    protected virtual void OnSizeChanged()

    OnVisibleChanged()

    Declaration
    protected virtual void OnVisibleChanged()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type
    System.String

    Events

    AlignmentChanged

    Raise by OnAlignmentChanged() method.

    Declaration
    public event EventHandler AlignmentChanged
    Event Type
    Type
    System.EventHandler

    BackColorChanged

    Raise by OnBackColorChanged() method.

    Declaration
    public event EventHandler BackColorChanged
    Event Type
    Type
    System.EventHandler

    BorderColorChanged

    Raise by OnBorderColorChanged() method.

    Declaration
    public event EventHandler BorderColorChanged
    Event Type
    Type
    System.EventHandler

    BoundsChanged

    Raise by OnBoundsChanged() method.

    Declaration
    public event EventHandler BoundsChanged
    Event Type
    Type
    System.EventHandler

    MouseDown

    Raise by OnMouseDown(MouseEventArgs) method.

    Declaration
    public event MouseEventHandler MouseDown
    Event Type
    Type
    System.Windows.Forms.MouseEventHandler

    MouseMove

    Raise by OnMouseMove(MouseEventArgs) method.

    Declaration
    public event MouseEventHandler MouseMove
    Event Type
    Type
    System.Windows.Forms.MouseEventHandler

    OwnerControlChanged

    Raise by OnOwnerControlChanged() method.

    Declaration
    public event EventHandler OwnerControlChanged
    Event Type
    Type
    System.EventHandler

    PositionChanged

    Raise by OnPositionChanged() method.

    Declaration
    public event EventHandler PositionChanged
    Event Type
    Type
    System.EventHandler

    PrimitiveBorderStyleChanged

    Raise by OnPrimitiveBorderStyleChanged() method.

    Declaration
    public event EventHandler PrimitiveBorderStyleChanged
    Event Type
    Type
    System.EventHandler

    PropertyChanged

    Raise by method.

    Declaration
    public event EventHandler PropertyChanged
    Event Type
    Type
    System.EventHandler

    SizeChanged

    Raise by OnSizeChanged() method.

    Declaration
    public event EventHandler SizeChanged
    Event Type
    Type
    System.EventHandler

    VisibleChanged

    Raise by OnVisibleChanged() method.

    Declaration
    public event EventHandler VisibleChanged
    Event Type
    Type
    System.EventHandler

    Implements

    System.ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved