unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.78k stars 706 forks source link

Binding not working inside GridView #11738

Open morning4coffe-dev opened 1 year ago

morning4coffe-dev commented 1 year ago

Current behavior

When working on a feature for Gallery, I noticed that the when I put elements inside GridView the Binding does not work. I tested this in a new repo and I get the same issue.

image

Expected behavior

image

How to reproduce it (as minimally and precisely as possible)

https://github.com/morning4coffe-dev/uno-platform-testing/tree/doti/grid-view-binding

Workaround

No response

Works on UWP/WinUI

Yes

Environment

No response

NuGet package version(s)

No response

Affected platforms

WebAssembly, Android, iOS, macOS (AppKit), Mac Catalyst, Skia (WPF), Skia (GTK on Linux/macOS/Windows), Skia (Linux Framebuffer), Skia (Tizen)

IDE

Visual Studio 2022

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

jeromelaban commented 1 year ago

This is more looking like a DataContext propagation. In general, though, this particular behavior is generally not used, as DataBinding is on individual items is used. This is what likely made this issue go under the radar.

It seems to be specific to ListViewBase, as the following playground repro shows: https://playground.platform.uno/#1626a15d