WPF

WPF Tab Control – Templates

WPF TabControl provides two templates property for changing the UI for Header and Content area. ItemTemplate ItemTemplate is used for changing the DataTemplate of Header section of TabItem. By default, Header DataTemplate call the ToString method of binded object to get the content of it. You can define your custom …

WPF Tab Control – Templates Read More
WPF

WPF Tab Control – Selection

TabControl provides two main properties for selection of Items. TabControl SelectedItem 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. Below is …

WPF Tab Control – Selection Read More
WPF

WPF Tab Control – FlowDirection

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: LeftToRight By default, any TabControl set the FlowDirection property to LeftToRight. In this, all the UI controls in header and content area are …

WPF Tab Control – FlowDirection Read More
WPF

WPF TabControl – Binding

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 MyTabItem class which have two …

WPF TabControl – Binding Read More