我目前使用T10開發簡單的應用程序,通過使用空白模板。然後,我從漢堡模板看到你申請Custom.xaml主題爲App.xaml中加入Application.Resource
到App.xaml
這樣無法將ResourceDictionary添加到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例外。
這裏是異常的消息:
「錯誤HRESULT E_FAIL已經從一個COM組件 調用返回」
我錯過了什麼嗎?
注意:一張小紙條,當我試圖手動鍵入Application.Resource
進入App.xaml中,智能感知沒趕上Application
一部分,但後來表明,當我試圖用Resource
請發佈例外/錯誤。 –
看看問題[這裏](http://stackoverflow.com/questions/35852051/adding-basedon-style-on-app-xaml-is-crashing-on-app-initializecomponent)。看起來像'BasedOn'其他樣式導致問題的樣式。在刪除違規風格後,看看您的問題是否會消失。我做到了。 – akshay2000