Class Decorator
Base class for line decorators.
Implements
Inherited Members
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.
IEndPointContainerDecoratorShape
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 |
|
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
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
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
GetPropertyContainerName()
Gets the name of the property container.
Declaration
protected override string GetPropertyContainerName()
Returns
Type |
---|
System.String |
Overrides
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
UpdateServiceReferences(IServiceReferenceProvider)
Updates the service references.
Declaration
public override void UpdateServiceReferences(IServiceReferenceProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IServiceReferenceProvider | provider | The provider. |