wpf icon indicating copy to clipboard operation
wpf copied to clipboard

Usage of fluent resource as StaticResource throws XamlParseException

Open harshit7962 opened this issue 1 year ago • 0 comments

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 ThemeMode to 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

harshit7962 avatar Aug 12 '24 14:08 harshit7962