Search code examples
wpfmefribbonbootstrapperprism-4

PRISM bootstrapper problem


I'm starting a PRISM + MEF, WPF application.

In the bootstrapper I'm having some problems. The RootVisual property is not found (silverlight vs wpf?, what should I use instead for WPF?) and I see everybody using a UserControl as a shell

protected override void InitializeShell()
{
  base.InitializeShell();
  Application.Current.RootVisual = (Shell)this.Shell;
}

How do you set a RibbonWindow as 'rootvisual' (shell) in PRISM (MEF+WPF)? (I started a Ribbon WPF Application). Maybe this is not correct what i'm trying to do but I didn't find any example that uses a RibbonWindow instead of a UserControl as a Shell in PRISM for a WPF application.

I've searched stackoverflow but it could not provide me a clear answer.

Thanks in advance.

edit: indeed it was Window, discovered it a few moments later. "d0h!"


Solution

  • Application.Current.MainWindow = (Shell)this.Shell;
    

    And as you can guess Shell must be a window.