Firstly I am using this for the ListView control itself:
ItemsSource="{Binding AllEffects}"
So would this not allow individual binding per GridViewColumn?
Besides AllEffects I have 2 other ObservableCollection I want to bind to 2 other GridViewColumn:
public ObservableCollection<GPUSupportNode> GPUSupport { get; set; }
public ObservableCollection<CPUSupportNode> CPUSupport { get; set; }
public class CPUSupportNode
{
public bool IsSupported {get;set;}
}
I am trying to hook these 2 GridViewColumns to GPUSupport/CPUSupport .IsSupported respectively.
Right now I have:
<GridViewColumn
Width="Auto"
Header="GPU">
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox
Margin="0"
HorizontalAlignment="Center"
IsChecked="{Binding GPUSupport, Mode=TwoWay}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
But it doesn’t work. Is this possible?
you can try creating a ViewModel class like this
and create an instance of MyViewModel, say ViewModel and initialize it to your Observable Collections. Set ItemsSource
and then this should work.