// form thet evant function private void recgreen_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { } // to that evant function private void myCanvas_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { _startPoint = e.GetPosition(myCanvas); _line = new Polyline(); // Here I want to change the color according to evant function activated _line.Stroke = new SolidColorBrush(Colors.Black); //the black shoude be any color according to evant function activated _line.StrokeThickness = 1; myCanvas.Children.Add(_line); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)