Introduction

You can combine the capabilities of the .NET Framework and the Windows Runtime to maximize your resources. The example in this topic uses .NET Framework features to add a cancellation button to an application that downloads blog feeds from the web by using a Windows Runtime API. This sample contains the example from Bridging between the .NET Framework and the Windows Runtime: Cancellation.

The code performs the following steps that enable you to use the .NET Framework cancellation feature in a Windows Store app.

For more information about AsTask, see Extending the Starter Code in Bridging between the .NET Framework and the Windows Runtime: WhenAny (C# and Visual Basic).

 

Building the Sample

You must have Windows 8 installed on your computer to run this sample.


To download the sample:

Run the code several times to verify that you can cancel at different points.

 

More Information

For more information, see Bridging between the .NET Framework and the Windows Runtime: Cancellation and Bridging between the .NET Framework and the Windows Runtime: WhenAny.