Hi!
I have a ListBox that each of its items has a button, I set all the textboxes in the dataitem that the Binding.UpdateSourceTrigger is Explicit.
I added a handler to the button's click, now what?
How do I collect the info from the controls? they don't have a key they are dynamic, how do I get their BindingExpressions?
<ListBox ItemsSource="{Binding Path=Phones}">
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type data:Phone}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBox Margin="5" VerticalAlignment="Center" Name="tbNumber"
Text="{Binding Number, ValidatesOnExceptions=True, UpdateSourceTrigger=Explicit}"
/>
<Button Click="btnSavePhone_Click" Margin="5"
Content="_Update" IsEnabled="{Binding IsValid}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>