menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramOverviewConstraints - API Reference

    Show / Hide Table of Contents

    Class DiagramOverviewConstraints

    Specifies the interaction setting (such as the zoom, pan, draw, and tap) enabled or disabled in overview component.

    Inheritance
    System.Object
    DiagramOverviewConstraints
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class DiagramOverviewConstraints : Enum
    Examples
    <SfDiagramComponent @ref = "diagram" Height="600px" Width="90%" ID="diagram" @bind-Nodes="nodes"
                       @bind-Connectors="connectors">
    </SfDiagramComponent>
    <SfDiagramOverviewComponent Width = "400" Height="300" SourceID="diagram" Constraints="DiagramOverviewConstraints.Zoom"></SfDiagramOverviewComponent>
    @code {
       SfDiagramComponent diagram; DiagramObjectCollection<Node> nodes; DiagramObjectCollection<Connector> connectors;
       protected override void OnInitialized()
       {
           nodes = new DiagramObjectCollection<Node>();
           connectors = new DiagramObjectCollection<Connector>();
           Node node1 = new Node()
           {
               ID = "node1",
               Height = 100,
               Width = 100,
               OffsetX = 100,
               OffsetY = 100,
               Style = new ShapeStyle()
               {
                   Fill = "#6BA5D7",
                   StrokeColor = "white",
                   StrokeWidth = 1
               }
           };
           Node node2 = new Node()
           {
               ID = "node2",
               Height = 100,
               Width = 100,
               OffsetX = 300,
               OffsetY = 100,
               Style = new ShapeStyle()
               {
                   Fill = "#6BA5D7",
                   StrokeColor = "white",
                   StrokeWidth = 1
               }
           };
           nodes.Add(node1); nodes.Add(node2);
           Connector connector1 = new Connector()
           {
               ID = "connector1",
               SourceID = "node1",
               TargetID = "node2",
               Type = ConnectorSegmentType.Straight,
               Style = new ShapeStyle()
               {
                   Fill = "#6BA5D7",
                   StrokeWidth = 2
               }
           };
           connectors.Add(connector1);
       }
    }

    Fields

    Default

    Enables all the interactions in overview component.

    Declaration
    public const DiagramOverviewConstraints Default
    Field Value
    Type Description
    DiagramOverviewConstraints

    DrawFocus

    Enables to zoom or change the viewport area of the diagram by drawing the new rect in the overview component.

    Declaration
    public const DiagramOverviewConstraints DrawFocus
    Field Value
    Type Description
    DiagramOverviewConstraints

    None

    Disables all the interactions in overview component.

    Declaration
    public const DiagramOverviewConstraints None
    Field Value
    Type Description
    DiagramOverviewConstraints

    Pan

    Enables the panning interaction in overview component.

    Declaration
    public const DiagramOverviewConstraints Pan
    Field Value
    Type Description
    DiagramOverviewConstraints

    TapFocus

    Enables the panning of the diagram viewport to specific focus point by tap on the overview component

    Declaration
    public const DiagramOverviewConstraints TapFocus
    Field Value
    Type Description
    DiagramOverviewConstraints

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32

    Zoom

    Enables the zooming interaction in overview component.

    Declaration
    public const DiagramOverviewConstraints Zoom
    Field Value
    Type Description
    DiagramOverviewConstraints
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved