Hi everyone, I have an image with a menu. I want to draw some lines by choosing an option in the menu. These lines should be drawn on SurfaceInkCanvas by using an object such as an icon or a small image. I want when the user moves a small icon, a line is drawn on the screen. The problem here is I don't know how to translate the image movement into points of stroke because the handler called from the menu doesn't have MouseEventArgs, which means I can't get the position of the image. Here is the code for the handler:
private void ElementMenuItem_ClickDraw(object sender, RoutedEventArgs e) { userInput.Visibility = Visibility.Collapsed; cancelButton.Visibility = Visibility.Collapsed; okButton.Visibility = Visibility.Collapsed; InkCanvasControl.EditingMode = SurfaceInkEditingMode.Ink; InkCanvasControl.IsHitTestVisible = true; InkCanvasControl.DefaultDrawingAttributes.Color = Colors.Red; }
With this code, I can draw by using finger, but not using the image. Could you help me to solve this? Thanks.
Regards,
Faro