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.
Syncfusion Feedback

Move Node

Thread ID:

Created:

Updated:

Platform:

Replies:

90586 Oct 8,2009 05:30 PM UTC Nov 17,2009 10:59 AM UTC WPF 8
loading
Tags: Diagram
Pavel Vykhryst
Asked On October 8, 2009 05:30 PM UTC

if to change Node.OffsetX and Node.OffsetY from code, there is no changes on the screen till the first interaction with the diagram
Which method should be executed to update rendering manually?

Also i have prompt to use Position property for moving nodes, but if I create 10 nodes with diffrent positions they are shown in top left corner

Could you provide code for correct moving node (am I do not want to reset the whole diagramModel)


Nikhil A [Syncfusion]
Replied On October 9, 2009 09:44 AM UTC

Hi Pavel,

Thanks for your interest in Syncfusion products.

Once the new offset positions have been assigned, you need to call the InvalidateMeasure() of the page as follows:

nodeobj.OffsetX=50;
nodeobj.OffsetY=100;
DiagramPage page = new DiagramPage();
page=diagramView.Page as DiagramPage;
page.InvalidateMeasure();

This will move the node to the specified location. We suggest you always use the Offset properties only for positioning the node. The Position property will not place the nodes appropriate as it is used internally for other purposes.

Please let us know if there are any concerns.

Regards,
Nikhil

Administrator [Syncfusion]
Replied On November 1, 2009 04:46 PM UTC

Is there a way to restrict a node from moving on X or Y axis.

Administrator [Syncfusion]
Replied On November 1, 2009 04:53 PM UTC

Also talking about moving, is there an event that I can use to see if a node is moving?
I did found for starting and ending the moving operation (NodeDragStart and NodeDragEnd).
I need something like NodeDragging, which will be lunched when the node position is changed.

Nikhil A [Syncfusion]
Replied On November 2, 2009 05:29 AM UTC

Hi,

For the first question about restricting node move, we would like you to know that we have a property called AllowMove for Nodes which when set to false, will prevent the node from moving . However we currently do not support restricting the Node from moving in any one axis alone.

With respect to the second query about NodeDragging event, we currently do not have such an event . However we will provide this event in our future releases.

Please let me know if there are any concerns.

Regards,
Nikhil
Syncfusion WPF Team

Administrator [Syncfusion]
Replied On November 12, 2009 02:13 PM UTC

As I see from one of the post, for updating graphically the node position we have to call

page.InvalidateMeasure();

This method makes the diagram to refresh and in case the diagram has a scroll bar, the page will go in the top.
Is there a way to avoid this?

Thank you.

Nikhil A [Syncfusion]
Replied On November 13, 2009 11:10 AM UTC

Hi Dreic,

For updating the node position you can call the page.InvalidateArrange() method.

This will prevent the page to scroll up.

Regards,
Nikhil,
Syncfusion WPF team

Administrator [Syncfusion]
Replied On November 16, 2009 05:15 PM UTC

Hello,

I hope you can help me with the following problem.

I need for my project the two events for a node (PositionChanging and PositionChanged). To implement these, I had to disable the automatic dragging of the node.
Next, I have override the OffsetX and OffsetY properties and added the events in these two properties.
Next I have implemented my own dragging operations.

Everithing work good but the problem that i have encountered is that when I have to scroll to some objects and move them, the base.OffsetX and base.OffsetY properties seem to not work correct, because I am assigning a value but they retain a different value. I think I have to add an offset for the scroll on X and Y, but I cannot seem to find them.
If not, what do you think the problem is?

Thank you.

Nikhil A [Syncfusion]
Replied On November 17, 2009 10:59 AM UTC

Hi dreic,

Yes, while scrolling we take the amount of area scrolled and modify the offsets to display proper values. This is done internally using the view's scrollbar. However the scrollbar is internal. But we do have events in place to detect node drag;

NodeDragStart: fires when the node drag operation is started.

NodeDragEnd: fires when the drag operation is complete.

We will be implementing NodeDragging event , if that helps you solve your problem.

Please let us know if there are any concerns.

Regards,
Nikhil

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.

Warning Icon 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.Close Icon

;