0

I am looking in a WinRT/Universal Application Xaml file, and I see references to StaticResource and a new (in Windows 8.1) ThemeResource markup extension. Here is an example:

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> </Grid>

I understand that the resource 'ApplicationPageBackgroundThemeBrush' is defined as a default resource brush. However, what I am looking for is where the ThemeResource markup extension as defined in a .winmd or .dll file so that I can see all of its properties and methods. It doesn't appear that I can access this type in a code-behind (or any other code file).

As an example, the Binding markup extension I can see is defined in Windows.UI.Xaml.Data.Binding in the resource file C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd.

However, I do not see any definition of StaticResource or ThemeResource. Where are these objects located and defined?

Mike-E
  • 2,477
  • 3
  • 22
  • 34
  • "It doesn't appear that I can new one up" do you mean you want to override a themeresource? – WPMed Mar 30 '15 at 12:33
  • I edited the question to clarify. I am looking to access the type itself form a code-behind, or any code file outside of a Xaml file. Once I can do that then I can look into doing such things as overriding (assuming it's not a sealed class). – Mike-E Mar 30 '15 at 13:13

1 Answers1

0

After digging around, the StaticResource and ThemeResource are not used at all in the provided APIs, but used automagically behind the scenes of the COM components when Xaml parsing and deserialization is performed.

Mike-E
  • 2,477
  • 3
  • 22
  • 34