Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: Windows 8 Metro declarations: File Type Associations

$
0
0

Hey all,

I'm trying to follow this post on getting file associations to work in windows 8: http://tozon.info/blog/post/2011/10/11/Windows-8-Metro-declarations-File-Type-Associations.aspx

Essentially the code boils down overriding a method on the App.xaml.cs:

 

protectedoverridevoid OnFileActivated(FileActivatedEventArgs args)
{
    PhotoView page = new PhotoView();
    page.SetPhoto(args.Files[0] as StorageFile);
    Window.Current.Content = page;
    Window.Current.Activate();
}

I've tried using navigationService, but from my understanding it only allows strings. I've also tried DisplayRootView<T>(args.Files[0]) but the Parameter field is still set to null;

How would I be able to do this in Caliburn? Thanks!


Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>