WPF Controls - ListView, GridView, DataGrid, TabControl, Label, MVVM Frameworks - MVVM Light
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...
WPF ListView does not support Filtering by default. ListView does not have their own methods to filter the bounded list.
But WPF has a very special class CollectionViewSource which supports Filtering very effectively and in very easy way.
What is CollectionViewSource class?
CollectionViewSource is a class which we can use in WPF for filtering and sorting a bounded ...
ListView ItemContainerStyle specifies a style that is used by every generated ListViewItem for styling it.
You can create a Style inline or in the Resources section and set the ItemContainerStyle property of ListView. You can set ItemContainerStyle as StaticResource or DynamicResource.
When to Use?
By default you cannot modify style of ListViewItem in WPF ListView....
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&...
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...
WPF is a successor of Windows Forms. Earlier Windows Forms uses the Windows Graphics Device Interface (GDI+) for rendering any graphics, and drawing text. WPF is a new framework for developing rich Windows smart client applications that uses the DirectX technology behind the scene. WPF is resolution-independent because WPF uses vector graphics for drawing the controls on the sc...
To build more responsive WPF UI, we have to use multiple threads that can work in the background and update the UI when the work completed.
But background threads can't access the objects created in the STA. Then how can we update the UI when the background threads completed their work?
WPF applications are based on Single Threaded Apartment Model (STA). Ob...
Many readers ask me a question regarding how we can add a tooltip for each item of ComboBox in WPF. Here I am presenting a very simple solution.
In the below example, I am creating a simple combobox. ComboBox DataTemplate defines a ListBoxItem for each item in combobox. ListBoxItem has both Content and Tooltip property. As we cannot use String.Format in Tooltip bi...