Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

@using Syncfusion.Blazor.Diagram

<SfDiagramComponent Height="700px" Nodes="@nodes" ></SfDiagramComponent>
<SfDiagramComponent Height="700px" Nodes="@_nodes" ></SfDiagramComponent>

@code
{
private DiagramObjectCollection<Node> nodes;
private DiagramObjectCollection<Node> _nodes;

protected override void OnInitialized()
{
nodes = new DiagramObjectCollection<Node>();
_nodes = new DiagramObjectCollection<Node>();
Node node = new Node()
{
ID = "node1",
Expand All @@ -35,7 +35,7 @@
}
}
};
nodes.Add(node);
_nodes.Add(node);
Node node2 = new Node()
{
ID = "node2",
Expand All @@ -61,6 +61,6 @@
}
}
};
nodes.Add(node2);
_nodes.Add(node2);
}
}
10 changes: 5 additions & 5 deletions Diagram/Server/Pages/Ports/PortIsSticky/PortIsSticky.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
@using Syncfusion.Blazor.Popups
@using Syncfusion.Blazor.Buttons

<SfDiagramComponent @ref="@diagram" Width="1000px" Height="500px" Nodes="@nodes" />
<SfDiagramComponent @ref="@_diagram" Width="1000px" Height="500px" Nodes="@_nodes" />

@code
{
//Define diagram's nodes collection
private DiagramObjectCollection<Node> nodes;
private DiagramObjectCollection<Node> _nodes;
//Reference the diagram
private SfDiagramComponent diagram;
private SfDiagramComponent _diagram;

protected override void OnInitialized()
{
//Intialize diagram's nodes collection
nodes = new DiagramObjectCollection<Node>();
_nodes = new DiagramObjectCollection<Node>();
Node node = new Node()
{
ID = "node1",
Expand All @@ -43,6 +43,6 @@
}
},
};
nodes.Add(node);
_nodes.Add(node);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
@using Syncfusion.Blazor.Diagram

<!-- Diagram component rendering a swimlane layout -->
<SfDiagramComponent Height="600px" Width="90%" Swimlanes="@swimlaneCollections">
<SfDiagramComponent Height="600px" Width="90%" Swimlanes="@_swimlaneCollections">
</SfDiagramComponent>

@code
{
/// <summary>
/// Collection of swimlanes used in the SfDiagramComponent.
/// </summary>
private DiagramObjectCollection<Swimlane> swimlaneCollections = new DiagramObjectCollection<Swimlane>();
private DiagramObjectCollection<Swimlane> _swimlaneCollections = new DiagramObjectCollection<Swimlane>();

/// <summary>
/// Initializes the swimlane, phases, lanes, and child nodes for the diagram.
Expand Down Expand Up @@ -40,7 +40,7 @@
};

// Create swimlane structure
swimlaneCollections = new DiagramObjectCollection<Swimlane>()
_swimlaneCollections = new DiagramObjectCollection<Swimlane>()
{
new Swimlane()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

@using Syncfusion.Blazor.Diagram

<SfDiagramComponent Height="600px" Swimlanes="@SwimlaneCollections" NodeCreating="@OnNodeCreating" />
<SfDiagramComponent Height="600px" Swimlanes="@_swimlaneCollections" NodeCreating="@OnNodeCreating" />

@code
{
//Define diagram's swimlane collection
private DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
private DiagramObjectCollection<Swimlane> _swimlaneCollections = new DiagramObjectCollection<Swimlane>();

protected override void OnInitialized()
{
Expand All @@ -20,12 +20,12 @@
Width = 450,
};
// Add swimlane
SwimlaneCollections.Add(swimlane);
_swimlaneCollections.Add(swimlane);
}

private void OnNodeCreating(IDiagramObject obj)
private void OnNodeCreating(IDiagramObject diagramObject)
{
if (obj is Swimlane swimlane)
if (diagramObject is Swimlane swimlane)
{
swimlane.Header.Style = new TextStyle()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

@using Syncfusion.Blazor.Diagram

<SfDiagramComponent Height="600px" Swimlanes="@SwimlaneCollections" NodeCreating="@OnNodeCreating" />
<SfDiagramComponent Height="600px" Swimlanes="@_swimlaneCollections" NodeCreating="@OnNodeCreating" />

@code
{
//Define diagram's swimlane collection
private DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
private DiagramObjectCollection<Swimlane> _swimlaneCollections = new DiagramObjectCollection<Swimlane>();

protected override void OnInitialized()
{
Expand All @@ -21,12 +21,12 @@
Orientation = Orientation.Vertical,
};
// Add swimlane
SwimlaneCollections.Add(swimlane);
_swimlaneCollections.Add(swimlane);
}

private void OnNodeCreating(IDiagramObject obj)
private void OnNodeCreating(IDiagramObject diagramObject)
{
if (obj is Swimlane swimlane)
if (diagramObject is Swimlane swimlane)
{
swimlane.Header.Style = new TextStyle()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

@using Syncfusion.Blazor.Diagram

<SfDiagramComponent Height="600px" Swimlanes="@SwimlaneCollections" NodeCreating="@OnNodeCreating" />
<SfDiagramComponent Height="600px" Swimlanes="@_swimlaneCollections" NodeCreating="@OnNodeCreating" />

@code
{
//Define diagram's swimlane collection
private DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
private DiagramObjectCollection<Swimlane> _swimlaneCollections = new DiagramObjectCollection<Swimlane>();

protected override void OnInitialized()
{
Expand All @@ -33,12 +33,12 @@
Width = 450,
};
// Add swimlane
SwimlaneCollections.Add(swimlane);
_swimlaneCollections.Add(swimlane);
}

private void OnNodeCreating(IDiagramObject obj)
private void OnNodeCreating(IDiagramObject diagramObject)
{
if (obj is Swimlane swimlane)
if (diagramObject is Swimlane swimlane)
{
foreach (Phase phase in swimlane.Phases)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

@using Syncfusion.Blazor.Diagram

<SfDiagramComponent Height="600px" Swimlanes="@SwimlaneCollections" NodeCreating="@OnNodeCreating" />
<SfDiagramComponent Height="600px" Swimlanes="@_swimlaneCollections" NodeCreating="@OnNodeCreating" />

@code
{
//Define diagram's swimlane collection
private DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
private DiagramObjectCollection<Swimlane> _swimlaneCollections = new DiagramObjectCollection<Swimlane>();

protected override void OnInitialized()
{
Expand All @@ -28,12 +28,12 @@
Width = 450,
};
// Add swimlane
SwimlaneCollections.Add(swimlane);
_swimlaneCollections.Add(swimlane);
}

private void OnNodeCreating(IDiagramObject obj)
private void OnNodeCreating(IDiagramObject diagramObject)
{
if (obj is Swimlane swimlane)
if (diagramObject is Swimlane swimlane)
{
swimlane.Header.Style = new TextStyle()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@using Syncfusion.Blazor.Diagram

<SfDiagramComponent Height="600px" Swimlanes="@SwimlaneCollections">
<SfDiagramComponent Height="600px" Swimlanes="@_swimlaneCollections">
<DiagramTemplates>
<AnnotationTemplate>
@if (context is Annotation annotation)
Expand All @@ -28,7 +28,7 @@
@code
{
//Define diagram's swimlane collection.
private DiagramObjectCollection<Swimlane> SwimlaneCollections = new DiagramObjectCollection<Swimlane>();
private DiagramObjectCollection<Swimlane> _swimlaneCollections = new DiagramObjectCollection<Swimlane>();

protected override void OnInitialized()
{
Expand Down Expand Up @@ -58,12 +58,12 @@
Width = 450,
};
// Add swimlane.
SwimlaneCollections.Add(swimlane);
_swimlaneCollections.Add(swimlane);
}

private void OnNodeCreating(IDiagramObject obj)
private void OnNodeCreating(IDiagramObject diagramObject)
{
if (obj is Swimlane swimlane)
if (diagramObject is Swimlane swimlane)
{
swimlane.Header.Style = new TextStyle()
{
Expand Down
10 changes: 5 additions & 5 deletions Diagram/Server/Pages/Tooltip/StickyForConnector.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
@using Syncfusion.Blazor.Popups
@using Syncfusion.Blazor.Buttons

<SfDiagramComponent @ref="@diagram" Width="1000px" Height="500px" Connectors="connectors" />
<SfDiagramComponent @ref="@_diagram" Width="1000px" Height="500px" Connectors="@_connectors" />

@code
{
//Define diagram's connectors collection
private DiagramObjectCollection<Connector> connectors;
private DiagramObjectCollection<Connector> _connectors;
//Refrence the diagram
private SfDiagramComponent diagram;
private SfDiagramComponent _diagram;

protected override void OnInitialized()
{
//Intialize diagram's nodes collection
connectors = new DiagramObjectCollection<Connector>();
_connectors = new DiagramObjectCollection<Connector>();
Connector connector = new Connector()
{
ID = "Connector1",
Expand All @@ -24,6 +24,6 @@
Tooltip = new DiagramTooltip() { Content = "Tooltip", IsSticky=true },
Constraints = ConnectorConstraints.Default | ConnectorConstraints.Tooltip,
};
connectors.Add(connector);
_connectors.Add(connector);
}
}
10 changes: 5 additions & 5 deletions Diagram/Server/Pages/Tooltip/StickyForNode.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
@using Syncfusion.Blazor.Popups
@using Syncfusion.Blazor.Buttons

<SfDiagramComponent @ref="@diagram" Width="1000px" Height="500px" Nodes="@nodes" />
<SfDiagramComponent @ref="@_diagram" Width="1000px" Height="500px" Nodes="@_nodes" />

@code
{
//Define diagram's nodes collection
private DiagramObjectCollection<Node> nodes;
private DiagramObjectCollection<Node> _nodes;
//Reference the diagram
private SfDiagramComponent diagram;
private SfDiagramComponent _diagram;

protected override void OnInitialized()
{
//Intialize diagram's nodes collection
nodes = new DiagramObjectCollection<Node>();
_nodes = new DiagramObjectCollection<Node>();
Node node = new Node()
{
ID = "node1",
Expand All @@ -31,6 +31,6 @@
Tooltip = new DiagramTooltip() { Content = "Tooltip", IsSticky = true },
Constraints = NodeConstraints.Default | NodeConstraints.Tooltip,
};
nodes.Add(node);
_nodes.Add(node);
}
}
12 changes: 6 additions & 6 deletions Diagram/Server/Pages/Tooltip/TipPointerForConnectorTooltip.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
@using Syncfusion.Blazor.Buttons

<SfButton Content="Connector TipPointer" OnClick="@TipPointerChange" />
<SfDiagramComponent Width="1000px" Height="500px" Connectors="connector" />
<SfDiagramComponent Width="1000px" Height="500px" Connectors="@_connectors" />

@code
{
//Define diagram's connectors collection
private DiagramObjectCollection<Connector> connector;
private DiagramObjectCollection<Connector> _connectors;

protected override void OnInitialized()
{
//Intialize diagram's connectors collection
connector = new DiagramObjectCollection<Connector>();
Connector connectors = new Connector()
_connectors = new DiagramObjectCollection<Connector>();
Connector connector = new Connector()
{
ID = "Connector1",
SourcePoint = new DiagramPoint() { X = 500, Y = 500 },
Expand All @@ -25,12 +25,12 @@
Tooltip = new DiagramTooltip() { Content = "ConnectorTooltip", ShowTipPointer = true },
Constraints = ConnectorConstraints.Default | ConnectorConstraints.Tooltip,
};
connector.Add(connectors);
_connectors.Add(connector);
}

//Change the TipPointer at run time.
private void TipPointerChange()
{
connector[0].Tooltip.ShowTipPointer = false;
_connectors[0].Tooltip.ShowTipPointer = false;
}
}
10 changes: 5 additions & 5 deletions Diagram/Server/Pages/Tooltip/TipPointerForNodeTooltip.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
@using Syncfusion.Blazor.Buttons

<SfButton Content="Node TipPointer" OnClick="@TipPointerChange" />
<SfDiagramComponent Width="1000px" Height="500px" Nodes="@nodes" />
<SfDiagramComponent Width="1000px" Height="500px" Nodes="@_nodes" />

@code
{
//Define diagram's nodes collection
private DiagramObjectCollection<Node> nodes;
private DiagramObjectCollection<Node> _nodes;

protected override void OnInitialized()
{
//Intialize diagram's nodes collection
nodes = new DiagramObjectCollection<Node>();
_nodes = new DiagramObjectCollection<Node>();
Node node = new Node()
{
ID = "node1",
Expand All @@ -32,12 +32,12 @@
Tooltip = new DiagramTooltip() { Content = "NodeTooltip", ShowTipPointer = true },
Constraints = NodeConstraints.Default | NodeConstraints.Tooltip,
};
nodes.Add(node);
_nodes.Add(node);
}

//Change TipPointer at run time.
private void TipPointerChange()
{
nodes[0].Tooltip.ShowTipPointer = false;
_nodes[0].Tooltip.ShowTipPointer = false;
}
}
Loading