Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ConnectorSourceDecorator - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ConnectorSourceDecorator

    Defines the properties and features of highlighting the connector source point.

    Inheritance
    System.Object
    SfDiagramBase
    ConnectorSourceDecorator
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ConnectorSourceDecorator : SfDiagramBase
    Remarks

    A connector’s source decorator can be customized as per the user’s perspective like adding fill color, stroke color, etc.

    Examples
      
    <SfDiagram Connectors="@ConnectorCollection">
    </SfDiagram>
    @code
    {
      public ObservableCollection<DiagramConnector> ConnectorCollection { get; set; }
      protected override void OnInitialized()
      {
       ConnectorCollection = new ObservableCollection<DiagramConnector>();
       DiagramConnector Connector = new DiagramConnector()
       {
         SourcePoint = new ConnectorSourcePoint() { X = 300, Y = 40 },
         TargetPoint = new ConnectorTargetPoint() { X = 400, Y = 160 },
         SourceDecorator = new ConnectorSourceDecorator()
         {
            Shape = DecoratorShapes.Circle,
            Style = new DecoratorShapeStyle() { StrokeColor = "#37909A", Fill = "#37909A", StrokeWidth = 1 },
            Height = 40,
            Width = 40,
            Pivot = new DecoratorPivot()
            {
                   X = 0.5,
                   Y = 0.5
            }
         },
      };
      ConnectorCollection.Add(Connector);
      }
     }

    Constructors

    ConnectorSourceDecorator()

    Defines the properties and features of highlighting the connector source point.

    Declaration
    public ConnectorSourceDecorator()

    Properties

    Height

    Defines the height of the source decorator. By default, the Height of source decorator is set to 10.

    Declaration
    public double Height { get; set; }
    Property Value
    Type Description
    System.Double

    PathData

    Gets or sets the geometry of the source decorator.

    Declaration
    public string PathData { get; set; }
    Property Value
    Type Description
    System.String

    Pivot

    Gets or sets the position of the connector’s source decorator. The pivot points range from 0 to 1 for both X and Y.

    Declaration
    public DecoratorPivot Pivot { get; set; }
    Property Value
    Type Description
    DecoratorPivot

    Shape

    Sets the shape of the source decorator.

    Declaration
    public DecoratorShapes Shape { get; set; }
    Property Value
    Type Description
    DecoratorShapes
    Remarks

    The Shape can be set to Diamond, Doublearrow, OpenArrow, Circle, etc.

    Examples
      
    SourceDecorator = new ConnectorSourceDecorator()
    {
       Height=40,
       //Set the shape as desired
       Shape=DecoratorShapes.Diamond,
       Width=40,
       Pivot=new DecoratorPivot()
       {
         X = 0.5,
         Y = 0.5
       }
    }

    Style

    Gets or sets the appearance of the source decorator.

    Declaration
    public DecoratorShapeStyle Style { get; set; }
    Property Value
    Type Description
    DecoratorShapeStyle
    Remarks

    The fill color, stroke width, stroke color, etc., of the source decorator, is set in Style.

    Examples
      
    SourceDecorator = new ConnectorSourceDecorator()
    {
      Shape=DecoratorShapes.Diamond,
      //Set the style for source decorator
      Style=new DecoratorShapeStyle()
      {
        Fill = "red",
        StrokeColor = "blue"
      }
     }

    Width

    Defines the width of the source decorator. By default, the Width of the source decorator is set to 10.

    Declaration
    public double Width { get; set; }
    Property Value
    Type Description
    System.Double
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved