Windows App Developer Links - 2012-10-08
Windows 8 App Development
-
async/await in C# - a disaster waiting to happen? (Christian Jacobsen)
"Ok so that might be a bit overdramatic but now that I have your attention, please continue... :) Here's the thing, I love the asynchronous programming model that comes with .NET 4.5 and the async/await keywords in C#5 in since it alleviates the pain of...well...asynchronous programming by allowing for an imperative control flow in the code instead of a inversion-of-control-callback-galore style of code. However, the linear style that it promotes can be deceptive if you don't remind your self from time to time of how it operates under the hood. I recently ran into the following issue..."
-
8 tips for your Windows Store apps (Arun Mahendrakar)
"1. Use Basic page than a blank template ... 2. Do not modify contents of Common folder, create your own ... 3. Provide all the logos ... 4. Set Show name to No Logos..."
-
Projecting Async .NET Code from a WinRT Component (Mike Taulty)
"This one arose today and it's something that I'd thought about a little before and I'd had a good read of this blog post in the past about working with async at the WinRT level rather than at the .NET level. Taking a simple example - let's say that I want to write a function that downloads from microsoft.com, counts up the length of the stream returned and returns that to the caller. In the async/await model of .NET, that seems fairly easy as I can lean on Task and await/async..."
-
Windows 8-Updated flickR Search Demo in C# (Mike Taulty)
"In a lot of the Windows 8 sessions that I've given around the UK I've been building out a simple demo app that searches on flickR for some photos. Over time I've come to build that app usually with some combination of the following: ... and, based on audience and time, I sometimes take either the .NET example or the JavaScript example ‘forward' and sketch out areas..."
-
Helper class for creating TileNotification (Janne Rautiola)
"When updating a live tile using TileUpdater.Update method, we will have to provide the method with a TileNotification. Generating a tile notification can be a bit hard so I decided to do a helper class for the task..."
-
Windows 8 ItemTapCommand Attached Property (Geoff Webber-Cross)
"This attached property picks up touch tap events from FrameworkElements and triggers an attached command. This is useful for controls like GridViews where you might click an item with a pointer to select it and have multiple options from an app bar as well has having the same behaviour in the slide gesture with the bonus of an extra tap gesture..."
-
UrlEncode & HtmlEncode in WinRT (Nicolas Humann)
"If your are looking HttpUtility in WinRT, you will search for a while :) All helpers to encode/decode Url / Html are now availbale int he namespace System.Net.WebUtility..."
-
Windows 8-quick XAML parsing tip: mind the order of your property bindings! (Kevin Dockx)
"A long time ago, in a galaxy far away (well, 2 years ago, in a galaxy called Silverlight), we ran into a very unexpected bug in the XAML framework, or rather: in the way XAML is parsed. Ever ran into the situation where you're binding properties of any control accepting an ItemsSource & SelectedItem, and then setting the SelectedItem's bound value in your ViewModel to ensure there's something selected the first time a user navigates to your view? Should be easy, right? ... This perfectly works... IF you've declared your ItemsSource binding in XAML before the SelectedItem binding..."
-
Microsoft DevRadio: (Part 1) Using Blend to Help Design Your Windows 8 Apps (Channel 9)
"Andrew Duthie and Program Manager Kirupa Chinnathambi from the Microsoft Expression Blend team join us for part one of this series as we take an inside look at how Blend can help developers design their Windows 8 apps. Tune in as they build a basic "hello world" application, add HTML assets and style it using CSS..."
Apps & Code to Look At
-
Smart little helper to clean HTML based strings for [WPDEV] and [WIN8DEV] (MSicc)
"I thought I would share this small little class I created to clean out HTML based strings into readable strings. The class is both usable for your Windows Phone app as well as your Windows 8 app. If you use cloud based or internet data, often strings contain "–" or "–" instead of their intended letter, like you can see on this image..."
-
A Tiny Portable Inversion of Control Container for Multiple Windows Platforms (Jeremy Likness)
"As part of the cross-platform example in my book, I built a tiny IOC container mainly to avoid having to reference and explain MEF, Unity, or any of the other choices. This is not a full-fledged container with tons of services like injection. It is simply an easy way to create things that depend on other things and manage their lifetime. The "portable" part is evident in the targets. You can reference the exact same DLL from any Windows Phone, .NET Framework 4.x, Windows Store (Windows 8), or Silverlight 4+ project to use the container..."