menu

WinForms

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

    Show / Hide Table of Contents

    Class Decorator

    Base class for line decorators.

    Inheritance
    System.Object
    PropertyContainer
    Decorator
    HeadDecorator
    TailDecorator
    Implements
    IServiceReferenceHolder
    IServiceReferenceProvider
    IPropertyObserver
    IPropertyContainer
    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.IDisposable
    Inherited Members
    PropertyContainer.Clone()
    PropertyContainer.FullContainerName
    PropertyContainer.HistoryService
    PropertyContainer.InheritContainerMeasureUnits
    PropertyContainer.IPropertyObserver.OnPropertyChanged(String, String)
    PropertyContainer.IPropertyObserver.OnPropertyChanging(String, String, Object)
    PropertyContainer.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
    PropertyContainer.m_propertyObserver
    PropertyContainer.MeasureUnit
    PropertyContainer.OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)
    PropertyContainer.OnPropertyChanged(String)
    PropertyContainer.OnPropertyChanging(String, Object)
    PropertyContainer.PropertyObserber
    PropertyContainer.RecordPropertyChanged(String)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public abstract class Decorator : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable
    Remarks

    A line decorator is an object that adorns an endpoint of a line or other shape.

    Constructors

    Decorator()

    Default constructor.

    Declaration
    public Decorator()

    Decorator(Decorator)

    Copy constructor.

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

    Source object to copy.

    Decorator(GraphicsPath)

    Construct a line decorator given a graphics path for the visual.

    Declaration
    public Decorator(GraphicsPath grfxPath)
    Parameters
    Type Name Description
    System.Drawing.Drawing2D.GraphicsPath grfxPath

    Visual representation of the decorator.

    Decorator(SerializationInfo, StreamingContext)

    Serialization constructor for line decorators.

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

    Serialization state information.

    System.Runtime.Serialization.StreamingContext context

    Streaming context information.

    Properties

    Container

    Reference to the container node the decorator is attached to.

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

    This can be any type of node that supports the IEndPointContainer interface.

    IEndPointContainer

    DecoratorShape

    Gets or sets the decorator shape.

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

    The decorator shape.

    FillStyle

    Properties for creating a brush to fill the decorator with.

    Declaration
    public FillStyle FillStyle { get; }
    Property Value
    Type
    FillStyle

    GraphicsPath

    Gets the graphics path.

    Declaration
    public GraphicsPath GraphicsPath { get; }
    Property Value
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    The graphics path.

    IsPathClosed

    Gets a value indicating whether this instance is path closed.

    Declaration
    protected bool IsPathClosed { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is path closed; otherwise, false.

    LineStyle

    Line drawing properties for this decorator.

    Declaration
    public LineStyle LineStyle { get; }
    Property Value
    Type
    LineStyle
    Remarks

    The line style determines the configuration of the pen used to outline decorator. LineStyle

    Size

    Width and height of the decorator.

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

    Methods

    Dispose()

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

    Draw(Graphics)

    Renders the line decorator onto a System.Drawing.Graphics object.

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

    Graphics context to render onto.

    GetObjectData(SerializationInfo, StreamingContext)

    Populates a SerializationInfo with the data needed to serialize the target object.

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

    SerializationInfo object to populate.

    System.Runtime.Serialization.StreamingContext context

    Destination streaming context.

    Overrides
    PropertyContainer.GetObjectData(SerializationInfo, StreamingContext)

    GetPropertyContainerByName(String)

    Gets the container of the property by name.

    Declaration
    public override object GetPropertyContainerByName(string strPropertyName)
    Parameters
    Type Name Description
    System.String strPropertyName

    Name of the property.

    Returns
    Type
    System.Object
    Overrides
    PropertyContainer.GetPropertyContainerByName(String)

    GetPropertyContainerName()

    Gets the name of the property container.

    Declaration
    protected override string GetPropertyContainerName()
    Returns
    Type
    System.String
    Overrides
    PropertyContainer.GetPropertyContainerName()

    Load(GraphicsPath)

    Load the endpoint decorator with a GraphicsPath.

    Declaration
    public bool Load(GraphicsPath grfxPath)
    Parameters
    Type Name Description
    System.Drawing.Drawing2D.GraphicsPath grfxPath

    GraphicsPath to load.

    Returns
    Type Description
    System.Boolean

    True if successful; otherwise False.

    ProvideServiceReference(RuntimeTypeHandle)

    Get the service reference from provider.

    Declaration
    public override object ProvideServiceReference(RuntimeTypeHandle typeHandle)
    Parameters
    Type Name Description
    System.RuntimeTypeHandle typeHandle

    The type handle.

    Returns
    Type
    System.Object
    Overrides
    PropertyContainer.ProvideServiceReference(RuntimeTypeHandle)

    UpdateServiceReferences(IServiceReferenceProvider)

    Updates the service references.

    Declaration
    public override void UpdateServiceReferences(IServiceReferenceProvider provider)
    Parameters
    Type Name Description
    IServiceReferenceProvider provider

    The provider.

    Overrides
    PropertyContainer.UpdateServiceReferences(IServiceReferenceProvider)

    Implements

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