-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use WCT SettingsCard in Uno 5: MissingMethodException #16073
Comments
@lukasf Can you try 8.1.240328-rc? Version |
@Youssef1313: That does not help. I upgraded to 8.1.240328-rc, but the same exception still occurs. |
@lukasf this is still being worked on in the RC bits, and is not related to Uno explicitly. You can follow the updates here: CommunityToolkit/Windows#383 |
@jeromelaban why would this not be related to Uno as it's the |
I'd also say that this is clearly related to Uno, since MUX FrameworkElement does not have IsEnabled property and never had. Only Uno 4 had it on FrameworkElement and it was removed and moved to Control (which is the correct place) in Uno 5. @jeromelaban It would be great if you can help the WCT team get this right. SettingsCard is crucial in building a convincing settings experience. |
We do subscribe to But that's available on |
@lukasf I've updated the sample updated you posted, and it's working fine on Android. Note that you may be having issues with the change in the base target for WinAppSDK from 8.1-rc, where you need to change: <PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" /> and use The most likely explanation is a partial build which continued to use the 8.0 version of the community toolkit, but failed because of the wasdk dependency, and still managed to get deployed. Here's the updated sample with versions aligned: 20240402-UnoAppSettingsCard.zip |
Thank you @jeromelaban, this worked indeed and now SettingsCard runs fine with Uno 5.1! |
Current behavior
When adding WCT SettingsControls and placing a SettingsCard in an empty UNO template page, I get an exception on Android (probably on all Non-WinUI heads):
System.MissingMethodException: Method not found: void Microsoft.UI.Xaml.FrameworkElement.remove_IsEnabledChanged(Microsoft.UI.Xaml.DependencyPropertyChangedEventHandler)
I guess this has to do with moving of the IsEnabled property from FrameworkElement to Control in Uno 5.0. But I am using latest Uno 5.1.104 and latest WCT SettingsControl. So I wonder why it still tries to use IsEnabled from FrameworkElement.
The SettingsCard and related controls are critical parts. I cannot move to Uno 5 without these.
Expected behavior
SettingsCard should work without issues.
How to reproduce it (as minimally and precisely as possible)
Add "CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.240109" NuGet package. Add SettingsCard to the MainPage of Uno Template App. Run the Mobile head on Android. See it crash.
UnoAppSettingsCard_2024-03-31 20-11-54Z.zip
Workaround
No response
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
"CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.240109"
"Uno.WinUI" Version="5.1.104"
Affected platforms
Android
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
The same error occurs when using the older SettingsCard from the WCT "Labs".
The text was updated successfully, but these errors were encountered: