Can';t将ResourceDictionary添加到App.xaml

Can';t将ResourceDictionary添加到App.xaml,xaml,winrt-xaml,resourcedictionary,template10,Xaml,Winrt Xaml,Resourcedictionary,Template10,我目前正在使用T10开发一个简单的应用程序,使用空白模板。然后,我从Hamburger模板中看到,您通过将Application.Resource添加到App.xaml中,将Custom.xaml主题应用到App.xaml中,如下所示 <common:BootStrapper x:Class="T10Hamburger.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/present

我目前正在使用T10开发一个简单的应用程序,使用空白模板。然后,我从Hamburger模板中看到,您通过将
Application.Resource
添加到
App.xaml
中,将Custom.xaml主题应用到App.xaml中,如下所示

<common:BootStrapper x:Class="T10Hamburger.App" 
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                     xmlns:common="using:Template10.Common">

    <Application.Resources>
        <ResourceDictionary Source="Styles\Custom.xaml" />
    </Application.Resources>

</common:BootStrapper>

我在我的项目中也做了同样的事情,但我遇到了XAML异常

以下是来自异常的消息:

“调用COM时返回错误HRESULT E_FAIL 组成部分。”

我错过什么了吗


注意:请注意,当我试图在App.xaml中手动键入
应用程序.Resource
时,Intellisense没有捕捉到
应用程序的
部分,但后来在我尝试使用
资源完成时显示了您的问题:

应该是

换句话说,你应该:

<common:BootStrapper x:Class="T10Hamburger.App" 
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                     xmlns:common="using:Template10.Common">

    <common:BootStrapper.Resources>
        <ResourceDictionary Source="Styles\Custom.xaml" />
    </common:BootStrapper.Resources>

</common:BootStrapper>


重新启动Visual Studio是我的解决方案。

请发布异常/错误。查看问题。看起来是基于其他样式的样式导致了问题。看看你的问题是否会在删除了有问题的样式后消失。我的出现了。仍然出现异常(当我尝试添加时,Intellisense也无法检测到
引导程序)。但是你的回答揭穿了我的假设,所以谢谢你,你使用的是什么版本的模板10?这些示例是否适用于Template 10项目?能否为我压缩解决方案并让我访问?