Image fill the space on the button in WPF

后端 未结 4 1632

I have Button on my WPF app and I want an Image to fill the Button completely. Currently I have The following code and it does not fil

4条回答
  •  情深已故
    2021-01-20 06:35

    You can try changing your Image to an ImageBrush and then assign that to your BackGround your image will then stretch over the inner surface of your button.

    
        
            
        
        
            

    or add a TextBlock to your Button Content and assign your Image as a BackGround to it.

    
        
    
    
        
    
    

提交回复
热议问题