Silverlight 4 と Prism 4 で開発しています。
また、インジェクション コンテナーとして Unity を使用しています。
xamlからモジュール カタログを作成しようとしていますが、「IModuleCatalog には CreateFromXaml の定義が含まれていません...」というエラーが表示されます。
私のコードスニペットは次のとおりです。
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.MefExtensions;
namespace MyModularityProject {
public class MyBootStrapper : UnityBootstrapper {
protected override DependencyObject CreateShell() {
return ServiceLocator.Current.GetInstance<Shell>();
}
protected override void InitializeShell() {
base.InitializeShell();
Application.Current.RootVisual = (UIElement)Shell;
}
protected override IModuleCatalog CreateModuleCatalog() {
// This is the isntruction that doesn't compile
return ModuleCatalog.CreateFromXaml(new
Uri("/MyProject.Silverlight;component/ModulesCatalog.xaml",
UriKind.Relative));
}
}
}
ここで何が欠けているのでしょうか?