Kasuni Abegunawardana

Kasuni Abegunawardana

  • NA
  • 211
  • 125.5k

WPF twoway binding

Dec 12 2017 12:28 AM
Hi all,
 
Please can anyone say what is the mistake here?? 
 
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Slider x:Name="MySlider" HorizontalAlignment="Left" Margin="113,70,0,0" VerticalAlignment="Top" Width="322"/>
<Rectangle Height="(Binding Mode=TwoWay, Element Name:MySlider, Path=Value, Update Source Trigger=propertyChanged)" Fill="#FFF4F4F5" HorizontalAlignment="Left" Margin="113,150,0,0" Stroke="Black" VerticalAlignment="Top" Width="100"/>
</Grid>
</Window>
 

Answers (1)