Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic BringIntoView (Read 4279 times)
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
BringIntoView
Jul 22nd, 2008 at 8:28am
Print Post  
Hi,

I can't seem to get BringIntoView to work - if the node I want to bring into view is way off to the right the diagram does not display it.

I'm sure this is a problem with my code, which is;

diagram.BringIntoView(node.Bounds);

Any ideas?
Thanks in advance.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: BringIntoView
Reply #1 - Jul 22nd, 2008 at 10:40am
Print Post  
Hi,

Are you using the official 1.0 release? That method wasn't implemented correctly there. It should work in this version:
https://www.mindfusion.eu/_beta/wpfdiag101pre.zip

as long as Diagram.Bounds contains Node.Bounds and the Diagram object is inside a ScrollViewer.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
matt.s
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Apr 3rd, 2008
Re: BringIntoView
Reply #2 - Jul 23rd, 2008 at 8:16am
Print Post  
Hi,

I've downloaded this to no avail - it still won't display nodes off screen.

The diagram is contained in a scroll viewer, and diagram.Bounds.Contains(node.Bounds) returns true.

Also this download has a side affect - the grab handles on the nodes are suddenly about 10 times larger than normal.

Matt
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: BringIntoView
Reply #3 - Jul 23rd, 2008 at 8:52am
Print Post  
Hi,

Now the default MeasureUnit is WpfPoint, and we have changed all size-related properties to match it. You will have to scale down the AdjustmentHandlesSize property value to fix the handles size.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: BringIntoView
Reply #4 - Jul 23rd, 2008 at 9:08am
Print Post  
Regarding BringIntoView, that was my mistake - we have recently implemented a ZoomToRect method, and I confused it with BringIntoView when you mentioned it. The BringIntoView(Rect) method you are using is implemented by the base FrameworkElement class, but apparently it does not work correctly for Diagram. We'll override it or implement a BringIntoView(DiagramItem) method (which is available in our Windows Forms control).

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint