I want to draw rectangle to position what I get from startPoint, but now it places my rectangle to middle of PictureCanvas, when I want to put it in startPoint position
private void DragSelectComponent_SelectionEnd(DragSelectEventArgs e)
{
Output.Text = "Start: " + e.StartPoint.ToString() + " End: " + e.EndPoint.ToString() + "\n(" + e.EventType + ")\n";
Rectangle rectangle = new Rectangle() { Width = e.EndPoint.X - e.StartPoint.X, Height = e.EndPoint.Y - e.StartPoint.Y, Fill = new SolidColorBrush(Colors.Purple) };
PictureCanvas.Children.Add(rectangle);
}