Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to get mid co-ordinate of diagram? (Read 1943 times)
suchit_sapate
YaBB Newbies
*
Offline


Hi Everybody !!!!!!!!!!

Posts: 5
Joined: Apr 3rd, 2009
How to get mid co-ordinate of diagram?
Apr 6th, 2009 at 11:15am
Print Post  
Hi,
I am new in wpf.
  

Suchit Sapate&&Persistent Systems Ltd.
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to get mid co-ordinate of diagram?
Reply #1 - Apr 6th, 2009 at 12:53pm
Print Post  
Rect r = diagram.Bounds;
Point midPoint = new Point (r.Left + r.Width / 2, r.Top + r.Height / 2);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
suchit_sapate
YaBB Newbies
*
Offline


Hi Everybody !!!!!!!!!!

Posts: 5
Joined: Apr 3rd, 2009
Re: How to get mid co-ordinate of diagram?
Reply #2 - Apr 6th, 2009 at 1:18pm
Print Post  
How to get mid point of diagram before zoom in and after zoom in
  

Suchit Sapate&&Persistent Systems Ltd.
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to get mid co-ordinate of diagram?
Reply #3 - Apr 6th, 2009 at 2:01pm
Print Post  
Check this:
http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=123686325...

but instead of calling ClientToDoc for the mouse position, call it with new Point(scrollViewer.ActualWidth/2, scrollViewer.ActualHeight/2) as an argument.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint