0
XAML CreateFromXaml에서 생성 카탈로그가 컴파일되지 않습니다.Prism4 : 나는 또한 내 주입 컨테이너로 유니티를 사용하고 실버 라이트 4 프리즘 4</p> <p>으로 개발하고 있어요
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));
}
}
}
?
프로젝트를 정리하려고 했습니까? Visual Studio를 닫고 다시여시겠습니까? 오류는'* I * ModuleCatalog'에 대해 이야기합니다. 'ModuleCatalog'에 의해 구현 된 인터페이스는 클래스 그 자체가 아닙니다. 왜 이런 생각일까요? –
대답은 긴 규정 문장을 사용하고 있습니다 : Microsoft.Practices.Prism.Modularity.ModuleCatalog.CreateFromXaml. 감사합니다 – user1462071
@ user1462071 당신은 대답을 추가하고 그것을 받아 들여야합니다. – onof