I'm new to prism and trying to figure out how to pass a object reference into a WPF class library (Prism and MEF) from host applcation.
Thanks!
In my host app, a button click invokes the WPF class library:
public override void OnClick()
{
//need to pass some object reference into
TestButtonBootstrapper bootstrapper = new TestButtonBootstrapper();
bootstrapper.Run();
}
My bootstrapper:
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();
}