[WPF] Some paths was disappeared when scale canvas

Trần Bảo Dũng 1 Reputation point
2020-03-31T02:13:32.99+00:00

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!

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,784 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alex Li-MSFT 1,096 Reputation points
    2020-03-31T03:32:13.74+00:00

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.