You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot use WCT SettingsCard in Uno 5: MissingMethodException #16073
difficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.kind/bugSomething isn't workingtriage/untriagedIndicates an issue requires triaging or verification
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.
@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
@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 IsEnabledChanged property in FrameworkElement? This works on WASM for us in https://toolkitlabs.dev (we deployed with the latest bits last week), but if we haven't checked with Android as the OP has called out. If it's something else we need to do in the Toolkit, what would that be?
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.
But that's available on Control; so maybe it seems within Uno one of the places it was moved was missed with the migration that happened for alignment in Uno 5?
@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:
and use $(DotNetVersion)-windows10.0.22621.0 through out the solution instead of windows10.0.19041.0.
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.
difficulty/tbdCategorizes an issue for which the difficulty level needs to be defined.kind/bugSomething isn't workingtriage/untriagedIndicates an issue requires triaging or verification
Activity
Youssef1313 commentedon Apr 1, 2024
@lukasf Can you try 8.1.240328-rc?
Version
8.0.240109was compiled against Uno 4lukasf commentedon Apr 1, 2024
@Youssef1313: That does not help. I upgraded to 8.1.240328-rc, but the same exception still occurs.
jeromelaban commentedon Apr 2, 2024
@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
michael-hawker commentedon Apr 2, 2024
@jeromelaban why would this not be related to Uno as it's the
IsEnabledChangedproperty inFrameworkElement? This works on WASM for us in https://toolkitlabs.dev (we deployed with the latest bits last week), but if we haven't checked with Android as the OP has called out. If it's something else we need to do in the Toolkit, what would that be?lukasf commentedon Apr 2, 2024
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.
michael-hawker commentedon Apr 2, 2024
We do subscribe to
IsEnabledChangedfor this component here:https://github.com/CommunityToolkit/Windows/blob/426b887898c5c8ec7ef5ed29e1b7adec7489e33b/components/SettingsControls/src/SettingsCard/SettingsCard.cs#L70-L79
But that's available on
Control; so maybe it seems within Uno one of the places it was moved was missed with the migration that happened for alignment in Uno 5?jeromelaban commentedon Apr 2, 2024
@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:
and use
$(DotNetVersion)-windows10.0.22621.0through out the solution instead ofwindows10.0.19041.0.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
lukasf commentedon Apr 3, 2024
Thank you @jeromelaban, this worked indeed and now SettingsCard runs fine with Uno 5.1!