Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light - DotNetPattern.com
FlowDirection in WPF TabControl is used for setting the content flow direction of UI elements in header and content area.
FlowDirection is an enum which has only two values:
By default, any TabControl set the FlowDirection property to LeftToRight. In this, all the UI controls in header and cont...
TabControl provides two main properties for selection of Items.
SelectedItem property is used for getting and setting the selected object of WPF TabControl. You bind item list into the ItemsSource property of TabControl and set the SelectedItem property to object which you want to selected first.
TabStripPlacement is an important propety of TabControl. It is used for setting the Header alignment relative to tab content.
You can set below four values in TabStripPlacement.
I have given all four examples of TabStripPlacement.
Set header to left position like below:
WPF TabControl provides two templates property for changing the UI for Header and Content area.
ItemTemplate - Get/Set DataTemplate for TabItem Header.
ContentTemplate - Get/Set DateTemplate for TabItem Content.
ItemTemplate is used for changing the DataTemplate of Header section of TabItem. By default, Header DataTemplate call the ToString meth...
TabControl provides a ItemsSource property to bind list of items. ItemsSource takes any collection object which implements the IEnumerable interface.
We bind TabControl with the List<T> or ObservableCollection<T> list classes.
Below is the example TabControl binding with list of MyTabItem class.
TabControl Binding Example
Create a new MyTab...
WPF TabControl is used for grouping multiple items that share the same space.
TabControl consists of multiple TabItem controls. One one TabItem is visible at one time.
A TabItem has two areas.
Header is an area for specifying the header of TabItem. All Tab Items headers are always visible.
Content is an area for specifying the child...
Predicate is a pre-built delegate in the .NET framework class library. Delegates are used to store method which has same parameters and return types as specify in the delegate type. Predicate is a generic delegate. It takes one parameter and returns a boolean value.
Predicate delegate is used for check whether a parameter meets specify condition or not.
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 ...
Assembly is the main unit in .NET applications. Assembly is a collection of types and its information. There are two types of assemblies:
Executable files (EXE)
Both type of assemblies includes information about types and its members in its metadata.
There are three ways to get Assembly instances:
Geting assembly instance from type...
C# reflection Type class provides two methods for getting the constructors in any Type.
GetConstructors() //Returns all the constructors
GetConstructor() //Returns only the specific constructor with match your given criteria.
By default, all the above methods returns public constructors of a Type. To get the private, protected, and static constructors you have to u...