WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class AnchoringPrimitive - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class AnchoringPrimitive

    Base class for node's primitives like ControlPoint, EndPoint, ConnectionPoint etc.

    Inheritance
    System.Object
    PropertyContainer
    AnchoringPrimitive
    ConnectionPoint
    Label
    Implements
    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Inherited Members
    PropertyContainer.m_propertyObserver
    PropertyContainer.UpdateServiceReferences(IServiceReferenceProvider)
    PropertyContainer.ProvideServiceReference(RuntimeTypeHandle)
    PropertyContainer.OnPropertyChanging(String, Object)
    PropertyContainer.OnPropertyChanged(String)
    PropertyContainer.GetPropertyContainerByName(String)
    PropertyContainer.GetPropertyContainerName()
    PropertyContainer.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
    PropertyContainer.Clone()
    PropertyContainer.IPropertyObserver.OnPropertyChanging(String, String, Object)
    PropertyContainer.IPropertyObserver.OnPropertyChanged(String, String)
    PropertyContainer.PropertyObserber
    PropertyContainer.MeasureUnit
    PropertyContainer.InheritContainerMeasureUnits
    PropertyContainer.HistoryService
    PropertyContainer.FullContainerName
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public abstract class AnchoringPrimitive : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable

    Constructors

    AnchoringPrimitive()

    Initializes a new instance of the AnchoringPrimitive class.

    Declaration
    public AnchoringPrimitive()

    AnchoringPrimitive(AnchoringPrimitive)

    Initializes a new instance of the AnchoringPrimitive class.

    Declaration
    public AnchoringPrimitive(AnchoringPrimitive src)
    Parameters
    Type Name Description
    AnchoringPrimitive src

    The source instance.

    AnchoringPrimitive(Node)

    Initializes a new instance of the AnchoringPrimitive class.

    Declaration
    public AnchoringPrimitive(Node container)
    Parameters
    Type Name Description
    Node container

    The primitive container node.

    AnchoringPrimitive(Node, Position)

    Initializes a new instance of the AnchoringPrimitive class.

    Declaration
    public AnchoringPrimitive(Node container, Position position)
    Parameters
    Type Name Description
    Node container

    The primitive container node.

    Position position

    The primitive position relative to its container.

    AnchoringPrimitive(SerializationInfo, StreamingContext)

    Initializes a new instance of the AnchoringPrimitive class.

    Declaration
    public AnchoringPrimitive(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The serialization info.

    System.Runtime.Serialization.StreamingContext context

    The serialization context.

    Properties

    Container

    Gets or sets the container node of primitive.

    Declaration
    public Node Container { get; set; }
    Property Value
    Type Description
    Node

    The container.

    ID

    Gets or sets the unique AnchoringPrimitive ID.

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

    The unique ID.

    OffsetX

    Gets or sets AnchoringPrimitive offset in percents relative to its container's width from container's top left point.

    Declaration
    public float OffsetX { get; set; }
    Property Value
    Type Description
    System.Single

    OffsetY

    Gets or sets AnchoringPrimitive offset in percents relative to its container's height from container's top left point.

    Declaration
    public float OffsetY { get; set; }
    Property Value
    Type Description
    System.Single

    Position

    Gets or sets the position of primitive in local coordinates.

    Declaration
    public Position Position { get; set; }
    Property Value
    Type Description
    Position

    The position relative to its container.

    Methods

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    PropertyContainer.Dispose()

    Draw(Graphics)

    Draws primitive to the specified graphics.

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

    Graphics to draw on.

    Remarks

    Call the abstract method - Render(Graphics gfx).

    GetObjectData(SerializationInfo, StreamingContext)

    Gets the object data to serialize instance.

    Declaration
    protected override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    The serialization info.

    System.Runtime.Serialization.StreamingContext context

    The serialization context.

    Overrides
    PropertyContainer.GetObjectData(SerializationInfo, StreamingContext)

    GetPosition()

    Gets the primitive object position in local coordinates.

    Declaration
    public virtual PointF GetPosition()
    Returns
    Type Description
    System.Drawing.PointF

    Position of primitive in local coordinates.

    InvokeUpdateCallback()

    Invokes the update refresh rectangle callback. Used for update refresh rectangle for container by calling prospected non-parameter method UpdateRefreshRect().

    Declaration
    protected void InvokeUpdateCallback()

    OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)

    Convert to required measurement units

    Declaration
    protected override void OnMeasureUnitsChanging(MeasureUnits from, MeasureUnits to)
    Parameters
    Type Name Description
    MeasureUnits from
    MeasureUnits to
    Overrides
    PropertyContainer.OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)

    PositionChange(Single, Single)

    Calling when primitive position is changed.

    Declaration
    protected virtual void PositionChange(float fOffsetX, float fOffsetY)
    Parameters
    Type Name Description
    System.Single fOffsetX

    The offset by X axis.

    System.Single fOffsetY

    The offset by Y axis.

    RecordPropertyChanged(String)

    Records the property changed.

    Declaration
    protected override void RecordPropertyChanged(string strPropertyName)
    Parameters
    Type Name Description
    System.String strPropertyName

    Name of the changed property.

    Overrides
    PropertyContainer.RecordPropertyChanged(String)

    Render(Graphics)

    Renders the primitive object to specified graphics.

    Declaration
    protected abstract void Render(Graphics gfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics gfx

    Graphics to draw on.

    Implements

    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved