0
내 프로젝트에서 내 클래스와 신호를 보내기 위해 MEF와 specificaly IEventAggregator를 사용하고 있는데, IEventAggregator에서의 가져 오기가 만족스럽지 않고 값이 NULL로 유지됩니까? 내가 빠진 것이 있습니까? UserControls에서 MEF에서 가져올 수 있습니까?가져 오기가 UserControl 내에서 만족스럽지 않음
public partial class MyControl : UserControl
{
public MyControl()
{
InitializeComponent();
}
[Import]
public IEventAggregator EventAggregator { get; set; }
public void SomeMethod()
{
EventAggregator.GetEvent<ErrorMessage>.Subscribe(SomeOtherMethod);
}
}
CompositionInitializer.SatisfyImports (this); – user1470618