Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How do I get the Ruler's scale range? (Read 2225 times)
chowy
Junior Member
**
Offline


I Love MindFusion!

Posts: 72
Joined: May 8th, 2017
How do I get the Ruler's scale range?
May 8th, 2017 at 7:01am
Print Post  
When I use the Ruler Control in WPF, How do I get the Ruler's scale range?? Smiley
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: How do I get the Ruler's scale range?
Reply #1 - May 8th, 2017 at 2:20pm
Print Post  
It's determined by Diagram.Bounds.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
chowy
Junior Member
**
Offline


I Love MindFusion!

Posts: 72
Joined: May 8th, 2017
Re: How do I get the Ruler's scale range?
Reply #2 - May 9th, 2017 at 3:39am
Print Post  
Slavcho wrote on May 8th, 2017 at 2:20pm:
It's determined by Diagram.Bounds.

Regards,
Slavcho
Mindfusion


Thanks for your reply!!
but now I have a need,The Mindfusion default drawing origin (0,0) is in the upper left corner,  I want to set the origin of the drawing origin (0,0) to the bottom right corner, do you know how to implement it ? The width and Height of Diagram.Bounds can not be set to a negative number, So I need to know how to set the scale of the ruler to be negative number!
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: How do I get the Ruler's scale range?
Reply #3 - May 9th, 2017 at 4:23am
Print Post  
You can set Diagram.Bounds to new Rect(-width, -height, width, height), which should end with 0,0 at bottom right. If you need the coordinates to grow from right to left and from bottom to top, the diagram does not support that for its intrinsic coordinates, but you could set Ruler's NegatedX and NegatedY properties to show them as such to users.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint