'The program should not have come this far Points = MouseLeftButtonDownOnDrawingCanvas.Cloneĭim NewCustomPolygon As New CustomPolygon(MouseLeftButtonDownOnDrawingCanvas.Clone)ĮlseIf CanvasEvent = SelectedDrawingEvent.DrawLine Thenĭim NewCustomLine As New CustomLine(MouseLeftButtonDownOnDrawingCanvas.Clone) If CanvasEvent = SelectedDrawingEvent.DrawClosedPolygon Then If MouseLeftButtonDownOnDrawingCanvas.Count > 1 Then 'Check if the Lines or Polygons could be ended or closed: In DrawingCanvas.vb: If Mouse.RightButton = MouseButtonState.Pressed Then In CustomPolygon.vb, author create a custom control, we can modify the Brush: drawingContext.DrawGeometry( Brushes.Red, pen, pathGeometry) We can draw closed polygon, after we draw a closed polygon and right click, this polygon will be filled with specific color(Default: Black). According to your description, I suggest you to check the following sample:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |