Sorry for late answer.
I got good results; but by multiplying StrokeThickness of my elements by ViewBox.Width only ( viewBox width = Viewbox.height in my applicaiton)
Multiply by (Viewbox.Width * Viewbox.Height) make the line so thin when zooming , that it disappear.
Your explanations sounds clear and I don't understand your formula does not work for me.
So what I do precisely is :
1. listening to ViewBOwChanged
2. In handling method
2.1 I calculate Zoom value . Zoom = viewBox width
2.2 I Set StrokeThickness for al my shape in the canvas:
StrokeThickness = 3* ViewBox width ( 3 is my default value, when Zoom =1)
Now I face another problem: I have 1000 thousands shape on my canvas,and setting StrokeThickness is costly ! It really makes the zoom much slower.
Are there any news from WPF Team, do they plan to make this useful development ?
I got good results; but by multiplying StrokeThickness of my elements by ViewBox.Width only ( viewBox width = Viewbox.height in my applicaiton)
Multiply by (Viewbox.Width * Viewbox.Height) make the line so thin when zooming , that it disappear.
Your explanations sounds clear and I don't understand your formula does not work for me.
So what I do precisely is :
1. listening to ViewBOwChanged
2. In handling method
2.1 I calculate Zoom value . Zoom = viewBox width
2.2 I Set StrokeThickness for al my shape in the canvas:
StrokeThickness = 3* ViewBox width ( 3 is my default value, when Zoom =1)
Now I face another problem: I have 1000 thousands shape on my canvas,and setting StrokeThickness is costly ! It really makes the zoom much slower.
Are there any news from WPF Team, do they plan to make this useful development ?

