Calling Catel:Page from a regular Window(WPF)

Topics: Questions
Feb 11, 2013 at 9:13 PM
Hi I am using catel for a wizard like application. I originally called my first page from the App.xaml startURI. However I now need to change the application title bar color and so I need to modify the main Window. I tried to Navigate from a window but on my next call to Navigate (to get to the second window), it get a null exception. However if I change the Main window to a NavigationWindow it works but I need it to be a Window instead so I can make my own title bar.

What is the proper way to call a catel:page from a Window?
Coordinator
Feb 12, 2013 at 5:50 PM
Pages are only used in Navigation-based applications. If you ask me, the WPF navigation project template is an attempt to run WPF in the browser (before they went crazy with Silverlight). I don't recommend that you use the catel:page in WPF unless you really know what you are doing.

Best is to use a view (catel:DataWindow / catel:UserControl) and use that instead of a page.
Coordinator
Feb 12, 2013 at 5:52 PM
Btw: we considered adding a wizard-control in Catel for MVVM purposes, but we simply don't have time for this. If you want to help out by developing it with us, that would be great!
Feb 13, 2013 at 1:52 PM
Actually the Catel:Page is working quite well with the exception of above. I'm not sure I'm the right person for the wizard as my WPF skills are someone limited. However if I end up coming up with something I'd be happy to share.
Coordinator
Feb 13, 2013 at 7:28 PM
I will look into it, but very busy so I cannot promise anything. But again, you can only use pages inside a WPF navigation window. I don't think this is something you want.
Feb 14, 2013 at 2:36 PM
Thanks. However its OK, don't rush it. For now I've converted my pages into Catel:UserControls and places them in a Grid on a Window. I also have a prev/next button on the Window that I use to set the Visibility to Collapsed or Visible depending on the "page" I want to display. With a little more work I could probably make extend DataWindow to support adding control like this, but that's a little more work then I have time for at the moment. Looks like the hiding and showing of the UserControls will work for now as I only have a few pages to deal with. Thanks for the great tool!