Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting DataContext of DataTemplate's root element causes next elements to loose context until recycled #11600

Closed
FrozDark opened this issue Mar 7, 2023 · 1 comment
Labels
area/items-repeater Categorizes an issue or PR as relevant the ItemsRepeater control difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...) project/navigation-lifecycle 🧬 Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)

Comments

@FrozDark
Copy link

FrozDark commented Mar 7, 2023

Current behavior

All next element after the first one is looses bind context. Scrolling elements will restore context (I think when recycled)

agaga

Expected behavior

No loosing context

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

Repro
ContextInItemsRepeaterIssue.zip

Workaround

Not to use DataContext

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

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

@FrozDark FrozDark added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Mar 7, 2023
@jeromelaban jeromelaban added project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...) area/items-repeater Categorizes an issue or PR as relevant the ItemsRepeater control and removed triage/untriaged Indicates an issue requires triaging or verification labels Mar 8, 2023
@MartinZikmund MartinZikmund added project/navigation-lifecycle 🧬 Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...) difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Sep 11, 2023
@ramezgerges
Copy link
Contributor

I remember debugging this before and the issue being present, but after some testing now, the issue does reproduce in the provided sample, but is fixed using the latest stable uno version. Pumping up the versions does not reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/items-repeater Categorizes an issue or PR as relevant the ItemsRepeater control difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...) project/navigation-lifecycle 🧬 Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Projects
None yet
Development

No branches or pull requests

4 participants