1

I'm all new to magellan, and as an attempt to learn it, I've built a custom view engine for supporting windows forms as specified in the documentation at codeplex. But how to register this new ViewEngine? There it is given,

ViewEngines.Engines.Add(new FormsViewEngine(new DefaultViewActivator()));

But what I can see is that, ViewEngines is not a Static Class and moreover it does not have a Engines Property. I know I'm missing something, but what is it?

So, How to register my ViewEngine to Magellan? Where and When should I register it?

PS: I'm using the latest update of magellan.

Paul Stovell
  • 32,377
  • 16
  • 80
  • 108
Mat J
  • 5,422
  • 6
  • 40
  • 56

2 Answers2

2

You are correct, the view engines are now configured on the ControllerRouteCatalog.

One of the goals in Magellan 2.0 was to reduce the number of static locators.

Paul Stovell
  • 32,377
  • 16
  • 80
  • 108
1

Seems like things have changed a bit. A few search for references of ViewEngine Class in the Magellan source gave the answer.

Now ViewEngines just provide default collection and no more handles ViewEngine registrations. I managed to create my own ViewEngineCollection and pass it to the contructor of ControllerRouteCatalog.

My bad, I should have done that before. Thanks anyway.

Mat J
  • 5,422
  • 6
  • 40
  • 56
  • I also just answered your question on this page: http://code.google.com/p/magellan-framework/wiki/WinForms – Paul Stovell Feb 01 '11 at 12:26
  • Thank you. I was a bit confused with the documentation at your blog and codeplex. It will be better if you can update them or indicate that its outdated. – Mat J Feb 01 '11 at 20:43