Top "Datatemplate" questions

Data templating is a feature of WPF and Xamarin.

Access parent DataContext from DataTemplate

I have a ListBox which binds to a child collection on a ViewModel. The listbox items are styled in a …

wpf xaml data-binding datatemplate relativesource
How do I build a DataTemplate in c# code?

I am trying to build a dropdown list for a winform interop, and I am creating the dropdown in code. …

c# wpf datatemplate
Difference between Control Template and DataTemplate in WPF

What is difference between a ControlTemplate and a DataTemplate in WPF?

wpf datatemplate controltemplate
WPF ListView with GridViewColumn and DataTemplate

I have a CheckedListBox control which is created by adding a DataTemplate with a CheckBox to a ListView. The problem …

wpf listview datatemplate gridviewcolumn
Concatenate strings instead of using a stack of TextBlocks

I want to show a list of Customer objects in a WPF ItemsControl. I've created a DataTemplate for this: <…

.net wpf datatemplate
How to get DataTemplate.DataTrigger to check for greater than or less than?

The following DataTemplate.DataTrigger makes the age display red if it is equal to 30. How do I make the age …

wpf xaml datatemplate datatrigger
How do I make a WPF data template fill the entire width of the listbox?

I have a ListBox DataTemplate in WPF. I want one item to be tight against the left side of the …

wpf layout listbox datatemplate
WPF ListView with buttons on each line

I have a list of Games which just has an ID, a Date, and a Time. I am setting this …

c# wpf xaml listview datatemplate
What is a ViewModelLocator and what are its pros/cons compared to DataTemplates?

Can someone give me a quick summary of what a ViewModelLocator is, how it works, and what the pros/cons …

wpf mvvm datatemplate mvvm-light viewmodellocator
How to apply style trigger to datatemplate in WPF

I've got the following.. <ComboBox Grid.Row="2" Grid.Column="2" Grid.RowSpan="2" ItemsSource="{Binding ShipperAddresses}" Text="{Binding ShipperAddress}" Margin="85,2,0,2"> &…

wpf triggers datatemplate templating