Centralizing screen when clicking on a node

Hi,<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I'm having an issue with my wpf Go Xam nodes, from some reason the screen centralizes on them when those nodes are clicked in my Diagram.

For example I have a node that holds a data grid as a user control when this data grid is on any side of the screen clicking on it rows in order to mark it, makes the screen center on them .

For my application this behavior is ... very bad ... Confused I wonder if you know this issue and how to fix it.

By the way I also encountered this problem in Go Xam demo on the "Visual Tree" sample , if u make the sample screen narrower and scroll to the any edge and click on one port (+\- buttons)

It sometimes centers the screen horizontally even if the tree didn't collapse or expand.

Thanks in advance,

Leo.

If your app copied from the Entity Relationship sample (“ER Diagram”), then you got a data-binding on Diagram.CenteredNodeData. Just remove that attribute.

I’m unable to reproduce that behavior in the Visual Tree sample.

Hi again ,
I have no such property as Diagram.CenteredNodeData to remove,
i searched in the hole application.
I did'nt copy any sample from the demo.
If u can,please try to follow the instructions i wrote , in order to
reproduce this behavior , on the Visual Tree sample,
try to make the screen narrower than it is, scroll to the end,
so u can barely see the port, then click it , try it on several ports and im sure you will
see the diagram gets it self to the center and that port you clicked
will be in the middle of the screen. it happens to me all the time.
thanks for your help
leo.

Perhaps you didn’t start with the version 1.2 Entity Relationship sample.
(CenteredNodeData was new in 1.2, IIRC.)

The other possibility is that the WPF ScrollViewer is doing that automatically, to make sure the control that is getting focus is as completely visible as it can be. Do you ever get that behavior when the whole Button is visible?

If so, here’s one solution: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/bab3fb62-bf9e-4db6-854c-829bd2896319/

Thank you , i’ll look into that.