WPF 4 (VS 2010 and .NET 4.0 Series)

[In addition to blogging, I am now using Twitter for quick updates and to share links. You can follow me on Twitter at: twitter.com/scottgu (@scottgu is my twitter name)]

This is the eleventh in a series of blog posts I’m doing on the upcoming VS 2010 and .NET 4 release.  Today’s post covers WPF 4.

WPF 4 Improvements

WPF (Windows Presentation Foundation) is one of the core components of the .NET Framework, and enables developers to build rich, differentiated Windows client applications.  WPF 4 includes major productivity, performance and capability improvements – in particular in the areas of Controls, XAML, Text, Graphics, Windows 7 integration (multitouch, taskbar integration, etc), Core Fundamentals, and Deployment.  This is the first of several posts I’ll do over the coming months about some of the improvements and new features.

I will do a separate post soon that covers some of the major advances coming with VS 2010’s WPF and Silverlight Designer – which also includes a ton of improvements.

Controls

image Controls for Building Rich Clients

WPF 4 adds a variety of new controls that make building rich line-of-business applications for the client easier and faster. The new, richer control set includes LOB essentials such as DataGrid, DatePicker, and Calendar controls. These new controls are 99% API- and behaviorally-compatible with their Silverlight counterparts, enabling developers to create a consistent experience across the client and web while optimizing workflow by reusing code between Silverlight and WPF implementations.

Bag O'Tricks is back

We are also releasing an out-of-band collection of eight controls called the WPF Bag O’ Tricks download.  It includes the following controls: AnimatingTilePanel, ColorPicker, InfoTextBox, ListPager, NumericUpDown, Reveal, TransitionsPresenter, TreeMapPanel.

Windows 7 & Office Ribbon Control

A new WPF Ribbon Control will be available for download shortly after the release of WPF 4. It features skins for Windows 7 and Office, as well as all the standard Ribbon features that end-users are familiar with, including tabs and groups, dynamic resizing, quick access toolbar, application menu, contextual tabs, key tips, and more.

image

The WPF Ribbon will be fully extensible to meet changing guidelines for future releases. A CTP with a limited feature set is available today here

imageGRAPHICS

Cached Composition

Massive performance wins are possible with the new Cached Composition feature in WPF 4, which allows applications to cache arbitrary content including live and fully-interactive controls, vector geometry, etc. as bitmaps which persist in video memory. Once cached, these elements can be arbitrarily transformed, animated, manipulated, and can have Effects applied, all without having to re-render the cached element. 

This spares both the CPU and the GPU the cost of re-rendering content, and instead allows the GPU to render straight from the cache. The cache(s) understand dirty regions, so a blinking cursor in a cached textblock, for example, will only need to re-render the cursor between frames. There’s even a new Brush which specifically uses these intelligent caches – effectively a VisualBrush with vastly better performance.

Pixel Shader 3 Support

WPF 4 builds on top of the very popular ShaderEffect support first introduced in WPF 3.5 SP1 by allowing applications to now write Effects using Pixel Shader version 3.0. The PS 3.0 shader model is dramatically more sophisticated than PS 2.0, allowing for even more compelling Effects on supported hardware.

LayoutRounding

WPF 4 adopts the UseLayoutRounding property, originally introduced in Silverlight 2. WPF’s layout engine frequently calculates sub-pixel positioning coordinates. This can lead to rendering artifacts as elements positioned on sub-pixel boundaries are anti-aliased over multiple physical pixels.

UseLayoutRounding will force the layout engine to place elements on whole pixel boundaries, thus removing most of the rendering artifacts caused by this problem – which generates cleaner and crisper UI by default.

image Animation Easing Function

Discrete, linear, and spline animations were supported with previous versions of WPF. WPF 4 introduces a new concept of Easing Functions – which allows application authors to create fluid behavior using animations. This can be used in an infinite number of ways, such as creating a springy behavior, or adding anticipation to an animation. Easing Functions customize the manner in which animations progress from start to finish.  The built-in easing functions provide a range of behaviors such as circular, exponential, elastic, and bouncy animation progress. The extensibility design also allows application authors to create custom easing functions to define the manner in which their animations progress. With this easy-to-use feature, designers can effortlessly create fluid, organic animations.

CleartypeHint

The new CleartypeHint attached property allows application authors to enable higher-quality Cleartyped text rendering in many situations where it would have previously been disabled. Such situations include text in layered windows, text in VisualBrushes, DrawingBrushes, BitmapCacheBrushes, and anywhere else where the introduction of an intermediate render target would have previously resulted in grayscale text rendering.

TEXT STACK

New Text Rendering Stack

The WPF text rendering stack has been completely replaced – a change that brings with it significant improvements to text rendering clarity, configurability, and support for international languages. The new text stack now supports display-optimized character layout, to produce text with comparable sharpness to Win32/GDI text:

image

WPF’s new text stack also now supports explicitly selecting aliased, grayscale, or ClearType rendering modes:

image

The new text stack allows optimizing text hinting and snapping for either animated or static text. Additionally, the new text stack now supports fonts with embedded bitmaps. This allows many East Asian fonts to render with the sharpness to which Win32 users have grown accustomed.

BindableRun

Since the initial release of WPF, Run.Text has been a normal CLR property. This has meant that Run.Text lacks all the benefits of the WPF dependency property system, most notably the ability to be bound. In WPF 4, we have converted Run.Text to a dependency property allowing developers to use the first WPF supplied bindable Run.  More details can be found here.

Custom Dictionaries

WPF includes a spell checker which before WPF 4 only used the OS-provided dictionary for input validation. This has been a major issue for apps which target specific industries with specialized terminology, as those apps were plagued by misspelling notifications. WPF 4 has introduced an API to allow an application to add words to the dictionaries used by WPF for spell checking.  More details can be found here.

Selection and Caret Brush

In a push to allow rich customization of the look and feel of WPF apps, developers can also now change the brush used to paint WPF text selection and carets via two simple properties: SelectionBrush and CaretBrush:

image        image

imageWINDOWS 7 LIGHT UP

Windows 7 Multitouch Support

With the introduction of multi-touch input and manipulation processing support, WPF 4 provides a great way to light up your client applications in Windows 7. Multiple finger input are exposed through existing and new input events in WPF 4, while new manipulation and inertia events are now available for developers to use. New features include:

  • Multi-touch Manipulation, Inertia (Pan, Zoom, Rotate) events on UIElement
  • Raw multi-touch events (Up, Move, Down) on UIElement, UIElement3D and ContentElement
  • Multiple capture supporting multiple active controls
  • ScrollViewer enhancement to support multi-touch panning
  • Touch device extensibility
  • Future Surface SDK compatibility

Windows 7 Shell Integration

WPF 4 also exposes several new and key Windows 7 Shell features to WPF developers. These Shell features enable a richer, integrated user experience. The new taskbar is less cluttered and can convey more information at a glance. The Aero thumbnails support user commands. Jump lists provide access to contextual startup tasks and files available to the application.

WPF 4 integrates Windows 7 Jump List functionality, including:image

  • Tasks
  • Items
  • Recent and Frequent Lists integration
  • Custom Categories

Windows 7 Taskbar integration, including:

  • Progress bar
  • Overlay Icon
  • Thumbnail buttons with commanding support
  • Description Text DWM Thumbnail clipping

In Windows 7, the taskbar has been redesigned to be less cluttered and to help users perform tasks with fewer clicks. WPF 4 provides integration with the Windows 7 taskbar in XAML, allowing applications to surface useful information to the user from the application's taskbar icon using icon overlays, progress bar, thumbnail toolbars, thumbnail description text, and thumbnail clipping.

There is also a new TaskbarItemInfo class in WPF 4 that is exposed as a dependency property.  It encompasses all the new taskbar features introduced in Windows 7.

imageIcon Overlays

Icon overlays allow an application to communicate certain notifications and status to the user through its taskbar button by display of small overlays which appear at the lower-right corner of the button.

Progress Bars

A taskbar button can be used to display simple progress information to the user without that user having to switch to the application window itself. Progress bars can be used to track file copies, downloads, installations, media burning, or any other operation that will take a period of time.

Thumbnail Toolbars

Thumbnail Toolbars provide access to the key commands for an application without the user having to restore or activate the window. This feature enables application authors to embed an active toolbar control in a window's thumbnail preview. The application can show, enable, disable, or hide buttons from the thumbnail toolbar as required by its current state:

 image

WPF FUNDAMENTALS

New XAML/BAML Parser Engine

WPF 4 has replaced its implementation of XamlReader.Load(), BAML loading, Control & DataTemplates functionality with a new engine built on top of the new System.Xaml.dll.  As part of this effort, we’ve fixed many bugs and made many functionality improvements. Users of XamlReader.Load() can take advantage of several new language features in XAML2009 such as support for generic types. MarkupExtensions and TypeConverters can now get more services during object graph creation, enabling more scenarios, such as access to the Root object. Tools to analyze and manipulate XAML will also be much easier to create with many of the new low level APIs provided in System.Xaml.dll.

Data Binding Support for DLR

Unlike CLR classes, the members of dynamic objects are defined at runtime. DynamicObject is a new abstract class in the .NET Framework 4 that allows developers to easily implement IDynamicMetaObjectProvider. With C#’s new DLR support with the ‘dynamic’ keyword, we are expecting some library implementations to switch to using DynamicObject and IDynamicMetaObjectProvider as a standard way to exposing runtime defined properties and members of objects. WPF 4 data binding support for IDynamicMetaObjectProvider will allow the use of natural property syntax to access dynamic properties.

This feature extends the WPF data binding engine to map the existing property and indexer access data binding syntax to support access to dynamic members offered by IDynamicMetaObjectProvider.

Visual State Manager (VSM)

Another new feature supporting the WPF-Silverlight continuum is the VisualStateManager, which introduces a simple new way to apply visual states to controls. This mechanism provides a way to easily customize both the look and feel of a control by providing the means to map the control logic to its respective start and end visual states.

image

VSM is very flexible in that it automatically generates the transition animations in between the respective states, so the control author spends less time writing code and more time on the visual states that are defined in a control template. That means VSM can give a control author the ability to easily interchange the look and feel of controls, and VSM gives the control author a way to easily interchange how a control visually responds to user interaction.  This is fully supported with Expression Blend.

HTML-XBAP Script Interop

WPF 4 provides the means for direct communication between an XBAP and script in the host HTML page (where the XBAP is loaded in an HTML frame or IFRAME element). The XBAP can get deep access to the HTML DOM, including to any ActiveX controls embedded in the containing HTML page and including handling of DOM events.

WPF exposes the main script object from the host frame. This is a dynamic object that represents the frame’s window object plus any custom script functions and global variables from script in the HTML page. From it, an application can invoke script functions directly or “dot into” the HTML DOM. The functionality is available in partial-trust XBAPs and under all supported versions of Internet Explorer and Firefox.

UIAutomation Virtualization

WPF has introduced virtualized controls in past releases; however there was never a standardized way for an automation client to interact with a virtualized control. Two control patterns, ItemsContainerPattern and VirtualizedItemPattern, have been added in WPF 4 to support access and interact with virtualized elements. ItemsContainerPattern is used to access the virtualized controls & find virtualized items and VirtualizedItemPattern is used to realize virtualized items.

SynchronizedInput Pattern

This is another UIA control pattern added in WPF 4. This pattern could be used by automation clients to track whether the given input event is routed to the correct element by WPF framework. This pattern has three associated automation events, viz. InputReachedTargetEvent, InputReachedOtherElementEvent and InputDiscardedEvent to indicate where the input is handled.

CLIENT DEPLOYMENT

.NET Framework 4 Client Profile

To improve deployment size, time and overall experience of the .NET Framework 4 deployment, there is now a more compact version of .NET that is a subset of the full .NET Framework 4 - called the .NET Framework 4 Client Profile. The current redistributable size of the .NET Framework 4 Client Profile is about 30MB. The full Microsoft .NET Framework 4 is a pure superset of the Client Profile.

The goal of the .NET Framework 4 Client Profile is to improve and help streamline the deployment size, time, reliability and overall deployment experience for client applications. The Client Profile contains the functionality that most common desktop client applications (including Windows Forms and WPF applications) would need so it is anticipated that the majority of client application developers will target it instead of the Full .NET Framework 4. For that reason, most Visual Studio 2010 Beta 2 client project templates target the .NET Framework 4 Beta 2 Client Profile by default.

Unlike the .NET Framework 3.5 SP1 Client Profile, an important enhancement in the NET Framework 4 Client Profile is its support on all platforms and OSs, including those supported by the Full Framework like Windows Vista, Windows XP, Windows Servers 2003 and 2008, Windows 7, all for both x86 and x64. 

You can view or change the version of the framework that you target by opening your project’s properties window, and then select the "Application" page. You can then change the “Target framework” drop-down to either the full .NET Framework or the .NET Client Profile.  The project Publish property page also allows you to select the prerequisite needed for your ClickOnce deployment. In Beta2, VS2010 automatically selects the correct profile (Client Profile or Full) depending on your primary project target:

image

The same prerequisite dialog from above appears when you create “Setup and Deployment” projects (under “Add New Project”/“Other Project Types”). The NET4 Client Profile prerequisite entry is checked by default in this case.

Enhancements in NET4 Client Profile vs. NET 3.5 SP1 Client Profile

Although the concept of a Client Profile is not new and was introduced in .NET Framework 3.5 SP1, the .NET Framework 4 Client Profile contains several important improvements:

 

.NET Framework 4 Client Profile (NEW)

.NET Framework 3.5 SP1 Client Profile

Supported OS

Supported on all platforms and  OSs that are supported by the .NET Framework (excluding IA64 and the Server Core role in W2K8)

Supported only on Windows XP 32-bit machines that did not have any .NET Framework version installed.

(Client Profile setup silently installs the full 3.5 SP1 Framework otherwise)

Redistributable

Supports redistributable as well as web download

Supports web download only

Add Remove Programs entries

The full Framework comprises the Client Profile and another part called “Extended”. Thus it has two entries in the Add/Remove Programs dialog (or Programs and Features window).

If you installed the Full Framework, you can switch to the Client Profile by simply removing “Extended” from Add/Remove Programs.

Single entry in Add Remove Programs

Visual Studio

Improved support for Client Profile targeting in Visual Studio 2010.

By default many Visual Studio 2010 Beta2 Client project target the NET4 Client Profile.

Single checkbox in Visual Studio 2008 Service Pack 1 “Application” Project properties for .NET Framework 3.5 projects. Client Profile support unavailable in out-of-the-box VS 2008.

Features

Includes new .NET 4  features (such as Managed Extensibility Framework (MEF), C# 4 Dynamic Keyword, etc) as well as features previously included in NET 3.5 SP1 Full (Speech, WPF Spell Check, etc)

Subset of features in .NET 3.5 SP1 Full

Because .NET 4.0 is a side-by-side release from previous releases of the .NET Framework, installation of the .NET 4.0 Framework does not require that prior versions of .NET on the machine need to be serviced/patched.  This means that the .NET 4.0 Client Profile installs much faster on a machine than the .NET 3.5 SP1 Client Profile.

Full Trust XBAP Deployment

Starting in WPF 4, the ClickOnce elevation prompt is also enabled for XAML Browser Applications (XBAPs) in Intranet and Trusted Zones, making it easier to deploy full-trust XBAPs. For XBAPs that require security permissions greater than the minimum code access security (CAS) permission grantset of the Intranet and Trusted Zones, the user will be able to click 'Run' on the ClickOnce elevation prompt when they navigate to the XBAP to allow the XBAP to run with the requested permissions.

Summary

As you can tell above – there is a bunch of great new functionality coming with WPF 4.0.  Below are a few links and resources you can follow to learn more some of these features:

I’ll do more posts in the coming months that also highlight some of the new WPF 4 capabilities and how to take advantage of them.  I’ll also be doing another post shortly that talks about the new VS 2010 WPF and Silverlight designer – which makes it possible to build great WPF and Silverlight applications using a WYSIWYG designer directly within Visual Studio 2010.

Hope this helps,

Scott

44 Comments

  • Surprised to see so many updates to XBAPs here, are people really using them post-Silverlight? I never hear of them being used but I guess that may be because they're only suitable for the intranet (being IE only).

  • Scott,

    MS guys are really rock. What a amazing rendering features ...

    You exceptional obviously 

    -Venu.

  • another new improvement that we need to catch up

  • Hello Scott,

    I have noticed in some of your recent screenshots that WPF text rendering in Visual Studio 2010 Beta 2 has been improved. Is it possible to set for example 'ClearType' mode in code/text editor, e.g. via some registry key? Thank you in advance.

  • It's nice to see WPF text "fixed" at last. When small people complained, nobody paid notice, but thankfully Visual Studio team made the issue clear ;).

  • @MaxC - I for one welcome the continued development and innovation being applied to XBAPs. Silverlight is a closed environment, with limited capabilities and as such does not contain all the power of the .NET Framework (for obvious and valid reasons) that are available when developing an XBAP (even tho it's sandboxed), but with the benefits of being Web deployed and suitable for many distributed application scenarios; as well as enabling different licensing models including SaaS applications, for example, as well as being highly suitable for Enterprise intranet and extranet applications.

    Excellent work The Gu and gang, thank you.

  • Fantastic, as soon as I heard MS were finally dogfooding WPF on a major product like Visual Studio, I felt sure it would lead to some serious improvements, and it looks like it has.

  • Is WPF4 available from VS2010B2 (and interface editable in Blend3) or we have to wait Expression Blend 4 and some later edition of VS2010 like RC or final RTM even?

  • Yeah, but what about the ability to obfuscate your WPF app?

  • Great post about WPF 4.0.Thanx for everything.

  • Does the new .NET Framework 4 Client Profile support using ADO.NET Entity Framework to access a local SQL Server Compact Edition database? I found it is impossible in .NET Framework 3.5 SP1.

    It'll be much easier for us to write codes to manage complex client side data storage if .NET Framework 4 Client Profile supports it.

  • Regarding Bag O'Tricks. Where do we download controls? Is this the WPF Toolkit? If not, will the WPF Toolkit still be supported/updated? Will we start to see the WPF Toolkit/Bag O'Tricks and Silverlight Toolkit to be released and include similar controls at the same time? Thanks for the update.

  • I agree with everybody else - I'm glad to see the IDE team's usage of WPF is opening up communication with the WPF team about several things in WPF that come up in day-to-day development. IT managers are more likely to be interested in using WPF for LOB apps if their WPF developers can say that it's a matured platform with a straight face.

  • Scott - does .NET 4 Beta 2 include a multitouch InkCanvas control? The multitouch canvas in the Surface SDK is a super-handy control when constructing multitouch apps. If not, is there a similar control in Beta 2 or the out-of-band pack?

  • You guys get better and better each release. Keep it up.

  • Looks like 22 March will be the new Christmas!

    Can custom dictionaries be included as embedded resources? The example only shows a file-system URI, but I assume that pack: URIs will be supported as well?

  • Nice to see more new updates about WPF. Looking forward from Scott for more blog post about new things.

  • goog to see a lot of improvements and glad to see Hangul(Korean language) in the post :)

  • Are English, French, German and Spanish the final list of supported languages for spell checking? That would be too bad, because that makes this feature useless to my company. Give the Dutch a little more love! (And the rest of Europe as well.)

  • RichardD -

    To answer your question, yes, custom dictionaries can be specified as an embedded resource by using pack: uri.

    Sample:


    pack://application:,,,/MyApp;component/MySpellerDictionary.lex

  • CW – As of Beta2, the Visual Studio10 editor will use the new text features by default. These features respect the ClearType system settings so if you have ClearType enabled on your PC, Visual Studio 10 will render with ClearType.

    RubenP – Unfortunately we have only supported spell checking for four languages since WPF first shipped. Extending spelling support beyond English, Spanish, French, and German is definitely something that we would like to do in the future.

  • I'm also superhappy that the IEditableCollectionView implementations in ListCollectionView et al have been fixed and can now be used!!! :)

  • This is a very welcome feature set. If I don't like working with XAML when I drag drop controls onto a forms surface, is there a toggle in VS2010 to output C# which I prefer to work in (being a WinForms man)? This would be good from a 'run as WPF' to a 'run as SL' perspective. I'm also thinking that this'll be easier to obfuscate (although I'm thinking if most boxes run Intel or AMD processors, why can't I just compile machine code?!). Also, I read on an MS blog VS2010 was going to be a very much needed consolidation. Does this mean you're going to roll up the 'out of band' WPF controls you mention and are we going to see an end to the 'mature', 'stable', 'preview', 'experimental' SL SDK controls?

  • Hi Scott,

    Thanks for a very informative post. Can you tell me, will WPF 4.0 have the Plane Projection features that are currently in Silverlight 3?

    Cheers

    Justin

  • awesome stuff! thank you ScottGü & the Microsoft Team.

  • Great stuff, but sadly, forgetting some of the basics.
    When will we get Visual Inheritance in XAML??
    When will we get Visual Inheritance in XAML??
    When will we get Visual Inheritance in XAML??
    When will we get Visual Inheritance in XAML??
    When will we get Visual Inheritance in XAML??

    Thanks,
    Jeff

  • Thanks ScottGu for the information

  • The new cached composition brush has better performance than VisualBrush. Does that help in interactive 2D on 3D via Viewport2DVisual3D? IIRC, Viewport2DVisual3D uses the VisualBrush internally. Are there plans on updating this? More importantly, would it even usable in this scenario?

  • Thanks for this list ! I'm excited about seing all those new features available in Expression Blend !

  • Text clarity and the overall responsiveness of the GUI are the two most complained about issues in our WPF application. It's good to see that a concerted effort is being made to address both.

    Thanks for the update,

    Michael

  • @Justin - I concur, Plane Projection is a pretty cool feature. However, it is not included in the .NET 4 framework.

  • @Will Dean – We realize that the Office UI license is less than convenient and so we’re working with their team to discover ways to ship the WPF Ribbon without the need for the license agreement. Please keep an eye out for an update in the first half of 2010.

  • Justin - Unfortunately, with all the new features that made it into the platform for this release, Silverlight's PlaneProjection feature did not make it into WPF 4. WPF already has full 3D support, and while it's a bit more work, you can effectively implement the same thing using a Viewport3D and a Viewport2DVisual3D.

    Thanks!
    David

  • Jeremiah Morrill - We actually added a CacheMode property to Viewport2DVisual3D class for exactly the reason you mentioned. When you use it, we'll internally use a BitmapCacheBrush instead of a VisualBrush when we map your Visual to the 3D mesh. The cache will respect all of the properties of the CacheMode, so, for example, you can use the Viewport2DVisual3D's BitmapCache's RenderAtScale to adjust the resolution of the cached surface. The size of the surface is purely a function of the RenderAtScale and the bounds of the cached subgraph, so you won't have to worrry about the cached surface getting resized if the projected bounds of your 3D mesh change.

    David

  • TreeListView has never been a standard control in .NET.
    While there are a couple of 3rd-party implementations available, I am curious to know when will the TreeListView officially supported?

  • Nice information scott.

  • Great stuff, thanks.

  • @EricF: I am eager to get the updated Bag-o-tricks. Will that be posted soon? Thx!

  • Yes me to, can't wait to see the Bag-o-tricks!!!

    Please post some links!!

  • SCOTT, XBAP WPF IS HANGING. DO YOU KNOW ABOUT THIS PROBLEM? I HAVE SUBMITTED TO CONNECT, BUT I HAD POOR ANSWER AND I AM HAVING ISSUES ON MY CUSTOMERS BECAUSE OF THESE HANGS AND BUGS.

    1 XBAP WPF HANGING
    2 XBAP JAVASCRIPT INTEGRATION POOR, AND BUGS, FOR EXAMPLE, AFTER ENTERING AN XBAP, IF FROM THE XBAP I NAVIGATE TO A SIMPLE HTML PAGE, IT SEEMS THAT THE FRAME STILL HOSTED IN WPF. AND I CANT REFER TO parent.location='www.site.com';
    3 I AM HAVING ISSUES BECAUSE OF ANOTHER BUG:
    SOMETIMES, ON LOAD OF MY XBAP, IT THROWS THIS ERROR System.InvalidOperationException: No further operations are possible with this instance.
    .
    THEN IF I CLICK THE RESTART LINK 2 OR 3 TIMES, MY XBAP LOADS NORMALLY.
    THE ERROR MESSAGE IS:
    System.InvalidOperationException: No further operations are possible with this instance.
    at System.Deployment.Application.InPlaceHostingManager.AssertState(State validState)
    at System.Deployment.Application.InPlaceHostingManager.Execute()
    at MS.Internal.AppModel.XappLauncherApp.ExecuteDownloadedApplication()
    at System.Windows.Interop.DocObjHost.RunApplication(ApplicationRunner runner)
    at MS.Internal.AppModel.XappLauncherApp.XappLauncherApp_Exit(Object sender, ExitEventArgs e)
    at System.Windows.Application.OnExit(ExitEventArgs e)
    at System.Windows.Application.DoShutdown()
    at System.Windows.Application.ShutdownImpl()
    at System.Windows.Application.ShutdownCallback(Object arg)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Boolean isSingleParameter, Delegate catchHandler)
    at System.Windows.Threading.DispatcherOperation.InvokeImpl()
    at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
    at System.Threading.ExecutionContext.runTryCode(Object userData)
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Threading.DispatcherOperation.Invoke()
    at System.Windows.Threading.Dispatcher.ProcessQueue()
    at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Boolean isSingleParameter, Delegate catchHandler)
    at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
    at System.Windows.Application.RunDispatcher(Object ignore)
    at System.Windows.Application.StartDispatcherInBrowser(Object unused)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Boolean isSingleParameter, Delegate catchHandler)
    at System.Windows.Threading.DispatcherOperation.InvokeImpl()
    at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
    at System.Threading.ExecutionContext.runTryCode(Object userData)
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Threading.DispatcherOperation.Invoke()
    at System.Windows.Threading.Dispatcher.ProcessQueue()
    at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Boolean isSingleParameter, Delegate catchHandler)
    at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

  • Thanks
    you are always a great teacher.

  • With WPF3, if a xbap embedded in a authenticated aspx page intends to access a aspx page which need the same authentication, the xbap will be denied.
    For WPF4, does the xbap share the authentication with browser?

  • Dear SCOTT,
    Does WPF support the EMF image formats in the new VS2010?
    As far as I know,in the VS2008, WPF does not support the EMF and WMF image formats.

  • Scott,

    Is binding going to work with IDynamic and Silverlight using IDynamicMetaObjectProvider or is this limited to WPF only?

Comments have been disabled for this content.