Draw a line from Point(0,0) to Point (100,100) on the canvas with the default units of device-independent pixels
<Window x:Class="LineInDefaultSystem"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Line in Default System" Height="300" Width="300">
<Canvas Height="300" Width="300">
<Line X1="0" Y1="0" X2="100" Y2="100" Stroke="Black"
StrokeThickness="2" />
</Canvas>
</Window>
Related examples in the same category