background preloader

Caliburn Micro

Facebook Twitter

Build Your Own MVVM Framework. Basics of Caliburn Micro in WPF MVVM - Part II Binding. In this part we’ll see how to start creating new pages in the application and how the binding and events are being defined using this small library project with power of MVVM.

Basics of Caliburn Micro in WPF MVVM - Part II Binding

In the first article of MVVM using Caliburn Micro with WPF we saw how to write the bootstrapper to set up everything for the Caliburn Micro library. Now in this part we'll see how to start creating new pages in the application and how the binding and events are being defined using this small library project with the power of MVVM. Before we start I recommend that you go through the previous article showing how to do the setup. Once you have done the setup you can design the MainWindowView.Xaml file.

Naming Conventions in Caliburn Micro Caliburn Micro is built so that it can predict the view and viewmodel mapping just by the names. Designing MainWindowView You can have multiple controls defined in your sample page. <Window x:Class="MainWindowView" ="" xmlns=" ="" xmlns:x=" </Grid> Now here we have a button and TextBox. Mindscape Blog » Blog Archive » Caliburn Micro Part 5: The Window Manager. Hello again and welcome to the next post in our Caliburn Micro tutorial series.

Mindscape Blog » Blog Archive » Caliburn Micro Part 5: The Window Manager

A relatively simple tutorial this time where we will be looking at the Window Manager. Before we begin, here are the links to the previous tutorials in this series: Part 1: Getting Started Part 2: Data Binding and Events Part 3: More About Events and Parameters Part 4: The Event Aggregator Many of you who have played around with Caliburn Micro will know there is not much mentioned about the Window Manager. Due to this, I won’t be covering everything about the Window Manager, I’ll simply explain what I know about it. Using a Window Manager You may remember from the getting started blog post that one of the first things we did was delete MainWindow.xaml from the project. 1. 2.

[Export(typeof(AppViewModel))]public class AppViewModel : PropertyChangedBase { ...} 3. Now we can use the Window Manager instance in our OpenWindow method to open a new window. Custom Window Managers Happy coding :) First steps with Caliburn Micro in Windows Phone 8 – Collections and navigation. We continue our journey about Caliburn Micro and how to use this MVVM framework in a Windows Phone 8 application by understanding how to manage collections and navigation.

First steps with Caliburn Micro in Windows Phone 8 – Collections and navigation

Collections One of the most common scenarios in a Windows Phone application is the usage of collections: we have a list of data and we need to display it in a ListBox or in LongListSelector. The standard approach is to create a collection in the code (usually, when we’re talking about the XAML world, we use an ObservableCollection) and then to bind it to the ItemsSource property. Guess what? Caliburn Micro has another naming convention for that! In the XAML we add a ListBox with a simple template: it will simply display, for every item in the collection, a TextBlock with the value of the single item. And here’s come the magic: As you can see the name of the property is SelectedItem, which is the name of the other property in singular (Items –> Item) prefixed by the word Selected. Navigation Navigation with parameters. Mindscape Blog » Blog Archive » Caliburn Micro Part 1: Getting Started.

A few days ago I blogged about our new Dashboard sample included in WPF Elements.

Mindscape Blog » Blog Archive » Caliburn Micro Part 1: Getting Started

The sample demonstrates how to create a sales dashboard using a few of our WPF controls like the Data Grid, Time Explorer and Charts. It was built with the help of the Caliburn Micro framework to give it a robust MVVM architecture. In this blog post I’ll walk you through a simple tutorial for getting started with using Caliburn Micro in a WPF application. This is just part 1 in a series I will be writing so I hope you’ll subscribe and follow along with me as we build up to a useful application. Tutorial: Building a WPF application with Caliburn.Micro. Recently when I set out to build a WPF application for one of the products my studio develops I decided to use the small Xaml framework called Caliburn.Micro to assist with wiring up the application and allow me to easily follow the MVVM pattern.

Tutorial: Building a WPF application with Caliburn.Micro

The problem I faced was that the documentation was all over the place making it difficult to get a clear understanding of what the true capabilities of the framework were. My goal for this tutorial is to go over some lessons I learnt while setting up the WPF application. Project Details For the purposes of this tutorial I will be building a new application called “So.

Just Note It”. Solution: So.JustNoteIt Project: So.JustNoteIt.Client.DesktopDefault Namespace: So.JustNoteIt.Client.DesktopDescription: WPF Application. Assumptions I am assuming you have knowledge on how to open a new project in Visual Studio as well as the ability program in, or at least understand, C#. Ingredients Project Types: WPF Application Language: C#.Net Framework: 4.5.