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] DrawingCompletedCommand improperly implemented #1474

@dansiegel

Description

@dansiegel

Description

The Renderers seems to have improperly implemented calling the Command. As a matter of standard practice, CanExecute for a Command expects the same value that will be passed to Execute. The purpose of CanExecute is to evaluate the Command Parameter to determine whether or not it should execute. The sample below points to the UWP renderer, but it appears all of the platforms have implemented this the same wrong way.

if (Element.DrawingCompletedCommand?.CanExecute(null) ?? false)
Element.DrawingCompletedCommand.Execute(elementPoints);

Steps to Reproduce

n/a

Expected Behavior

A Command's CanExecute(object obj) should have the same object passed in that is passed into the Execute(object obj).

Actual Behavior

A null value is passed to CanExecute, the points are passed to Execute.

Basic Information

  • Version with issue: 1.2

Workaround

n/a

Reproduction imagery

n/a

Reproduction Link

n/a

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