Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColorPlugin does not work for WPF with net6 (but works for net48) #4445

Open
1 of 7 tasks
snechaev opened this issue Jul 21, 2022 · 1 comment
Open
1 of 7 tasks

ColorPlugin does not work for WPF with net6 (but works for net48) #4445

snechaev opened this issue Jul 21, 2022 · 1 comment

Comments

@snechaev
Copy link
Contributor

snechaev commented Jul 21, 2022

馃悰 Bug Report

After migrating a WPF project from net48 to net6 the ColorPlugin stopped working - just returns {{DependencyProperty.UnsetValue}} from Convert. The value passed into the Convert is not null of course.

Expected behavior

ColorPlugin should work in the same way as for net48.

Reproduction steps

  1. Take sample project
    TipCalc.zip
  2. Run project with net48 and observe red TextBlock under the "Tip to leave" (converter working)
  3. Run project with net6 and see no red color on TextBlock - converter does not work

Configuration

Version: 8.0.2 (MvvmCross 8.0.2 + MvvmCross.Plugin.Color 8.0.2)

Platform:

  • 馃摫 iOS
  • 馃 Android
  • 馃弫 WPF
  • 馃寧 UWP
  • 馃崕 MacOS
  • 馃摵 tvOS
  • 馃悞 Xamarin.Forms

Additional information
After quick research I found that IMvxNativeColor is not registered for net6 build, and is registered for net48

@snechaev
Copy link
Contributor Author

snechaev commented Sep 9, 2022

Possible temporary workaround

Mvx.IoCProvider.RegisterSingleton<IMvxNativeColor>(() => new MvvmCross.Plugin.Color.Platforms.Wpf.MvxWpfColor());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant