How do I make an image stretch to fill in this WPF / XAML application?

后端 未结 4 1097
慢半拍i
慢半拍i 2021-01-05 18:24

When my program displays an image which is smaller than the Image GUI object defined in XAML, it does not get stretched to fit as I would like it to. For example a 256x256

4条回答
  •  Happy的楠姐
    2021-01-05 18:57

    As many people said above here is the code for using ImageBrush. Which also sets the image while MouseOver. Thought it might helps new users.

    
        
    
        
    
    
    

提交回复
热议问题