WPF Image Zooming

后端 未结 4 728
独厮守ぢ
独厮守ぢ 2021-02-09 14:33

I have a Viewbox with an Image inside of it. This is great since the Viewbox will scale the Image to fit the window. However, I need to be able to zoom the image to its full siz

4条回答
  •  花落未央
    2021-02-09 15:25

    You don't need a Viewbox here, by putting the Image in a ScrollViewer and manipulating the VerticalScrollBarVisibility and HorizontalScrollBarVisibility properties, you can make the Image scale or not:

    
        
            
            
        
        
        
            
                
            
            
        
    
    

提交回复
热议问题