[英]Splitting Generic.Xaml - problem loading MergedDictionaries
在一個相當大的控件庫上工作,generic.xaml 變得很容易失控。 我想通過控制來分割它(盡管對於現在只包含一些簡單命名空間的命名空間)。
為此,我正在添加更多資源詞典。
然后,在 generic.Xaml 中,我添加:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/Generic.Core.xaml" />
</ResourceDictionary.MergedDictionaries>
並且...得到一個加載錯誤。
什么是正確的網址?
這是:
我閱讀了有關包 URL 的 MSDN 部分,但對於看起來如此簡單的內容來說,這聽起來確實很復雜。
;) 請幫忙。
找到了:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Tradex.Presentation;component/Themes/Generic.Core.xaml" />
</ResourceDictionary.MergedDictionaries>
那個有效。
需要為程序集加上前綴(用程序集名稱替換Tradex.Presentation
)並從component
項開始。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.