Silverlight Navigation Service

May 28, 2012 at 3:06 AM

In the latest beta version, the Silverlight navigation service isn't working.

When it gets to the point where you call the GetService<INavigationService>() method, it throws the following exception:

{System.NotSupportedException: Out-of-browser specific settings do not affect in-browser applications.
   at System.Windows.Application.get_MainWindow()
   at Catel.MVVM.Services.NavigationService..ctor()}

May 28, 2012 at 9:05 AM

Thanks for letting us know. We fixed the issue and will release a new beta today after implementing more new features.

Jun 1, 2012 at 5:11 AM

I downloaded the second beta version and saw that it's been fixed. Ive never seen such an active development team! Thank you so much! Application development has been really fast with this toolkit!

And I've realized that the message mediator service has trouble registering with private methods. Is that a bug or is that how it should be?

Jun 1, 2012 at 7:54 AM

Internally, it uses the WeakEventListener to register methods in a memory-leak manner. In silverlight, it is not possible to use reflection on private members, thus the member must be public.

We are considering implementing 2 methods:

  • Register
  • RegisterWeak

However, in practive people will use the first (they want their method private), but forget to unsubscribe and thus cause memory leaks.