Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Border on three sides

Tags:

border

wpf

Is there way to create a border that is only on the top, left, and right sides?

like image 786
Jonathan Allen Avatar asked Oct 12 '10 18:10

Jonathan Allen


2 Answers

Yes:

<Border BorderThickness="1 1 1 0" BorderBrush="Black"/> 

Same as goes for Margin, Padding etc.

like image 79
Goblin Avatar answered Oct 02 '22 17:10

Goblin


And just for fun, to do so in code:

var b = new Border();  b.BorderThickness = new Thickness{Top=1, Bottom=0, Left=1, Right=1};  
like image 23
Brady Moritz Avatar answered Oct 02 '22 16:10

Brady Moritz