Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic once ruler measurements change canvas object size change proportionality (Read 2637 times)
kelum
Full Member
***
Offline


I Love MindFusion!

Posts: 100
Joined: Mar 25th, 2017
once ruler measurements change canvas object size change proportionality
May 13th, 2017 at 9:00am
Print Post  
I added mindfusion ruler for wpf canvas, now once I change the measurement type MM to INCH its not change the nodes sizes that loaded in the canvas



  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: once ruler measurements change canvas object size change proportionality
Reply #1 - May 15th, 2017 at 1:18pm
Print Post  
Ruler.Unit is independent from Diagram.MeasureUnit and the ruler scales can display measures in different units than diagram's. You could assign your own ContextMenu instance to Ruler.ContextMenu, with menu items that change both ruler's and diagram's unit if that's what you need.
  
Back to top
 
IP Logged
 
kelum
Full Member
***
Offline


I Love MindFusion!

Posts: 100
Joined: Mar 25th, 2017
Re: once ruler measurements change canvas object size change proportionality
Reply #2 - May 15th, 2017 at 4:36pm
Print Post  
How can I configure this to, once I change ruler's measurement type, change the diagram object's measurement sizes ?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: once ruler measurements change canvas object size change proportionality
Reply #3 - May 17th, 2017 at 7:03am
Print Post  
You can create your own menu like this -

Code
Select All
ruler.ContextMenu = new ContextMenu();
var inchItem = new MenuItem { Header = "Inch" };
inchItem.Click += (s, e) =>
{
	diagram.MeasureUnit = GraphicsUnit.Inch;
	ruler.Unit = RulerUnit.Inch;
};
ruler.ContextMenu.Items.Add(inchItem); 



Percents' unit does not work for the diagram but only for ruler (showing percentage from diagram's Bounds) so you'll need to skip it from the menu.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint