Jimmy Vens

Jimmy Vens

  • NA
  • 26
  • 12k

Checkbox remain checked after getting the result

Dec 16 2020 3:57 AM
Hi ,
 
I have a WPF MVVM application. i have a dialog box window which has checkbox in grid. When i check on the checkbox some functions happening. but again when i open the dialog box i want to show the checkbox checked.
 
XAML
  1. <DataGridTemplateColumn.CellTemplate>  
  2. <DataTemplate>  
  3. <pnx:PnxCheckBox  
  4. Command="{Binding CheckedChangedCell,Mode=TwoWay,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}"  
  5. HorizontalAlignment="Right"  
  6. IsChecked="{Binding Path=IsChecked, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  
  7. Margin="7,0,5,0"  
  8. VerticalAlignment="Center" />  
  9. </DataTemplate>  
  10. </DataGridTemplateColumn.CellTemplate>  
  11. </DataGridTemplateColumn>  
This is my xaml. What i have to do in my view model.
 
Please help

Answers (2)