Articles → WPF → Binding Property Of One Element To Other In WPF
Binding Property Of One Element To Other In WPF
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Content="Test" Background="Red" x:Name="Button1"></Button>
<TextBox Name="TextBox1" Grid.Column="1"></TextBox>
</Grid>
Property_Name = "{Binding ElementName=Control_Name, Path=Control_Property}"
<TextBox Name="TextBox1" Grid.Column="1" Text="{Binding ElementName=Button1, Path=Content}"/>
Click to Enlarge
<TextBox Name="TextBox1" Grid.Column="1">
<TextBox.Text>
<Binding ElementName="Button1" Path="Content"></Binding>
</TextBox.Text>
</TextBox>