From 91634922fcc6cdc248e81834a0963dee47c96e05 Mon Sep 17 00:00:00 2001 From: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com> Date: Tue, 24 Feb 2026 14:16:03 +0800 Subject: [PATCH] fix(settings-ui): Get rid of build warning - change binding mode to OneTime for update controls (#45765) ## Summary of the Pull Request Change the binding mode to `OneTime` for various update controls in the settings UI to improve performance and reduce unnecessary updates. Without the change, beside the functionality/performance issue, there are list of build warning like: src\settings-ui\Settings.UI\SettingsXAML\Controls\Dashboard\CheckUpdateControl.xaml(15,13): XamlCompiler warning **WMC1506**: OneWay bindings require at least one of their steps to support raising notifications when their value changes ## Detailed Description of the Pull Request / Additional comments Updated the binding mode for controls in `CheckUpdateControl.xaml` and `ShortcutConflictWindow.xaml` to `OneTime` to enhance efficiency. ## Validation Steps Performed Manually tested the settings UI to ensure that the controls behave as expected without unnecessary updates. ``` --- .../Controls/Dashboard/CheckUpdateControl.xaml | 10 +++++----- .../Controls/Dashboard/ShortcutConflictWindow.xaml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/CheckUpdateControl.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/CheckUpdateControl.xaml index 38b79c31e6..971e151ea1 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/CheckUpdateControl.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/CheckUpdateControl.xaml @@ -1,4 +1,4 @@ - + + Visibility="{x:Bind UpdateAvailable, Mode=OneTime}"> @@ -38,7 +38,7 @@ - + @@ -47,7 +47,7 @@ Padding="0,0,4,0" VerticalAlignment="Center" ColumnSpacing="16" - Visibility="{x:Bind UpdateAvailable, Converter={StaticResource ReverseBoolToVisibilityConverter}, Mode=OneWay}"> + Visibility="{x:Bind UpdateAvailable, Converter={StaticResource ReverseBoolToVisibilityConverter}, Mode=OneTime}"> @@ -72,7 +72,7 @@ - + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictWindow.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictWindow.xaml index 4f20f0f3ff..be0a244c6e 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictWindow.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Controls/Dashboard/ShortcutConflictWindow.xaml @@ -105,14 +105,14 @@ HorizontalAlignment="Right" VerticalAlignment="Center" Click="OnIgnoreConflictClicked" - IsChecked="{x:Bind ConflictIgnored, Mode=OneWay}" /> + IsChecked="{x:Bind ConflictIgnored, Mode=OneTime}" /> + IsEnabled="{x:Bind ConflictVisible, Mode=OneTime}" + ItemsSource="{x:Bind Modules, Mode=OneTime}"> + IsEnabled="{x:Bind ShouldShowSysConflict, Mode=OneTime}">