我正在研究一個需要與來自Calibrun.Micro的HelloScreens示例具有幾乎相同功能的應用程序。我將代碼轉移到了WPF應用程序,但是當我嘗試運行它時,我在BootStrapper GetInstance方法中不斷收到錯誤將Caliburn.Micro HelloScreens示例從Silverlight轉換爲WPF時出錯
無法找到任何合同WpfApplication.Framework.IShell的實例。
我的配置是
protected override void Configure()
{
container = new CompositionContainer(
new AggregateCatalog(AssemblySource.Instance.Select(x => new AssemblyCatalog(x)))
);
var batch = new CompositionBatch();
batch.AddExportedValue<IWindowManager>(new WindowManager());
batch.AddExportedValue<IEventAggregator>(new EventAggregator());
batch.AddExportedValue(container);
container.Compose(batch);
}
不知道這是什麼東西在國際奧委會還是什麼。任何幫助都會很棒。謝謝!!!
ShellViewModel仍然有'[Export(typeof(IShell))]'? –