From 6c983bc946c8a630ba8a5c09907af195ef546cb9 Mon Sep 17 00:00:00 2001 From: ddechew Date: Sun, 23 Mar 2025 11:48:06 +0200 Subject: [PATCH] Fix: Rebind BindingContext to restore navigation commands after back navigation --- .../ListViewDemos/ListViewDemos/Views/MainPage.xaml.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/8.0/UserInterface/Views/ListViewDemos/ListViewDemos/Views/MainPage.xaml.cs b/8.0/UserInterface/Views/ListViewDemos/ListViewDemos/Views/MainPage.xaml.cs index 46aa8c53f..1a8866d28 100644 --- a/8.0/UserInterface/Views/ListViewDemos/ListViewDemos/Views/MainPage.xaml.cs +++ b/8.0/UserInterface/Views/ListViewDemos/ListViewDemos/Views/MainPage.xaml.cs @@ -18,5 +18,14 @@ public MainPage() }); BindingContext = this; } + + protected override void OnAppearing() + { + base.OnAppearing(); + // Force refresh the bindings to avoid stale command issues after back navigation + BindingContext = null; + BindingContext = this; + } + }