Add Line to StackPanel
<Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WPF" Height="250" Width="500"> <StackPanel Orientation="Horizontal"> <StackPanel Margin="5"> <TextBlock FontSize="14" Text="Lines in a StackPanel:"/> <Line X1="10" Y1="10" X2="230" Y2="40" Stroke="Black" StrokeThickness="5"/> </StackPanel> </StackPanel> </Window>