I create a simple example using HeaderDataTemplateSelector & DataTemplateSelector. The problem that I am having is that I can only get 1 Column Header to display. I created both the Selector classes. I would like to use different collections of data on the same ListView Grid.
The HeaderDataTemplateSelector is only firing 1 time.
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ItemSelectorCell"
Title="Window1" Height="300" Width="300" DataContext="{Binding RelativeSource={RelativeSource self}}" >
mHeaderTemplate2="{StaticResource mHeaderTemplate2}"
mHeaderTemplate3="{StaticResource mHeaderTemplate3}"
mHeaderTemplate4="{StaticResource mHeaderTemplate4}"/>
mDataTemplate2="{StaticResource mDataTemplate2}"
mDataTemplate3="{StaticResource mDataTemplate3}"
mDataTemplate4="{StaticResource mDataTemplate4}"/>
CellTemplateSelector="{StaticResource mDataTemplateSelector}"/>
Replies
Know the answer? Post it — somebody with the same question will find it here.