From f5881fd163c17cd30ce2fb56700e9ca484fab54d Mon Sep 17 00:00:00 2001 From: Marco Gavelli Date: Tue, 13 Jun 2023 19:48:27 +0200 Subject: [PATCH 1/2] Switch to binding --- src/Files.App/UserControls/StatusBarControl.xaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Files.App/UserControls/StatusBarControl.xaml b/src/Files.App/UserControls/StatusBarControl.xaml index 5a02ee72ba3c..592cd8f92f99 100644 --- a/src/Files.App/UserControls/StatusBarControl.xaml +++ b/src/Files.App/UserControls/StatusBarControl.xaml @@ -208,7 +208,8 @@ Orientation="Horizontal"> From d925ddc3fffae1e7abde1f9702843b5e7c07c2a2 Mon Sep 17 00:00:00 2001 From: Marco Gavelli Date: Tue, 13 Jun 2023 20:40:35 +0200 Subject: [PATCH 2/2] Do not use two-way binding when parent has x:Load --- src/Files.App/UserControls/StatusBarControl.xaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Files.App/UserControls/StatusBarControl.xaml b/src/Files.App/UserControls/StatusBarControl.xaml index 592cd8f92f99..9f23946fb485 100644 --- a/src/Files.App/UserControls/StatusBarControl.xaml +++ b/src/Files.App/UserControls/StatusBarControl.xaml @@ -232,10 +232,11 @@ Grid.Row="1" Padding="4" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" + DataContext="{x:Bind DirectoryPropertiesViewModel, Mode=OneWay}" IsItemClickEnabled="True" ItemClick="BranchesList_ItemClick" ItemsSource="{x:Bind DirectoryPropertiesViewModel.BranchesNames, Mode=OneWay}" - SelectedIndex="{x:Bind DirectoryPropertiesViewModel.SelectedBranchIndex, Mode=TwoWay}" + SelectedIndex="{Binding SelectedBranchIndex, Mode=TwoWay}" SelectionMode="Single" />