Skip to content

Fix ListView demo navigation issue after back navigation #600

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ddechew
Copy link

@ddechew ddechew commented Mar 23, 2025

Problem

In the ListViewDemos sample (under 8.0 -> Views -> ListViewDemos), navigation using TextCell items stops working after returning from a detail page using the back arrow.

Although the BindingContext remains set, the commands on TextCells stop responding after navigating back.

Solution

In MainPage.xaml.cs, I added a workaround that forces the page to refresh its bindings when it becomes visible again:

protected override void OnAppearing() { base.OnAppearing(); BindingContext = null; BindingContext = this; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant