Step 1 : Write the below code with in MainWindow.xaml
<Window x:Class="Drawline.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <Line X1="10" Y1="10" X2="250" Y1="250" Stroke="Green" StrokeThickness="4" Margin="0,0,1,23"/> </Grid> </Window> |