I'm looking for a way to draw a horizontal rule across my Silverlight App. I'd like to be able to insert it in the XAML rather than the C#. Can't seem to find much via Google or MSDN.
Thanks!
Just use something like this:
HRULE:
<Border Margin="48,67,30,0"
Name="border1"
Height="2"
VerticalAlignment="Top"
BorderBrush="Black"
BorderThickness="2" />
VRULE:
<Border BorderBrush="Black"
BorderThickness="2"
Margin="92,124,0,62"
Name="border2"
HorizontalAlignment="Left"
Width="2" />
Similar to using a border you can also use a rectangle - I believe this is the 'recommended' way to do a horizontal or vertical line rather than using a line element.
<Rectangle Height="1" Fill="Black" />
Or, if for example you need it below some kind of block element you can always add a border just on the bottom of the element...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With