WPF Border Thickness increase direction
Posted
by morsanu
on Stack Overflow
See other posts from Stack Overflow
or by morsanu
Published on 2010-04-12T11:08:33Z
Indexed on
2010/04/12
11:33 UTC
Read the original article
Hit count: 432
Hey. Another WPF question. In my XAML code I have a border:
<Border x:Name="myBorder" Background="AliceBlue"
Width="200" Height="200"
BorderThickness="10" BorderBrush="Black">
</Border>
and somewhere in code I increase the BorderThickness
double thickness = myBorder.BorderThickness.Bottom + 2;
myBorder.BorderThickness = new Thickness(thickness);
and the result is that the border's weight increases but not outside the 200x200 width-height, but inner, decreasing the dimension. Is there a way to do the opposite?
© Stack Overflow or respective owner