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

前端 未结 3 1620
北海茫月
北海茫月 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 03:15

    Simply wrap the Image in a Border control

    
        
    
    

    You could also provide a style you apply to images that does this if you don't want to do it around every image


    Final solution from answer and comments added by Pax:

    
        
    
    

提交回复
热议问题