Skip to content

utu:Shadow.Opacity does not support data binding in DataTemplate (Uno.Toolkit.UI) #1493

@HakanL

Description

@HakanL

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.xaml and observe the use of {x:Bind GlowOpacity} and {Binding GlowOpacity} for utu: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.

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't workingtriage/untriagedIndicates an issue requires triaging or verification.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    SYSTEM_READY >> ...MS