Style a border with a different brush color for each corner

Seems very hacky, but you could define borders within borders, and make only 1 side have a thickness. For example

<Border BorderThickness="0,0,0,10" BorderBrush="Green">
    <Border BorderThickness="0,0,10,0" BorderBrush="Blue">
        <Grid>
            <Button>Hello</Button>
        </Grid>
    </Border>
</Border>

would give a green border on the bottom and a blue border to the right. Isn’t the prettiest piece of Xaml though.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)