1

I'm currently using T10 for developing a simple app, by using Blank template. Then, I saw from Hamburger template that you apply Custom.xaml theme into App.xaml by adding Application.Resource into App.xaml like this

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

I did the same thing into my project, but I'm getting XAML exception.

Here is the message from the exception :

"Error HRESULT E_FAIL has been returned from a call to a COM component."

Did I miss something?

nb : A little note, when I tried to manually type the Application.Resource into App.xaml, the Intellisense didn't catch the Application part, but later show when I tried to complete it with Resource

Muhamad Iqbal
  • 742
  • 1
  • 4
  • 17
  • 1
    Post the exception/error, please. – Jerry Nixon Mar 04 '16 at 17:07
  • Take a look at question [here](http://stackoverflow.com/questions/35852051/adding-basedon-style-on-app-xaml-is-crashing-on-app-initializecomponent). Looks like styles that are `BasedOn` other styles cause the problem. See if you issue goes away after removing the offending styles. Mine did. – akshay2000 Mar 08 '16 at 15:41

2 Answers2

2

For me your issue is here:

<Application.Resources> it should be <common:BootStrapper.Resources>

In other words you should have:

<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>
Damien
  • 2,911
  • 1
  • 25
  • 47
0

Restarting Visual Studio was the solution for me.