ottobre 2011 Blog Posts

WinRT Pills: Make your own Async methods

In WinRT any method that takes more than 50 ms is exposed as an asyncronous operation and thanks to C# await keyword (or Javascript’s Promises) what could be a programmer’s headache becomes a straightforward task, but what if you have your own asyncronous code? Let’s say you have a basic downloader class that simulates downloading a string from the internet, in practice something like: public class MyDownloader{ public event EventHandler Completed; public string Result { get; set;...

posted @ martedì 25 ottobre 2011 10:16 | Feedback (0)

WinRT pills: Where is MessageBox?

As most developers, my first test with a new technology begins with the good old “Hello World” sample and the same happened when I started digging into Metro/WinRT SDK, and you can imagine my face when I discovered that MessageBox class is no longer there. After a few second of panic :-) I placed a search on SDK and (relief) found that its indeed alive and kicking (even in a different form) inside Windows.UI.Popups namespace with a brand new name: MessageDialog So I started writing my first WinRT MessageDialog using this code: ...

posted @ lunedì 17 ottobre 2011 01:28 | Feedback (0)

[WP7] Error 0x81030120 when deploying application to device

If you get error 0x81030120 when deploying an application to a Mango (7.5) device If might depend on presence on ID_CAP_INTEROPSERVICES capabilities inside application manifest, remove it and problem should gone. Technorati Tags: WP7

posted @ martedì 4 ottobre 2011 12:17 | Feedback (6)

Enable Snap feature in Windows 8

Snap feature allows you to run two Metro apps side-by-side or share the classic desktop with a Metro App (see below) In order to have this feature on machines with resolution lower than 1366x768 (my Iconia W500 has 1024x800) you must add an entry into registry: Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell Create a new Key named AppPositioner Add into new key a DWORD value named AlwaysEnableLSSnapping with value 1. Then restart your PC and drag a Metro application from left side of the desktop. ;-)...

posted @ domenica 2 ottobre 2011 20:45 | Feedback (3)