Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light - DotNetPattern.com

WPF Dispatcher - Introduction and How to use?

Before we learn what is dispatcher and why we need it, we need to understand what is the apartments of the Thread. Thread Apartments All objects in the process are grouped into Apartments. There are two types of apartments in Threads: Single-Threaded Apartments Multi-Threaded Apartments Single-Threaded Apartment (STA) Single-threaded apartments cont...

Continue Reading

WPF MVVM Introduction

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...

Continue Reading

5 minutes Guide of WPF ListView ItemTemplate

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...

Continue Reading

How to Hide WPF ListView Columns in MVVM?

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&...

Continue Reading

WPF ListView - GridView, Bindings, ItemTemplate Examples

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. ...

Continue Reading

WPF ListView Binding

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. <Window x:Class="WpfApplication5.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quo...

Continue Reading

Quick Tips to use WPF ListView ItemTemplateSelector

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...

Continue Reading

How to Apply WPF ListView ItemContainerStyle

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....

Continue Reading

Quick Tips to Filter ListView in WPF

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 ...

Continue Reading

WPF ListView - Hide Column Headers by simple Style

WPF ListView is a very popular tool for showing list of items. Sometimes we need to hide the ListView column headers and only show the list of items. But ListView does not provide any default behavior or property for hiding the column headers. By applying a simple style you can hide the column headers of WPF ListView. <Grid> <ListView x:Name="List...

Continue Reading

Join our newsletter and get an occasional email with a technology and DotNetPattern.com news update.