Search code examples
wpfxamlline

Line with fill and stroke


I'm trying to create a line that looks like this in wpf.

Does anyone have any idea how to do this? I need to bind the x and y coordinates, so a line works really well except I can't make it look like this.

Line with outline and fill


Solution

  • You can't do this with a simple line, but with a Border object it is very easy.

    <Border Width="100" Height="10" Background="#FFFFDAAD" BorderBrush="Orange" BorderThickness="0,3"/>