-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathTipPointerForNodeTooltip.razor
More file actions
43 lines (38 loc) · 1.18 KB
/
Copy pathTipPointerForNodeTooltip.razor
File metadata and controls
43 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@page "/TipPointerForNodeTooltip"
@using Syncfusion.Blazor.Diagram
@using Syncfusion.Blazor.Popups
@using Syncfusion.Blazor.Buttons
<SfButton Content="Node TipPointer" OnClick="@TipPointerChange" />
<SfDiagramComponent Width="1000px" Height="500px" Nodes="@_nodes" />
@code
{
//Define diagram's nodes collection
private DiagramObjectCollection<Node> _nodes;
protected override void OnInitialized()
{
//Intialize diagram's nodes collection
_nodes = new DiagramObjectCollection<Node>();
Node node = new Node()
{
ID = "node1",
OffsetX = 250,
OffsetY = 250,
Width = 100,
Height = 100,
Style = new ShapeStyle()
{
Fill = "#6495ED",
StrokeColor = "white"
},
//Set tooltip
Tooltip = new DiagramTooltip() { Content = "NodeTooltip", ShowTipPointer = true },
Constraints = NodeConstraints.Default | NodeConstraints.Tooltip,
};
_nodes.Add(node);
}
//Change TipPointer at run time.
private void TipPointerChange()
{
_nodes[0].Tooltip.ShowTipPointer = false;
}
}