PhotoStore – XBAP & Standalone

In a chalktalk yesterday, I demo-ed a modified PhotoStore application (you may have seen this demo at last year’s PDC or played with it in the Hands on Labs).

In this version, you can display images bundled with the app as well as those located in your “My Pictures” directory.  This works fine as standalone app because it runs in full trust.  However, the sandboxed XBAP does NOT have FileIOPermission, and so fails with a SecurityException.

To make both XBAP & Standalone work with the same code base, I demoed the compile switching, runtime switching, and XAML switching tips I wrote about last week. 

You can get code here.  Or just run the xbap on RC1.

Note: this app uses my VS Flexible Application template


  1. Thanks for your great article.

    But I want to know if I want to create xbap app which have to access local files, is there any other way to do that, such as after user permit or use some special mechanism?
    access local files is critical, such as upload files, save files or others.

    Is there any possible or indirect way to do that?
    Thanks you very much 😀

    Have a nice day

Leave a Reply

Your email address will not be published. Required fields are marked *