-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Current behavior
When using utu:Shadow.Opacity inside a DataTemplate, binding to a property (e.g., {x:Bind GlowOpacity} or {Binding GlowOpacity}) does not work. The property getter is not called, and the shadow does not appear. However, binding works for other controls (e.g., TextBlock), and hard-coding the value for Opacity works as expected.
Expected behavior
utu:Shadow.Opacity should support data binding in DataTemplates, allowing dynamic shadow opacity per item.
How to reproduce it (as minimally and precisely as possible)
- Clone the minimal repro project: https://github.com/HakanL/UnoToolkitShadowIssue
- Open
MainPage.xamland observe the use of{x:Bind GlowOpacity}and{Binding GlowOpacity}forutu:Shadow.Opacity. - Run the app. The value is shown in a
TextBlock(binding works), but the shadow does not appear unless the value is hard-coded.
Nuget Package:
Uno.Toolkit.UI
Package Version(s): SDK 6.3.28
(latest as of .NET 9, please specify if needed)
Affected platform(s):
- Skia
- WebAssembly
- Android
- iOS
- macOS (AppKit)
- Mac Catalyst
- GTK (Linux)
- Linux Framebuffer
- Tizen
- Windows
IDE:
- Visual Studio 2022
Relevant plugins:
None
Anything else we need to know?
The property getter for the bound value is not called for utu:Shadow.Opacity, but is called for other controls in the same DataTemplate. This suggests a limitation or bug in the Uno.Toolkit Shadow control’s binding support.