Monthly Archives: March 2013

How to use CreateStreamedFileAsync

The StorageFile.CreateStreamedFileAsync is a pretty neat mechanism that allows you to take a stream and use it like an IStorageFile. This is useful in a number of scenarios – especially ones where you are communicating with the OS or other … Continue reading

Posted in Dev, Windows8 | Tagged , , | Leave a comment

Easy resource acquisition/disposal with yield returns

I love C#’s using keyword for quick resource acquisition/disposal. Together with foreach, it’s one of the first syntactical sugar pieces baked into C# and it’s a boon for keeping code tight, readable and maintainable. On top of the classic usages … Continue reading

Posted in Dev | Tagged , , | Leave a comment

How to await a CancellationToken

Cancellation tokens are a way for asynchronous operations to allow the caller to cancel them. The mechanism is pretty damn robust – the same token can be propagated along multiple nested operations such that a cancellation of the top-level object … Continue reading

Posted in Dev, Windows8 | Leave a comment

Awaitable Managed Animation classes for WinRT (Part 4)

So far in this post series, I showed how to use code and the new async patterns of WinRT to simplify the animation of elements. As an example, I used opacity, showing how you can code your animation dynamically. In … Continue reading

Posted in Animation, Dev, Windows8 | Leave a comment

Awaitable Managed Animation classes for WinRT (Part 3)

In the previous two posts, I set up the reasoning and infrastructure for creating a different type of animation infrastructure. In this post, I’ll (finally) show an actual example of how to use this infrastructure. For this, we’ll create a … Continue reading

Posted in Animation, Dev, Windows8 | Leave a comment

Awaitable ManagedAnimation class for WinRT (Part 2)

In the first part of this post series, I discussed the reasoning behind potentially wanting to have a second way of doing animation in XAML. In this post, I will discuss the basic infrastructure for this new way of doing … Continue reading

Posted in Animation, Dev, Windows8 | Leave a comment

Different approach for animation in XAML using .NET 4.5 new async functionality (Part 1)

This post discusses a small set of classes we use to do dynamic animation in XAML apps – animation where the developer, at design time, might not know a lot about what needs to be animated and when. I’ve been … Continue reading

Posted in Animation, Dev, Windows8 | Leave a comment