-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix crashes in TextBox(es) in Fluent theme #10841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The purpose of this PR is to eliminate crashes in Fluent-themed TextBox, RichTextBox, and PasswordBox controls when using the System theme by replacing StaticResource references with DynamicResource for BorderThickness.
- Updated Resource references in TextBox.xaml
- Updated Resource references in RichTextBox.xaml
- Updated Resource references in PasswordBox.xaml
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
TextBox.xaml | Replaced StaticResource with DynamicResource for BorderThickness in multiple triggers and setters |
RichTextBox.xaml | Replaced StaticResource with DynamicResource for BorderThickness in control and focused state setters |
PasswordBox.xaml | Replaced StaticResource with DynamicResource for BorderThickness in focused state setters |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10841 +/- ##
===================================================
- Coverage 13.62876% 13.43457% -0.19419%
===================================================
Files 3316 3316
Lines 664822 664822
Branches 74651 74651
===================================================
- Hits 90607 89316 -1291
- Misses 571519 572908 +1389
+ Partials 2696 2598 -98
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
LGTM |
Description
Since Preview 4, the creation of TextBox, PasswordBox and RichTextBox was crashing when using
System
theme. This was due to the assignment of it'sBorderThickness
asStaticResource
and the resource being declared inVariables.xaml
which is a sibling ofTextBox.xaml
and other files inFluent.xaml
and hence resulting in the crash. The changes here aims to resolve this using theDynamicResource
.Customer Impact
Crash free fluent applications when using
System
theme.Regression
Yes
Testing
Local Build Pass,
Verified the working using a sample application
Risk
Low
Microsoft Reviewers: Open in CodeFlow