我想在子窗口中使用View Model Locator。 問題是這樣不起作用:在Silverlight 4中使用帶有子窗口的MVVM Light View模型定位器
<controls:ChildWindow x:Class="Views.PopupViews.AddAlert"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr namespace:System.Windows.Controls;assembly=System.Windows.Controls"
DataContext="{Binding AddAlert, Source={StaticResource Locator}}>
我得到的錯誤: 無法找到名稱/密鑰定位
你最後失蹤「」。我修好了,試試看:DataContext =「{Binding AddAlert,Source = {StaticResource Locator}}」> – Rumplin