TemplateStudio
TemplateStudio copied to clipboard
Refactor UpdateTitleBar method
PR checklist
Quick summary of changes Removed redundant assignment and simplified theme assignment logic. Also, eliminated unnecessary variables.
Which issue does this PR relate to?
Applies to the following platforms:
- [x] WinUI
- [ ] WPF
- [ ] UWP
Anything that requires particular review or attention? delete comment issues/4516 is neccesary (TitleBarHelper.cs)
Do all automated tests pass?
Have automated tests been added for new features?
If you've changed the UI:
- Be sure you are including screenshots to show the changes.
- Be sure you have reviewed the accessibility checklist.
If you've included a new template:
- Be sure you reviewed the Template Verification Checklist.
- Be sure it's included in the list on this UWP or WPF getting started doc.
Have you raised issues for any needed follow-on work?
Have docs been updated?
If breaking changes or different ways of doing things have been introduced, have they been communicated widely?
thanks for sharing that. I do understand that logic has a lot of redundancies and I am waiting for appwindow titlebar merger to do a cleanup. However, that piece of code is necessary. There is a difference between RequestedTheme and "applied theme". so the current applied theme will not be reflected if we only keep code for requested theme. Still, that is a good approach. More eyes on these kind of opportunities and we will have a good tidy codebase. Thanks for doing it