wpf
wpf copied to clipboard
Usage of fluent resource as StaticResource throws XamlParseException
Description
Usage of resources defined in Fluent theme as StaticResource is not supported in the current implementation for Fluent themes. The usage throws a XamlParseException in doing so.
Reproduction Steps
Create an application that supports Fluent styles.
- Use
ThemeModeto instantiate Fluent styles (Do not include Fluent resource dictionary). - Define a TextBlock as follows:
<TextBlock Style="{StaticResource BodyStrongTextBlockStyle"} Text="Hello World!" />
Expected behavior
Application should launch without any failure.
Actual behavior
Application throws XamlParseException
Regression?
No response
Known Workarounds
The resource can be used as a DynamicResource.
Impact
No response
Configuration
Windows 11 .NET 9 x64
Other information
No response