[UWP] TouchEffect not working when app compiled with UseDotNetNativeToolchain=true
See original GitHub issueWhen publishing an app to the windows store, it’ll be recompiled with UseDotNetNativeToolchain set to true by Microsoft.
We can test this by building locally with <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
in the Release build configuration, and so far my experience is that code that uses toucheffect doesn’t work (ie I can click stuff and nothing happens - no errors, no ui changes).
I’ve set the TouchEffectPreserver.Preserve();
line in the UWP project’s app.xaml.cs file but no luck so far.
Has anyone else dealt with this issue?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Xamarin.CommunityToolKit TouchEffect.Command not ...
I can't succeed to make the xct:TouchEffect.Command working on UWP while: ... The binding for the command of the button is working on...
Read more >Touch Effect | Xamarin.Forms | Xamarin Community Toolkit
TouchEffect allows any view (not only buttons) to handle “Normal”, “Pressed”, “Hovered” states and change its appearance according to the ...
Read more >How to use Maui TouchEffect? - Microsoft Q&A
In Xamarin Forms we could use TouchEffect to determine if there was a touch and what type. The code we used is not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
as a final comment, this is the bare minimum I’ve kept
no system.reflection needed.
on a project where I’m using rgplugins.popup, which also needs to be added to this list of assemblies, I’ve joined them up like so:
I’ve found something that makes it work - just not sure it is a good workaround. Had to add
using System.Reflection;
and then the following initialization for Xamarin forms in app.xaml.cs:this was following an example from https://www.mrgestures.com/#FAQs. This might be problematic as it might conflict with the fixes for other packages which do similar things, but at least there’s some progress.