Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] DrawingView.ClearOnFinish seems to have no effect #1453

@jfversluis

Description

@jfversluis

Description

Maybe I'm misunderstanding what this does. I expect that this property would leave my current drawing in place when I start to draw a second line. However, this is not the case. Khttps://github.com/xamarin/XamarinCommunityToolkit/blob/develop/src/CommunityToolkit/Xamarin.CommunityToolkit/Views/DrawingView/Renderer/DrawingViewRenderer.ios.cs#L79 it is correctly checked and the collection is not cleared, however here the collection is still cleared.

Only tested on iOS, but looking at the Android renderer same thing happens there, so will be good to check all platforms.

Steps to Reproduce

  1. Implement a DrawingView like below
<xct:DrawingView ClearOnFinish="False" LineColor="Red" BackgroundColor="LightGray" HeightRequest="200" Points="{Binding DrawPoints}" DrawingCompletedCommand="{Binding DrawCompleted}" />
  1. Draw on the canvas and stop drawing by raising your finger/pointer
  2. Draw a second line and observe that the first line is erased

Expected Behavior

Both lines are shown on the canvas

Actual Behavior

Only one line at a time is shown on the canvas

Basic Information

  • Version with issue: Current nightly
  • Last known good version: N/A
  • IDE: VSMac
  • Platform Target Frameworks:
    • iOS: 14.5
    • Android: Not tested on Android, but looking at the code it also happens here

Workaround

None that I know of right now

Reproduction imagery

Reproduction Link

Metadata

Metadata

Assignees

No one assigned

    Labels

    a/DrawingViewbugSomething isn't working. Breaky break.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions