We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

line connector - bring to front.

Thread ID:

Created:

Updated:

Platform:

Replies:

98604 Mar 10,2011 07:32 PM Mar 23,2011 12:33 AM WPF 5
loading
Tags: Diagram
Mary Fontana
Asked On March 10, 2011 07:32 PM

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


Maria Amal Raj T [Syncfusion]
Replied On March 15, 2011 10:03 AM

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].



Mary Fontana
Replied On March 18, 2011 03:01 PM

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



Mary Fontana
Replied On March 18, 2011 03:16 PM


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






Mary Fontana
Replied On March 18, 2011 03:51 PM

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

Maria Amal Raj T [Syncfusion]
Replied On March 23, 2011 12:33 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;