The ItemTemplate property has no effect, try the simplest possible test and it will not work. DisplayMemberPath still works though. I'm assuming the ControlTemplate got messed up in recent versions. Luckily ItemTemplate works in version 1.6 of this control, but I'd really like to use the new nuget package for version 2.0.
<Window x:Class="CheckComboBoxTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
Height="350"
Width="525"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
<Grid>
<xctk:CheckComboBox Height="25" ItemsSource="{Binding Items}">
<xctk:CheckComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding DisplayName}" />
</DataTemplate>
</xctk:CheckComboBox.ItemTemplate>
</xctk:CheckComboBox>
</Grid>
</Window>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace CheckComboBoxTest
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Items = new ObservableCollection<Item>();
Items.Add(new Item("Item 1"));
Items.Add(new Item("Item 2"));
Items.Add(new Item("Item 3"));
Items.Add(new Item("Item 4"));
Items.Add(new Item("Item 5"));
this.DataContext = this;
}
public ObservableCollection<Item> Items { get; set; }
}
public class Item
{
public Item(string displayName)
{
this.DisplayName = displayName;
}
public string DisplayName { get; set; }
}
}
<Window x:Class="CheckComboBoxTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
Height="350"
Width="525"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
<Grid>
<xctk:CheckComboBox Height="25" ItemsSource="{Binding Items}">
<xctk:CheckComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding DisplayName}" />
</DataTemplate>
</xctk:CheckComboBox.ItemTemplate>
</xctk:CheckComboBox>
</Grid>
</Window>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace CheckComboBoxTest
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Items = new ObservableCollection<Item>();
Items.Add(new Item("Item 1"));
Items.Add(new Item("Item 2"));
Items.Add(new Item("Item 3"));
Items.Add(new Item("Item 4"));
Items.Add(new Item("Item 5"));
this.DataContext = this;
}
public ObservableCollection<Item> Items { get; set; }
}
public class Item
{
public Item(string displayName)
{
this.DisplayName = displayName;
}
public string DisplayName { get; set; }
}
}