Dim lin As New Line lin.Stroke = New SolidColorBrush(Color.FromArgb(100, 255, 0, 0)) lin.StrokeThickness = 5 'lastpnt is the LastPoint added to continue the drawing and it will be null on mouse_up Event If Not lastpnt = Nothing Then lin.X1 = lastpnt.X lin.Y1 = lastpnt.Y lin.X2 = position.X lin.Y2 = position.Y lastpnt.X = position.X lastpnt.Y = position.Y Else lin.X1 = position.X lin.Y1 = position.Y lin.X2 = position.X lin.Y2 = position.Y lastpnt.X = position.X lastpnt.Y = position.Y End If Canvas1.Children.Add(lin)
InkCanvas
Canvas
Children
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)