public MainWindow() { InitializeComponent(); robot = new Robot(canvasArea, imageRobot, 0, 0); }
/// <summary> /// Example event method for a button Clear_Click to erase everything on the canvas. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonClear_Click(object sender, RoutedEventArgs e) { canvasArea.Children.Clear(); Image robotImage = new Image(); canvasArea.Children.Add(robotImage); robot = new Robot(canvasArea, robotImage, 0, 0); }