I want to make my checkbox in datatemplate has threestates I implemented a function to set datatemplate of listview columns as checkbox : but I want it to allow threestates
public DataTemplate SampleTemplate()
{
DataTemplate dt = new System.Windows.DataTemplate();
dt.DataType = typeof(bool);
FrameworkElementFactory fef = new FrameworkElementFactory(typeof(CheckBox));
Binding bd = new Binding("EnabledThreading");
fef.SetBinding(CheckBox.IsCheckedProperty, bd);
dt.VisualTree = fef;
return dt;
}
Set the respective property, something along the lines of:
(
FrameworkElementFactoryis deprecated by the way if you did not notice)