dotnet / dotnet/wpf

Non existing event subscriptions should raise a build error

Open
#10,787 6 comments 2 reactions 0 assignees View on GitHub
Enhancement Requested
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

If you subscribe to any event in XAML (like `KeyDown`) but the method doesn't exist in your C# code, you can still successfully build your project. But if you run it and the XAML is executed your application crashes.

And because of the fact that it crashes the application (unlike a non existing binding) it should be analyzed and throw an error during the build.

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.