wpf
wpf copied to clipboard
Supported MouseAction.None in xaml #8842
Hello team. I have created a PR. It is finished, please review my code changed
@MauNguyenVan, the team is currently occupied with Win11 theming changes. Once we have bandwidth, we will get to your PR.
ccing @miloush
Yeah I don't have anything against the code change, the use case seems a bit weak because the gesture will never match anything and the desired outcome can already be achieved by omitting the attribute.
A slight design concern is that the conversion does not roundtrip. None
will produce empty string (for compatibility reasons), but converting empty string back throws. Perhaps an empty string should be added as another case yielding None
.
If we don't know the reason why the None
value was given such a special treatment, then we don't have a good reason not to accept this change.
You see. String.Empty
has already proceeded before.
So, IMO it's always compatibility
https://github.com/dotnet/wpf/blob/11a9d549d2140bbf59d06dbe9717acd13690abc8/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs#L81-L90
@MauNguyenVan - Thanks for your contribution.
Glad to contribute.