How to resize a Canvas in WPF?

后端 未结 3 1587
渐次进展
渐次进展 2021-01-19 06:58

I\'m writing a WPF app that has a Canvas in it. This canvas will be custom rendered at runtime. It\'s sort of like a game in that it needs to be measured in pix

3条回答
  •  一个人的身影
    2021-01-19 07:35

    Update 2020: on WPF .NET CORE: If the Canvas is a child of a Viewbox, the content is automatically scaled to the Viewbox height and width.

      
    
         
           
         
    
      
    

提交回复
热议问题