Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light - DotNetPattern.com
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...
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....
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 ...
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.