Add Line and TextBlock to Canvas
<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"> <Canvas Margin="5"> <TextBlock FontSize="14" Text="Lines in a Canvas:"/> <Line X1="50" Y1="200" X2="230" Y2="20" Stroke="Black" StrokeThickness="8"/> </Canvas> </StackPanel> </Window>