How do I use a ItemTemplateSelector together with a HeaderTemplate in a WPF ListView?
问题 Suppose the following XAML defined window: <Window x:Class="LayoutTests.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:LayoutTests" Title="Window1"> <Window.Resources> <XmlDataProvider x:Key="XmlData" IsInitialLoadEnabled="True"> <x:XData> <Items xmlns=""> <Item text="Item 1" type="A" /> <Item text="Item 2" type="B" /> <Item text="Item 3" type="A" /> </Items> </x:XData> <