When I add many Paths on canvas and zoom out canvas, some paths was disappeared.
I execute on Window 10, 64 bit and .Net 4.7
Please let me know, why some paths was disappeared and solution for this issue.
Thank you so much!
When I add many Paths on canvas and zoom out canvas, some paths was disappeared.
I execute on Window 10, 64 bit and .Net 4.7
Please let me know, why some paths was disappeared and solution for this issue.
Thank you so much!
Hi,
Welcome to our Microsoft Q&A platform!
You can add a Viewbox to the outermost layer of the Canvas.
<Viewbox>
<Canvas Width="400" Height="200" Name="canva">
...
</Canvas>
</Viewbox>
Thanks.
Dear AlexLi-MSFT
Thank for your answer, but it isn't good in my case.
Code add rectangle into canvas below:
p = new Path();
p.Stroke = Brushes.Black;
p.Fill = Brushes.Transparent;
RectangleGeometry rectangleGeometry = new RectangleGeometry(new Rect(20, 20, 200, 20));
p.Data = rectangleGeometry;
p.StrokeThickness = 0.13;
You can fix your code p.StrokeThickness = 1,then test your code.
p.StrokeThickness = 1 is worked, but I don't want to change StrokeThickness so much.
Please let me know, the minimum value StrokeThickness when scale canvas.
5 people are following this question.