Skip to content

Avalonia: Convention based binding throws exception for MenuItem controls #997

@armstrom

Description

@armstrom

When relying on convention based bindings for menu items an exception is thrown: "System.Exception: 'No target found for method FileExit.'".

The issue only occurs if a matching method name is found in the ViewModel, if no method with a matching name is present then there is no exception. This indicates that Caliburn is attempting to wire up the command but failing to properly do so. If explicit binding is made to the same handler in the view model, everything works as expected. This issue does not seem to impact other action source types that I've tested such as Buttons which bind by convention properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions