line connector - bring to front.
I created an event handler for NodeSelection.
On selection of a node I am changing the line style/fill for lines connected to this node. Sometimes the line is only partially showing. Is there a way to bring the line to the front?
Thanks,
Mary
On selection of a node I am changing the line style/fill for lines connected to this node. Sometimes the line is only partially showing. Is there a way to bring the line to the front?
Thanks,
Mary
SIGN IN To post a reply.
5 Replies
MA
Maria Amal Raj T
Syncfusion Team
March 15, 2011 02:03 PM UTC
Hi Mary,
Z-Order commands can be used to bring Nodes or Connections to front. When bring to front command is executed, all the selected Nodes and connections will appear in front.
Code Snippet :
DiagramCommandManager.BringToFront.Execute(diagramView.Page, diagramView);
For more information about Bring to front command please refer our Online documentation from the following link.
Documentation Link : http://help.syncfusion.com/ug_91/User%20Interface/WPF/Diagram/index.htm
and navigate to Concepts and Features > Diagram View > Z-order Commands
Please let us know if you have any further queries.
Regards,
Maria Amal Raj T,
Diagram WPF & Silverlight Team,
[Syncfusion].
Z-Order commands can be used to bring Nodes or Connections to front. When bring to front command is executed, all the selected Nodes and connections will appear in front.
Code Snippet :
DiagramCommandManager.BringToFront.Execute(diagramView.Page, diagramView);
For more information about Bring to front command please refer our Online documentation from the following link.
Documentation Link : http://help.syncfusion.com/ug_91/User%20Interface/WPF/Diagram/index.htm
and navigate to Concepts and Features > Diagram View > Z-order Commands
Please let us know if you have any further queries.
Regards,
Maria Amal Raj T,
Diagram WPF & Silverlight Team,
[Syncfusion].
MF
Mary Fontana
March 18, 2011 07:01 PM UTC
I tried this:
private void diagramView_NodeSelected(object sender, NodeRoutedEventArgs evtArgs)
{
Node node = evtArgs.Node as Node;
if (node == null) return;
DiagramCommandManager.BringToFront.Execute(diagramView.Page, diagramView);
HighlightNodeLines(node);
}
But I have something like this
n1 ------------------> n2
private void diagramView_NodeSelected(object sender, NodeRoutedEventArgs evtArgs)
{
Node node = evtArgs.Node as Node;
if (node == null) return;
DiagramCommandManager.BringToFront.Execute(diagramView.Page, diagramView);
HighlightNodeLines(node);
}
But I have something like this
n1 ------------------> n2
MF
Mary Fontana
March 18, 2011 07:16 PM UTC
I did try this, but it still does not bring all of the line connections of a node to the front.
I have this method:
private void diagramView_NodeSelected(object sender, NodeRoutedEventArgs evtArgs)
{
Node node = evtArgs.Node;
DiagramCommandManager.BringToFront.Execute(diagramView.Page, diagramView);
ChangeNodeAndLineColor(node); // my custom method
}
I have something like this
n1->n2
n3->n1
and the lines overlap like this:
n1 <------------------> n2
|*
|*
|*
n3 *
and when I select n3, I will see part of the line from n3->n1 drawn with a new color (shown here with *) but the other part (horizontal part of connection from n3 to n1) is not shown in the new color.
If I move the line with the mouse I can see that the line connector n3->n1 is still partially under the line n1->n2
MF
Mary Fontana
March 18, 2011 07:51 PM UTC
My last post did not illustrate my problem.
I attached a drawing that shows the problem I am having.
Thanks in advance for your help.
Mary
Nodes_80e17d37.rar
I attached a drawing that shows the problem I am having.
Thanks in advance for your help.
Mary
Nodes_80e17d37.rar
MA
Maria Amal Raj T
Syncfusion Team
March 23, 2011 04:33 AM UTC
Hi Mary,
It is by design that the BringToFront command will update the z-order in such a way that, only the SELECTED node and connector will be visually moved to top of other nodes and connections. So, please select the line connector using IsSelected property before executing BringToFront. We have created a sample based on your requirement. In this sample, when the node labeled N3 is loaded, this node and the lines connected to this node will be selected and the BringToFront command will be executed. Please refer to the sample from the following location.
Regards,
Maria Amal Raj T,
Diagram WPF & Silverlight Team,
[Syncfusion].
BringToFrontSampleDemo_1081b9e5.zip
It is by design that the BringToFront command will update the z-order in such a way that, only the SELECTED node and connector will be visually moved to top of other nodes and connections. So, please select the line connector using IsSelected property before executing BringToFront. We have created a sample based on your requirement. In this sample, when the node labeled N3 is loaded, this node and the lines connected to this node will be selected and the BringToFront command will be executed. Please refer to the sample from the following location.
Regards,
Maria Amal Raj T,
Diagram WPF & Silverlight Team,
[Syncfusion].
BringToFrontSampleDemo_1081b9e5.zip
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
MF Mary Fontana
- Mar 11, 2011 12:32 AM UTC
- Mar 23, 2011 04:33 AM UTC