From 74e60e3d9c1328a6c473389b16260957ec229c1b Mon Sep 17 00:00:00 2001 From: Qrasa Date: Sun, 3 May 2026 20:04:56 +0800 Subject: [PATCH] Fix LoadingScreen template: bind Foreground to ProgressRing and use AccentBrush by default ### Fix: LoadingScreen does not apply Foreground to ProgressRing #### Problem The `LoadingScreen` control exposes the `Foreground` property, but it is not used within the control template. As a result, setting `Foreground` has no effect on the visual appearance of the loading indicator. Additionally, the style contains duplicate `Background` setters, where the first one is overridden. #### Changes - Bind `Foreground` to the inner `ProgressRing` via `TemplateBinding` - Add a default `Foreground` value using `AccentBrush` to match Wpf.Ui theming - Remove the redundant `Background` setter #### Result - `Foreground` now correctly controls the `ProgressRing` color - Default appearance follows the current theme accent color - Cleans up redundant style definition #### Example ```xml Now correctly changes the loading indicator color. --- .../Controls/LoadingScreen/LoadingScreen.xaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Wpf.Ui/Controls/LoadingScreen/LoadingScreen.xaml b/src/Wpf.Ui/Controls/LoadingScreen/LoadingScreen.xaml index 1ccec88bf..3292b13b9 100644 --- a/src/Wpf.Ui/Controls/LoadingScreen/LoadingScreen.xaml +++ b/src/Wpf.Ui/Controls/LoadingScreen/LoadingScreen.xaml @@ -11,10 +11,15 @@ xmlns:controls="clr-namespace:Wpf.Ui.Controls"> -