fix(controls): LoadingScreen template: bind Foreground to ProgressRing and use A…#1707
Open
Qrasa510 wants to merge 2 commits intolepoco:mainfrom
Open
fix(controls): LoadingScreen template: bind Foreground to ProgressRing and use A…#1707Qrasa510 wants to merge 2 commits intolepoco:mainfrom
Qrasa510 wants to merge 2 commits intolepoco:mainfrom
Conversation
…ccentBrush 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 <ui:LoadingScreen Foreground="Red"/> Now correctly changes the loading indicator color.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix LoadingScreen Foreground not applied to ProgressRing
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
The
LoadingScreencontrol exposes aForegroundproperty, but it is not applied to the innerProgressRinginside the control template. As a result, settingForegroundonLoadingScreenhas no effect on the loading indicator color.Additionally, the style contains duplicate
Backgroundsetters, where the first one is overridden and has no effect.Issue Number: N/A
What is the new behavior?
Foregroundproperty is now bound to the innerProgressRingviaTemplateBindingForegroundvalue is introduced usingAccentBrushto align with Wpf.Ui theme behaviorBackgroundsetter is removedAs a result:
Foregroundcorrectly controls the loading indicator colorOther information
This change improves consistency with expected WPF behavior, where control-level
Foregroundshould cascade into visual elements within the control template.Example usage: