A small app to fix date/time on photos and videos

I find it frustrating to assemble photos from different devices – my wife’s iPhone, my Windows Phone, our Sony Cybershot, my parents’ Canon IXUS. That’s because they all use different naming conventions for their photos and videos:   Even the windows explorer “Details” view doesn’t help, because they all have different conventions on how to store “date…


Some potential language ideas for future versions of VB

Mads Torgersen recently gave a talk called “The Future of C#”, where he described some potential C# ideas that are on the minds of the team at Microsoft. He showed glimpses of a delightful IDE experience that deeply understands your code and that helps with diagnostics and refactorings. On the language front, he showed no…


Talk: Async best practices

I’ve talked about async best practices a lot, and each time I’ve tried to refine the talk a little further. Here’s the best I can explain how to use async effectively! online videos on Channel9 slides.pptx [6.1mb] source code.zip [430k, some in VB requires VS2012+Windows8 or higher, some in C# requires VS2013 or higher] transcript.docx…


Talk: Async Codegen

Talk: Async Codegen In October 2011, as we were developing async, I prepared this super low-level talk so that my colleagues on the compiler and CLR/JIT teams would understand what code the compiler generates for async methods. It’s deep, and technical, and not of practical use to most people who just use async. But if…


How to make a Win8.1 app with ScrollViewer respond to size changes

Users expect Windows8.1 apps to resize gracefully – either when they “snap” the app to a particular size, or when they change the orientation of their device. This turns out surprisingly difficult with a ScrollViewer. The details are below… Download full source code – ScrollViewerKeepPosition.zip [592k, VB, requires Win8.1/VS2013] Sorry I don’t have C# code….


How to generate PDF on Windows Phone in VB or C#

I need to generate PDF from my Windows Phone app. Unfortunately none of the standard free PDF-generating libraries work on Windows Phone. I’ve had to generate the PDF myself, by writing to the file format directly. It turned out to be really easy! Source code is at the bottom of this post, and in this link:  Download source…


How to get Exception.StackTrace line numbers on Windows Phone

(update: I’ve written an updated blog post about this. Also I made it available on NuGet as package AsyncStackTraceEx. And published the source code under MIT license on Github.)  Scenario: I’ve written my app and released it to users. Some of them have reported crashes but I don’t know where. So I released an update which…


Talk: The Complete Async — three talks from TechEd Europe 2013

I gave three talks on Async at TechEd Europe. These cover everything you need to know about async, from beginner to advanced.   Intro: Using Async in Windows 8. This introductory talk introduces how to use async, the connection between IAsyncOperation and Task, and how to cancel an async operation. Watch video online Download slides.pptx…


MVVM with Async – sample code

How do you combine MVVM with async? — Well, really, there’s not much to it. Just the same as always. Here’s an example Silverlight MVVM project. It first shipped with the Async CTP, and I’ve updated it to use VS2012 and Microsoft.Bcl.Async. Download AsyncMVVM-Silverlight-VB.zip [2mb, requires VS2012] Download AsyncMVVM-Silverlight-CS.zip [2mb, requires VS2012] One thing that…


Talk: The New Async Design Patterns

Talk: The New Async Design Patterns Async involves some new concepts. They’re not difficult; just unfamiliar. Over the past year I’ve been watching how people use it. This talk distils out the three top async patterns and anti-patterns. Async void is for top-level event-handlers only, and event-like things. Don’t use it elsewhere in your code….