CommunityToolkit / CommunityToolkit/Maui

[BUG] DrawingView Doesn't Clear Lines When Navigating Back to Screen B

Open
#2,153 23 comments 0 reactions 0 assignees View on GitHub
area/views bug
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Did you read the "Reporting a bug" section on Contributing file?

- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

### Current Behavior

I am facing an issue with the DrawingView in the MAUI Community Toolkit. The problem occurs when navigating between two screens (A and B) in my app.

Actual Behavior: The line/signature drawn on the DrawingView remains visible even after navigating away and coming back, despite attempting to clear the drawing.

### Expected Behavior

When the user navigates back to Screen A and then returns to Screen B, the DrawingView should be cleared, showing a blank canvas.

### Steps To Reproduce

Launch the app, which starts on Screen A.
On Screen A, there is a "Go" button. When the user clicks this button, the app navigates to Screen B.
On Screen B, the user draws a signature or line using the DrawingView.
The user then navigates back to Screen A.
Upon clicking the "Go" button again to navigate to Screen B, the previously drawn line/signature is still visible, even though I have attempted to clear the DrawingView when navigating back.

### Link to public reproduction project repository

https://github.com/jamesmontemagno/MauiSignaturePad

### Environment

```markdown
- .NET MAUI CommunityToolkit:
- OS:
- .NET MAUI:
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.