WPF Image stretch to fill doesn't stretch to the bounds of it's parents

前端 未结 2 1832
眼角桃花
眼角桃花 2020-12-11 05:58

Here\'s my XAML and how it looks like:



        
2条回答
  •  爱一瞬间的悲伤
    2020-12-11 06:27

    your problem is here

    
        
            
            
                                   
    
    

    you have a BorderThickness Attribute which puts the black border around the image, just remove it or set it to 0 and this will solve the problem.

    so your code will be

    
        
            
            
                                   
    
    

    or

    
        
            
            
                                   
    
    

提交回复
热议问题