Skip to content

fix: XamlParseException due to missing ThemeResource fallback#910

Draft
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/xaml-themeresource-fallback
Draft

fix: XamlParseException due to missing ThemeResource fallback#910
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/xaml-themeresource-fallback

Conversation

@sentry

@sentry sentry Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

This PR addresses the Windows.UI.Xaml.Markup.XamlParseException that occurred when GridViewItemCheckBoxBorderBrush could not be found, leading to application crashes on certain Windows/WinUI contract versions.

The root cause was identified as the GridViewItemCheckBoxBorderBrush being a system ThemeResource that is not universally available across all Windows/WinUI contract versions where the contract13Present style is applied. The ResourceDictionary.ThemeDictionaries in Screenbox/Styles/ItemContainer.xaml lacked a fallback StaticResource definition for this key.

To fix this, StaticResource fallbacks for GridViewItemCheckBoxBorderBrush have been added to the Default, Light, and HighContrast ThemeDictionaries within Screenbox/Styles/ItemContainer.xaml:

  • Default/Light themes now use ControlStrongStrokeColorDefaultBrush.
  • HighContrast theme now uses SystemColorButtonTextColorBrush.

This ensures that the XAML parser can always resolve the GridViewItemCheckBoxBorderBrush resource, preventing the XamlParseException and improving application stability across different Windows versions.

Fixes SCREENBOX-32

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants