Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light - DotNetPattern.com
MVVM Light toolkit is a lightweight toolkit for MVVM. This toolkit provides very basic classes for developing your application in MVVM architecture.
You can download the latest MVVM Light Toolkit from here.
MVVM Light Toolkit comes with 2 main DLLs.
Main classes in GalaSoft.MvvmLight.dll are:...
MVVM Light Messenger is a class that allows exchange messages between objects. Messenger class is mainly used for sending messages between viewmodels. Messenger class decreases coupling between viewmodels. Every viewmodel can communicate with another viewmodel without any association between them.
Messenger is an implementation of Mediator pattern in MVVM Light tool...
In my previous blog, I have showed you some main classes in MVVM Light Tookit. In this blog, I will show a simple MVVM Light Toolkit example. In this example, we will create a sample application for loading and saving the employees details using MVVM Light Toolkit.
We will do below tasks one by one:
Add a reference of MVVM Light Toolkit into...
Before we learn what is dispatcher and why we need it, we need to understand what is the apartments of the Thread.
All objects in the process are grouped into Apartments.
There are two types of apartments in Threads:
Single-Threaded Apartment (STA)
Single-threaded apartments cont...
Today writing large WPF application is very complex task. WPF application composed of many complex UI designs, larget set of business objects, data storage objects and presentation logic which makes the development of WPF application quite cumbersome.
Microsoft introduced a new pattern "MVVM" to make the development of WPF application easier.
MVVM is an arc...
ListView control in WPF is used for display a list of items. Every list view item has its own UI for display its own data. But how every listview item is rendered, it's depend on the ItemTemplate property of ListView.
ItemTemplate property is used for get and set the DataTemplate of every list view item. DataTemplate defines how each item appears.
You defines a single...
ListView control is a very popular control among WPF developers. Developers use ListView control for showing the data in tabular format. Sometimes, we need to hide WPF ListView columns, but wpf does not provide any default implementation for hide WPF ListView columns.
I have developed a WPF Behavior to hide WPF ListView columns through Attach property. An attached&...
WPF ListView comes under 10 most important controls in WPF. ListView represents a control in WPF which display a collection of data items. ListView is capable of showing data items in different views. It comes with its default view GridView which show items in tabular format. WPF ListView contains almost same features as ListBox as it is inherit from ListBox control.
WPF Listview is a control that is used for display a list of data items. It inherits directly from ListBox. Listview provides an ItemsSource property for binding list of items. Below is the sample program for binding listview items.
WPF ListView ItemTemplateSelector is used for choosing a DataTemplate for each ListViewItem at runtime. You can provide a custom logic to choose which DataTemplate to use in list view item.
When to use?
You have to show different UIs for each ListViewItem based on some condition. But using the ItemTemplate you can only set only one DataTemplate which is used by every List...