wpf icon indicating copy to clipboard operation
wpf copied to clipboard

Supported MouseAction.None in xaml #8842

Open MauNguyenVan opened this issue 11 months ago • 5 comments

Fixes Xaml Unsupported MouseAction.None value #8842

Microsoft Reviewers: Open in CodeFlow

MauNguyenVan avatar Mar 05 '24 18:03 MauNguyenVan

Hello team. I have created a PR. It is finished, please review my code changed

MauNguyenVan avatar Mar 19 '24 19:03 MauNguyenVan

@MauNguyenVan, the team is currently occupied with Win11 theming changes. Once we have bandwidth, we will get to your PR.

dipeshmsft avatar Mar 20 '24 03:03 dipeshmsft

ccing @miloush

Kuldeep-MS avatar Apr 29 '24 11:04 Kuldeep-MS

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.

miloush avatar Apr 29 '24 12:04 miloush

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 avatar Apr 29 '24 16:04 MauNguyenVan

@MauNguyenVan - Thanks for your contribution.

anjali-wpf avatar Jun 24 '24 11:06 anjali-wpf

Glad to contribute.

MauNguyenVan avatar Jul 13 '24 07:07 MauNguyenVan