Blazor

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

    Show / Hide Table of Contents

    Class PortVisibility

    Constraints to control the visibility property of the port.

    Inheritance
    System.Object
    PortVisibility
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class PortVisibility : Enum
    Remarks
    To know more about using port visibility, refer to these links
    1. Ports
    2. DiagramMethods
    To apply port visibility, use the below code.
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
    </SfDiagram>
    @code {
       ObservableCollection<DiagramNode> NodeCollection;
       protected override void OnInitialized()
       {
           //Initialize the NodeCollection.
           NodeCollection = new ObservableCollection<DiagramNode>();
           DiagramNode Node = new DiagramNode()
           {
               Id = "node1",
               Height = 100,
               Width = 100,
               OffsetX = 100,
               OffsetY = 100,
           };
           Node.Ports = new ObservableCollection<DiagramPort>()
           {
               new DiagramPort()
               {
                   Id="port1",
                   Offset=new NodePortOffset(){X=0,Y=0.5},
                   Shape=PortShapes.X,
                   Visibility=PortVisibility.Visible,
                   //sets the PortConstraints...
                   Constraints=PortConstraints.None
               }
           };
           NodeCollection.Add(Node);
       }
    }

    Fields

    Connect

    Shows the port when a connector endpoint is dragged over a node.

    Declaration
    public const PortVisibility Connect
    Field Value
    Type Description
    PortVisibility

    Hidden

    Always hides the port.

    Declaration
    public const PortVisibility Hidden
    Field Value
    Type Description
    PortVisibility

    Hover

    Shows the port when the mouse hovers over a node.

    Declaration
    public const PortVisibility Hover
    Field Value
    Type Description
    PortVisibility

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32

    Visible

    Always shows the port.

    Declaration
    public const PortVisibility Visible
    Field Value
    Type Description
    PortVisibility
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved