Wpf – Different Color to each side in Border in WPF XAML


I want to have different color to each side of a border in WPF XAML. How can i do this.

<Border BorderThickness="1,2,3,4" BorderBrush="Blue"></Border>

Best Solution

A bit hacky, but it works.

    <Border BorderThickness="1,0,0,0" BorderBrush="Blue"/>
    <Border BorderThickness="0,2,0,0" BorderBrush="Red"/>
    <Border BorderThickness="0,0,3,0" BorderBrush="Green"/>
    <Border BorderThickness="0,0,0,4" BorderBrush="Orange"/>

Probably better to create your own Decorator.