Kona – The ViewModelLocator Class

Saturday, January 26, 2013

In previous posts I mentioned how, by using the Binding markup extension, the view automatically resolves its bounded properties from a view model object that is stored in its DataContext property. How the view model ends up being referenced in the view's DataContext property was left to be some kind of magic. In this post I will talk about the component that is responsible for making this happen – the ViewModelLocator. Before diving into the details, let's re-set the context. We have a simple view model with a single property, named FirstName: ...
no comments

Kona – The BindableBase Class

Sunday, January 20, 2013

In the previous post I mentioned that the view's bounded controls can be updated automatically when the view model's properties to which they are bounded changes, given that the view model raises a specific event. In this post I want to elaborate on that, and walk you through the relevant implementation in Kona. The INotifyPropertyChanged Interface To provide change notification to the view's data bound controls, the view model should implement the INotifyPropertyChanged interface, which contains a single event called PropertyChanged, and raise that event whenever a property changes. The following example shows how the PropertyChanged...
no comments

Kona – Commands

Friday, January 18, 2013

The first thing I will cover in the series about Kona is the good old DelegateCommand class, that all of the Prism veterans learned to respect. But first, a quick overview for those of you who never worked with commands before. Why do we need commands for? One of the corner stones of MVVM is clear separation of the view from the view model. Those two components should be as loosely coupled as possible and interact only by using binding. To accomplish this separation, the view model exposes it's data with properties, and the view presents and...
no comments

Kona – Windows 8 LOB Apps Design Guidelines

Monday, January 14, 2013

Kona is an on-going project from Microsoft's patterns & practices team that is intended to provide guidelines and best practices for creating maintainable, testable and extendable Windows Store LOB apps. Kona is to Windows Store apps what Prism is to traditional WPF applications. Like Prism, Kona's release will contain the library itself (currently named Kona.Infrastructure), and a reference implementation. The first release of Kona is scheduled for the end of Q1 2013, and will provide guidance for subjects such as application lifecycle management, search, navigation, live tiles, local data management, proper layering, validation and more. The complete feature...
no comments

My Presentation at the Technion: Introduction to Windows 8

Wednesday, December 19, 2012

Today, I gave a talk about Windows 8 at the Technion, on behalf of Microsoft Israel. The presentation was part of Microsoft's collaboration with the academic community. That was a 101 presentation which was focused mainly on the new features of Windows 8, and on how app authors should use them to write better apps. I wrapped things up with a quick, hands-on, demonstration. One of the participants asked me how to remove unwanted app shortcuts from the All Apps screen. Here is a great blog post describing how to do it step by step. Last, but...
no comments

InvalidOperationException Is Thrown by PlayToReceiver’s StartAsync Method

Tuesday, November 27, 2012

While I was playing around with the new Windows Store Play-To contract, I came across a strange exception when I used the PlayToReceiver class to register my app as a Play-To target. Here is the relevant code: 1: protected async override void OnNavigatedTo(NavigationEventArgs e) 2: { 3: if (m_playToReceiver != null) 4: return; ...
tags: , ,
no comments