Creating a Dialog service for Windows Store apps using Caliburn.Micro

November 28, 2014

When you want to display a dislog screen in windows store apps, you can use Flyout, MessageDialog or Popup the first two should be used for the simple cases – message prompts, question, basic user interaction. But if you need to display a richer dialog then Popup is the right fit. The MVVM way to open those dialogs is by using some kind of DialogService that will be called from you ViewModels. in all the sample i've seen on using Popup it always has a strong coupling to the View itself, meaning the Popup was embedded inside the view...
no comments

InvalidOperationException When Working With IAsyncOperation<TResult>

November 27, 2014

WinRT introduced the concept of IAsyncOperation for working with Asynchrounous code. the IAsyncOperation is merely a representation of an Async Operation (a future in the computer science lingo) and as the same meaning as hte .NET System.Threading.Tasks.Task class, so its not suprising to see that you can convert IAsyncOpertion<TResult> to Task<TResult> IAsyncOperation<int> asyncOperation=...; Task<int> task = operation.AsTask(); .NET Tasks has the Result property which gets the value of the async oprtation if it finished or wait till the value is available – this of course can cause the calling thread to freeze until the value is returned. IAsyncOperation has something...