I suspect that INotifyPropertyChanged is overkill for what I would like to achieve. I need:
The ListBox (5th column) is defined as follows:
<ListBox x:Name="AutoStrucNames" Grid.Row="5" Grid.Column="100" Height="600" Margin="80,20,0,40" Width="160" SelectionMode="Single" HorizontalAlignment="Left" Grid.ColumnSpan="10" Background="PowderBlue" DataContext="{Binding ElementName=main}" ItemsSource="{Binding AutoNames}" > <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <CheckBox x:Name="CheckAccepted" Margin="3" VerticalAlignment="Center" IsChecked="{Binding IsChecked, Mode=TwoWay}" /> <TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay }"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox>
Questions:
Do I need InotiftPropertyChanged to read the edited strings displayed by the ListBox when the Button "Confirm" is clicked??
Do I need to define the set of strings as a List<string> or as an "ObservableCollection<string>"??
Thank you in advance