Skip to content

Conversation

@Zakariathr22
Copy link

@Zakariathr22 Zakariathr22 commented Aug 21, 2025

Fixes

PR Type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Description

Fixes a crash when disabling the TitleBarPaneToggleButtonStyle.
The crash was caused by a storyboard targeting an invalid property (Background on AnimatedIcon) and by the absence of a TitleBarPaneToggleButtonForegroundDisabled resource.

Current Behavior

  • Disabling a button with the style causes the app to crash.
  • Crash occurs because AnimatedIcon does not support Background, and the style references a missing resource.

New Behavior

  • Storyboard now targets RootGrid.Background instead of AnimatedIcon.Background.
  • A new resource TitleBarPaneToggleButtonForegroundDisabled has been added.
  • Button disables gracefully without crashing, with proper visual feedback.

Motivation and Context

This change prevents application crashes when the button is disabled.

How Has This Been Tested?

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

Screenshots (if appropriate):

image image

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Aug 21, 2025
@Zakariathr22 Zakariathr22 marked this pull request as ready for review August 22, 2025 09:40
@beth-panx beth-panx removed the needs-triage Issue needs to be triaged by the area owners label Aug 28, 2025
@beth-panx beth-panx self-assigned this Aug 28, 2025
@beth-panx
Copy link
Member

Hey @Zakariathr22 - I am mirroring your changes in the internal repo and adding tests for it too. This will be added to the next release. Does that sound good?

@beth-panx beth-panx added the area-TitleBar Issues related to custom window title bars. label Aug 29, 2025
@Zakariathr22
Copy link
Author

Hey @Zakariathr22 - I am mirroring your changes in the internal repo and adding tests for it too. This will be added to the next release. Does that sound good?

Sounds good 👍

@Jay-o-Way
Copy link
Contributor

@beth-panx any ETA?

@beth-panx
Copy link
Member

@beth-panx any ETA?

The changes are checked in to the winui3/main branch in the correct file now. This will make it to WASDK2.0 release as technically it would be an API change.

@dotMorten
Copy link
Contributor

Hopefully in the future we'll see the community contributions be merged instead and give credit where credit is due.

@beth-panx
Copy link
Member

Hopefully in the future we'll see the community contributions be merged instead and give credit where credit is due.

Definitely! After the OSS phase 3 completion, we should be able to do that. Right now, I am just tagging them :/

@Jay-o-Way
Copy link
Contributor

technically it would be an API change

That doesn't make sense to me. This simply looks like a typo fix. Hope this is merged in asap, because many projects are waiting for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-TitleBar Issues related to custom window title bars. 💖community-contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot find a Resource with the Name/Key TitleBarPaneToggleButtonForegroundDisabled

4 participants