Skip to content

Conversation

Zakariathr22
Copy link

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 👍

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
2 participants