alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Enum DiagramOverviewConstraints

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

    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    [Flags]
    public enum DiagramOverviewConstraints
    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

    Name Description
    Default

    Enables all the interactions in overview component.

    DrawFocus

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

    None

    Disables all the interactions in overview component.

    Pan

    Enables the panning interaction in overview component.

    TapFocus

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

    Zoom

    Enables the zooming interaction in overview component.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved