Use DynamicResource for TextBox SelectionBrush#4322
Conversation
Changed SelectionBrush in TextBox style from StaticResource to DynamicResource for SystemAccentColorLight1Brush. This enables automatic updates to the selection color when the resource changes at runtime, improving theme responsiveness.
|
🥷 Code experts: jjw24 jjw24 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame: ✨ Comment |
|
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows 11 Light theme’s TextBox styling to resolve a crash triggered by Windows theme/accent changes by switching the SelectionBrush lookup to a runtime-updating resource reference.
Changes:
- Changed
QueryBoxStyle’sSelectionBrushfrom{StaticResource ...}to{DynamicResource ...}inWin11Light.xaml.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change switches the resource binding for Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Changed SelectionBrush in TextBox style from StaticResource to DynamicResource for SystemAccentColorLight1Brush.
Resolve #4298. Tested by participants in #4298
Summary by cubic
Switches the TextBox SelectionBrush from StaticResource to DynamicResource so the selection color updates live with the system accent. Improves theme responsiveness and fixes #4298.
Written for commit 71944ab. Summary will update on new commits.