[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!

Developer technologies | Windows Presentation Foundation
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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.