Try below sample code.
Add a property as below
public int Selected
{
get { return _selected; }
set
{
_selected = value;
OnPropertyChanged(new PropertyChangedEventArgs("Selected"));
}
}
public void OnPropertyChanged(PropertyChangedEventArgs e)
{
if (PropertyChanged != null)
{
PropertyChanged(this, e);
}
}
Inherit INotifyPropertyChanged into your cs file to get OnPropertyChanged
In the view bind the above property in listview
<Grid>
<ListView Margin="10" Name="lvUsers" SelectedIndex="{Binding Selected}">
<ListView.View>
<GridView>
<GridViewColumn>
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox Tag="{Binding ID}" IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}, Path=IsSelected}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Name" Width="120" DisplayMemberBinding="{Binding Name}" />
<GridViewColumn Header="Age" Width="50" DisplayMemberBinding="{Binding Age}" />
<GridViewColumn Header="Mail" Width="150" DisplayMemberBinding="{Binding Mail}" />
</GridView>
</ListView.View>
</ListView>
</Grid>
Try checking if the checkbox is disabled or not with this property. I hope this will works for you.