dotnet / dotnet/wpf

Button.MouseLeftButtonDown is silently disabled

Open
#288 5 comments 1 reaction 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

> The `OnMouseLeftButtonDown` method marks the `MouseLeftButtonDown` event as handled.
_Source: https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.button?view=netframework-4.8_

I guess many WPF programmers at one point will end up wasting time trying to figure out why the event `MouseLeftButtonDown` does not work on the `Button` control... I just wasted 30 minutes...

My suggestions is:

- Remove the event completely from `Button` control
- Mark the event as _"You can't touch this"_
- Stop making standard events unusable by not setting the event as handled in `OnMouseLeftButtonDown`

Another frustrated WPF programmer:
https://stackoverflow.com/questions/22813608/wpf-button-mouseleftbuttondown-doesnt-work-at-all

Random internet quote:
> Oh My God! They Killed Button.MouseLeftButtonDown!
> You bastards!

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.