I can not figure out how after Binding to get data from the filled fields. I read about two-way Binding , but this is not what I need. You just need to get the data for further storage in the database
<ListView Name="lbTodoList" HorizontalContentAlignment="Stretch"> <ListBox.ItemTemplate> <DataTemplate> <Grid Margin="0,2"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBlock Name="textmext" Grid.Column="0" Text="{Binding vopros}" /> <ComboBox Name="combo" Grid.Column="1" IsEditable="True" ItemsSource="{Binding otvet}" /> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListView>
ComboBoxyou need to bind theSelectedItem, this will be the selected answer. - MonkBinding(and if you don’t want to modify the data in objectA, then do two-way Binding to objectB). - VladD