Binding is the main feature of the WPF. For understanding binding, we take two controls - Source control and Target control. WPF has four types of binding modes -

Here, for understanding these all bindings, let's take one example. Make one WPF application which has two controls - slider and textbox, as shown below.

  1. <Grid>
  2. <StackPanel Orientation="Vertical">
  3. <Slider Name="mySlider" Maximum="100" Minimum="0" Margin="20"></Slider>
  4. <TextBox Name="txtValue" Margin="20" Width="50" Height="30"></TextBox>
  5. </StackPanel>
  6. </Grid>
Output

output

Now, let's learn all the bindings, one by one.