Developing Windows Store apps with Caliburn Micro Part 4: services and dependency injection

In this installment of the series I will show you how user data services. We will finally use the Unity DI container that is part of the project setup.

Data and Services

In next installment we will be showing a list of products, so let’s create a simple Product class first in the Data directory:

PropertyChangedBase is a base class implementing the INotifyPropertyChanged interface and the ImplementPropertyChanged attribute makes sure it’s method is called for all the property changes. (More about Fody here)

[Read More]

Developing Windows Store apps with Caliburn Micro Part 1: setup and first view

I have been developing Windows Store apps for some time. I have always used MVVM, but mostly “my own” MVVM. I have finally decided to use a “real” MVVM framework and I have chosen Caliburn Micro, because I did not like MVVM very much. In this article I am going to show you how to use Caliburn Micro, Unity and Fody to develop Windows Store apps.

Caliburn Micro

Caliburn Micro is a small, yet powerful framework, designed for building applications across all Xaml Platforms. With strong support for MVVM and other proven UI patterns, Caliburn.Micro will enable you to build your solution quickly, without the need to sacrifice code quality or testability.

[Read More]

INotifyPropertyChanged the easy way in Windows Phone and Windows 8

If you develop Windows Phone, Windows 8, Silverlight or WPF apps using the MVVM pattern, you are familiar with the INotifyPropertyChanged interface.

Typical implementation

In a typical implementation, you usually have a base class implementing the interface, like

public class BaseViewModel : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;

    public void NotifyPropertyChanged(string propertyname)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyname));
        }
    }     
}

or use a framework like MVVMLight, Prism or Caliburn Micro that provides such base class for you. In your view models you have properties using the PropertyChanged method

[Read More]