With Data binding in WPF you can take data from any property of an object and bind it to other dependency property of another object.
Data binding copies a value from a source object to a property on a destination object.
WPF object has change notification.
When the source change, the destination property will automatically be updated.
<Grid>
<Grid.RowDefinitions ><RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox Name="Source" Grid.Row="0" >Source</TextBox>
<TextBlock Grid.Row="1">
<TextBlock.Text>
<Binding ElementName="Source" Path="Text" />
</TextBlock.Text>
</TextBlock>
</Grid>
Binding modes
OneWay
- source -> destination
- destination - > source
- destination - > source
- source - > destination (the property is initially set, but updates to the source are not copied to the destination)
- source -> destination
- destination - > source
SQL Server datagrid view,update, delete data