views:

50

answers:

2

Hi all,

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!

+2  A: 

use the <Line> tag. More info here, on MSDN. Also, here is another article you can look at.

Muad'Dib
thanks! I kinda feel like an idiot for missing something so simple.
Siege898
don't mention it. it happens to us all.
Muad'Dib
+2  A: 

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" />
IbrarMumtaz
forgive me I have no WPF experience, but I just cooked them two up now and tested them both out. They both work. The traditional labeldoesn't work so well in WPF for this type of stuff as well as it does in WinForms.
IbrarMumtaz