Top "Datatemplate" questions

Data templating is a feature of WPF and Xamarin.

Change Data template dynamically

I have a item control which is bound to Tasks. Each task has task state. I have defined different data …

wpf triggers datatemplateselector datatemplate
Is there a way to use data-template inheritance in WPF?

Is it possible to have DataTemplate composition or inheritance (similar to "BasedOn" in Styles)? There are 2 instances where I need …

wpf xaml datatemplate
How to show a data template on a content control?

Imagine that in one data template, I have a textBox, and another data template, I've got two textboxes. According to …

c# wpf templates xaml datatemplate
Event handler in DataTemplate

I have WPF ComboBox inside a data template (a lot of comboboxes in listbox) and I want to handle enter …

wpf event-handling datatemplate
WPF - Very basic ListBox.ItemTemplate Question

Ok, this is an embarassingly simple-looking problem, but is driving me crazy. I'm learning about DataTemplating and am trying to …

wpf listbox datatemplate itemtemplate
WPF: TabControl & DataTemplates

I just want to understand the following scenario. Where I am implementing a <TabControl> bound to a ObservableCollection&…

wpf datatemplate tabcontrol
Different views / data template based on member variable

I have a view model called ViewModelClass which contains a boolean. I have another view model which contains ObservableCollection<…

wpf xaml data-binding datatemplate
WPF - Databind to a StackPanel using DataTemplates

I've modified my question since it has changed focus when trying things out. I narrowed the problem down to the …

wpf data-binding datatemplate
Why is this WPF ComboBox not showing the selected value?

<CombobBox x:Name="cbo" Style="{StaticResource ComboStyle1}" DisplayMemberPath="NAME" SelectedItem="{Binding Path=NAME}" SelectedIndex="1"> <ComboBox.ItemTemplate> &…

wpf combobox datatemplate selectedvalue
In WPF, how to databind to the Window DataContext from inside the DataTemplate of a contained ListBox?

I have a WPF Window with a view model set as its DataContext, and have a ListBox with a DataTemplate …

.net wpf data-binding mvvm datatemplate