microsoft / TemplateStudio

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
Other
2.69k stars 459 forks source link

Refactor UpdateTitleBar method #4683

Closed humbertomoli99 closed 6 months ago

humbertomoli99 commented 1 year ago

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:

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:

If you've included a new template:

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?

pratikone commented 1 year ago

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