我使用C#編寫Windows 8.1應用程序,並使用GalaSoft提供的MVVM-Light Toolkit進行編程。每個字典條目必須具有關聯的鍵屬性
我只有下面的代碼:
<Application.Resources>
<vm:ViewModelLocator x:Key="Locator" xmlns:vm="using:Scedule.ViewModel" />
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resource Dictionaries/StandardStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
錯誤「每個字典條目必須具有相關聯的密鑰屬性」發生時,並且當我要麼僅去除消失
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resource Dictionaries/StandardStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
或
<vm:ViewModelLocator x:Key="Locator" xmlns:vm="using:Scedule.ViewModel" />
誰能告訴我這裏的問題是什麼?
也許欺騙:HTTP:// stackoverflow.com/questions/16514137/errors-in-app-xaml-trying-to-use-mvvm-light-in-windows-phone-8-project – Bit
'當我將視覺樹移除或者 - >這句話對我來說毫無意義。 –
@ M4TKD我已經檢查過這個帖子,並沒有幫助我。它被告知刪除MergedDictionary,但這正是我想在這裏實現的。 – FunkyPeanut