Maybe this is a simple question, but I can't find the answer. Using XAML I have this code:
<CheckBox Grid.Column="2"  Grid.Row="3" Height="23" HorizontalAlignment="Left" Name="tbIsInheriting"  VerticalAlignment="Top" Width="191" Margin="0,4,0,0" />
so in .cs file I need to get value of this Checkbox:
so I have:
res.IsInheriting = tbIsInheriting.IsChecked;
but this is a mistake (cannot convert source type 'System.Nullable' to target type 'bool').
tblsInheriting.IsChecked.GetValueOrDefault();
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With