[Material] [V2] [UnoApplicationTemplate] CalendarDatePicker foreground and Background color cannot be changed
Current behavior
| on V1 | on V2 |
|---|---|
![]() |
![]() |
Expected behavior
It should respect the configured values for the foreground and Background
How to reproduce it (as minimally and precisely as possible)
Migrate the Uno Material V2 on the UnoApplicationTemplate
PR with Migration: https://github.com/nventive/UnoApplicationTemplate/pull/290
Environment
Nuget Package:
Uno.Material.WinUI
Package Version(s):
2.5.3
Affected platform(s):
- [x] iOS
- [x] Android
- [ ] WebAssembly
- [x] UWP
- [ ] MacOS
Anything else we need to know?
-
tested on 2.6.0-dev.14
-
Related issue on a different control: https://github.com/unoplatform/Uno.Themes/issues/823
v2.2.0 is 9months old can you check if the issue is still present in the recent versions?
- stable: 2.5.3
- latest: 2.6.0-dev.14
updated to both versions and issue still there, how ever i've took the chance to keep the app on latest stable version(2.5.3) @Xiaoy312
@Arieldelossantos can you check if this issue is still relevant please ?
@agneszitte I updated to the latest stable and my WinUI app is now crashing when opening the page containing that control.
| Package | Previous | Current |
|---|---|---|
| Uno.Material.WinUI | 2.5.3 | 3.0.40 |
| Uno.Toolkit.WinUI.Material | 2.5.8 | 4.2.22 |
I'm guessing there are breaking changes. Where can I find the release notes and breaking changes for those versions?
This is the error:
Error HRESULT E_FAIL has been returned from a call to a COM component.
at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)
at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.Microsoft.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)
at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.Microsoft.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
Ok so my crash was due to a CheckBox and is unrelated to CalendarDatePicker.
The CalendarDatePicker issue is still happening. Setting Background and Foreground don't have any effect. Setting CornerRadius also doesn't seem to work.
The new default values seem to be the ones we want in this case though, so it's not as bad as before. However, the original issue is still valid.

