Single Most Useful Resource For Learning Rx Extensions for .NET

As anyone trying to grok the Reactive Extensions for .NET knows it can be a bit of a monster to get your head around.

Much of the material out there that tried to explain it doesn’t do a good job, and that’s because its not something you can understand of after a 5 min overview or a few blog posts (even a series of blog posts).

Nevertheless this talk by Bart De Smet is hands down the best resource I have found for learning about Rx and IObservable.  I highly recommend anyone as a jumping off point for getting started with the Reactive Extensions.

Advertisements

Navigating to Pages in different assembly in Windows Phone 7

The navigation system allows you to easily navigate to other XAML pages in your project:

NavigationService.Navigate(new Uri(“MyOtherPage.xaml”, UriKind.Relative));

But what if you want to navigate to a page that isn’t in the same project?

Fortunately this is easy enough once you understand the syntax of a URI path.

URI’s in Silverlight are a very limited subset of the pack syntax in WPF.  The generalised format of a URI in silverlight is:

/{assemblyName};component/{pathToResource}

Where {assemblyName} is the name of the assembly containing the XAML page (just the name without the .dll extension) and {pathToResource} is the path to the XAML file.  Note: The assembly name you provide must an be assembly referenced by your project.

So if the external assembly called External.dll contains a page called MyOtherPage in a folder called Pages the URI would be /external;component/Pages/MyOtherPage.xaml.  Thus the code would be:

NavigationService.Navigate(new Uri(“/external;component/Pages/MyOtherPage.xaml”, UriKind.Relative));

This type of URI format doesn’t just work for navigation.  It can be used for any type of resource that exists in an external assembly.  To load an image from another assembly you could use:

<image source=”/otherAssembly;component/Images/myImage.jpg”/>