私はプリズムが新しく、ホストアプリケーションからWPFクラスライブラリ(PrismとMEF)にオブジェクトリファレンスを渡す方法を理解しようとしています。Prismを使用してオブジェクトをWPFクラスライブラリに渡す方法
ありがとうございます!私のホストアプリで
、ボタンのクリックは、WPFのクラスライブラリを呼び出す:
public override void OnClick()
{
//need to pass some object reference into
TestButtonBootstrapper bootstrapper = new TestButtonBootstrapper();
bootstrapper.Run();
}
私のブートストラップ:プリズム内で
protected override void InitializeShell()
{
base.InitializeShell();
if (System.Windows.Application.Current == null)
{
new System.Windows.Application();
}
System.Windows.Application.Current.MainWindow = (Shell)this.Shell;
System.Windows.Application.Current.MainWindow.Show();
System.Windows.Application.Current.MainWindow.Height = 600;
System.Windows.Application.Current.MainWindow.Width = 250;
//Application.Current.MainWindow = (Shell)this.Shell;
//Application.Current.MainWindow.Show();
}
この質問をより明確にするには、ホスティングアプリケーションからPrismアプリケーションに渡そうとしているオブジェクトの種類に関する情報をお知らせください。 –