Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify rectangle stroke only on left and right in WPF?

Tags:

c#

wpf

I want to have rectangle that should have stroke only on left and right side(not on upper and lower side). How can I do it ?

like image 334
Rasto Avatar asked Jun 05 '10 14:06

Rasto


1 Answers

You can't - a rectangle only has a single stroke thickness. A Border, though, uses a thickness structure that can have different thickness on each side:

<Border BorderThickness="5,0,5,0" BorderBrush="Black" />
like image 126
Dan Puzey Avatar answered Sep 26 '22 12:09

Dan Puzey