Simple (I think) Horizontal Line in WPF? Simple (I think) Horizontal Line in WPF? wpf wpf

Simple (I think) Horizontal Line in WPF?


How about add this to your xaml:

<Separator/>


I had the same issue and eventually chose to use a Rectangle element:

<Rectangle HorizontalAlignment="Stretch" Fill="Blue" Height="4"/>

In my opinion it's somewhat easier to modify/shape than a separator.Of course the Separator is a very easy and neat solution for simple separations :)


Use a Border of height 1 and don't set the Width (i.e. Width = Auto, HorizontalAlignment = Stretch, the default)