Updated Samples for June CTP

FYI: I’ve posted June CTP versions of most of my samples: Woodgrove XBAP XBAP: On Demand & ClickOnce Cube Animation XBAP using VS Flexible Template Photostore: Standalone & XBAP. (TechEd Chalktalk demo) Get the June CTP drops here: .NET Framework 3.0 Windows SDK Orcas Tools for .NET 3.0

XBAPs: OnDemand & ClickOnce

If your XBAP has some “heft” to it (large resource files, large assemblies, etc), it may make sense to architect your app to use ClickOnce’s OnDemand APIs. OnDemand APIs enable developers to delay download parts of the application. This can result in a friendlier end-user UX. Note: OnDemand files can be traditional resource files (e.g. images, xml files, etc) or assemblies. Architecture Tips & Tricks Got satellite assemblies or large resource files? Slim down your primary EXE to the bare minimum needed to start the app. Then, when the XBAP is launched, only the application manifest, deployment manifest, and primary …

Caching & XBAPs

When relying on resources living on a server, you can increase client app perf & decrease network traffic by storing local versions. When trying to build a sandboxed XBAP, however, you cannot create your own local cache store in the file system beyond the space available in isolated storage (512KB). Fortunately, WPF resource loading uses System.NET’s HttpWebRequest and its “Default” caching policy. In addition, depending on your resources’ sizes and your scenario, it may make sense to use a non-default caching policy when issuing your own HttpWebRequest. This post aims to give you a little bit of caching context, an …

Woodgrove Demo

At the TechEd chalktalk that Ashish and I tag teamed earlier this week, I demo-ed the Woodgrove Financial Application as an XBAP. I also showed loose XAML and an embedded FlowDocument inside of an HTML. loose XAML with vector graphics (link) Woodgrove financial app w/ 3D chart as xbap (link) html page with FlowDocument in IFRAME (link) Try try out the app. The last scenario (FlowDocument in HTML) is particularly compelling: You can leverage your existing site. If you have your article content in XML, it’s easy to create another XSLT transform to XAML. Your content continues to be viewable …

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 …

.NET Framework 3.0 & Dev Community Site

WinFX has officially been rebranded .NET Framework 3.0. Also, the offical “.NET Framework 3.0” Developer Community site has just launched! There are sub-community sites for Windows Presentation Foundationa> , Windows Communication Foundation, and Windows Workflow Foundation  as well as Windows CardSpace (formerly InfoCard).

WPF @ TechEd

We’ve got a great presence at TechEd Boston. some of the WPF product team members

Tips & Tricks for Flexible Application

In my previous post, I introduced my FlexibleApplication template. In this posts, I offer a couple tips & tricks. Determing the App Model at Compile Time or Runtime Depending on your application, you may want to do different things in the standalone and XBAP version. The Flexible Application template adds some goo (i.e. compilation constants & static helpers) to make doing this easier for you. Conditional compilation: #if XBAP //  XBAP specific code #else //  Standalone specific code #endif Runtime switching: if (MyApp.IsXBAP) { //  XBAP specific code } else { //  Standalone specific code } XAML switching: <Grid> <Grid.Resources> <BooleanToVisibilityConverter x:Key=”BoolToVis” /> </Grid.Resources> …

VS Template: Flexible Application

In WPF, we support two main app models: standalone and XBAP. Standalone apps are akin to traditional Windows apps. They run in their own window. They tend to be fully trusted (unrestricted access to the computer and its resources). And they are installed (either via an MSI, ClickOnce, or EXE distribution). XBAPs, on the other hand, are browser hosted applications. They’re cached (using ClickOnce) and sandboxed. Users navigate to them (promptlessly) in the browser like they do any other website. (XBAP whitepaper & sandbox whitepaper) What’s great then is, if you’ve written your app in a security & navigation friendly …