Windows RT和Universal Apps中,StaticResource和ThemeResource是在哪里定义的?

In Windows RT and Universal Apps, Where Are StaticResource and ThemeResource Defined?

我正在查看一个 WinRT/Universal 应用程序 Xaml 文件,我看到了对 StaticResource 的引用和一个新的(在 Windows 8.1 中)ThemeResource 标记扩展。这是一个例子:

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

我了解到资源 'ApplicationPageBackgroundThemeBrush' 是 defined as a default resource brush。但是,我正在寻找的是在 .winmd 或 .dll 文件中定义的 ThemeResource 标记扩展的位置,以便我可以看到它的所有属性和方法。我似乎无法在代码隐藏(或任何其他代码文件)中访问此类型。

举个例子,我能看到的Binding markup extension定义在资源文件C:\Program Files (x86)\Windows Windows.UI.Xaml.Data.Binding Kits.1\References\CommonConfiguration\Neutral\Windows.winmd。

但是,我没有看到 StaticResource 或 ThemeResource 的任何定义。这些对象在哪里定位和定义?

经过仔细研究,StaticResource 和 ThemeResource 根本没有在提供的 API 中使用,而是在执行 Xaml 解析和反序列化时在 COM 组件的幕后自动使用。