RelativeSource
binding is not supported inside ListView.ItemTemplate
#11925
Labels
difficulty/medium 🤔
Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI
kind/bug
Something isn't working
project/binding 🪢
Categorizes an issue or PR as relevant to the binding engine
project/items 🧾
Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
triage/potentially-fixed
Categorizes an issue as potentially fixed by some unlinked PR, fix needs to be verified
Current behavior
When trying to bind to the datacontext with
RelatedSource
, it will display the fallback value.Expected behavior
In UWP, we can use
RelativeSource
inside our bindings to get to the DataContext. It's quite useful especially when we need to use a converter.How to reproduce it (as minimally and precisely as possible)
Workaround
Store the datacontext in a parent xaml element and bind from it.
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
4.9.0-dev.439
Affected platforms
Android, iOS
IDE
Visual Studio 2022
IDE version
17.4.3
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: