To bind one property value of a control to the another property of a control

Santhi
Posted by Santhi under WPF category on | Points: 40 | Views : 1297
Hi

To bind a property value of a control to the another property of a control

For example:
Try this:
Just drag a slider control and an image control on a xaml page.
Give a source to the image control.
if you move the slider , the image also re-sizes according to the slider value.
 <Slider HorizontalAlignment="Left" Margin="147,103,0,0" VerticalAlignment="Top" Width="239" Name="slider1" Minimum="100" Maximum="9000" Value="20"/>
<Image HorizontalAlignment="Left" VerticalAlignment="Top" Source="images/penguins.jpg"
 Width="{Binding ElementName=slider1 ,Path=Value}"  Margin="47,195,0,0"/>

Comments or Responses

Login to post response