How do I put a border around an image in WPF?

前端 未结 3 1619
北海茫月
北海茫月 2021-02-05 02:45

I have a StackPanel containing five images and I want to put a black border around each image.

The XAML I have at the moment is:



        
3条回答
  •  臣服心动
    2021-02-05 02:57

    The accepted answer will not work because of the problem described here https://wpf.2000things.com/2011/04/17/279-adding-a-border-around-an-image-control/

    I solved it this way.

    
        
         
        
       
    

提交回复
热议问题