Click here to Skip to main content
15,905,144 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When i move my slider control i want to change the value of the text box (that text box is binded with the slider) that is happened in same window .when i try with page binding with (Window)slider that is not happening.
Posted

1 solution

Here is a sample code.

XML
<TextBox Height="23" HorizontalAlignment="Left" Margin="12,0,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" Text="{Binding ElementName=slider1, StringFormat=0, Path=Value, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"  />
       <Slider Height="23" HorizontalAlignment="Left" Margin="12,35,0,0" Name="slider1" VerticalAlignment="Top" Width="100" />



Hope this will help you...!!!
 
Share this answer
 
Comments
jobyjames 21-Feb-12 4:37am    
in the window
<grid>
<Label Content="Slider Value" Margin="77,35,132,250" />
<textbox height="23" margin="79,62,99,0" name="textBox1" verticalalignment="Top" text="{Binding ElementName=slider1, Path=Value}">
<slider height="22" margin="79,10,99,0" name="slider1" verticalalignment="Top">
<Frame Margin="0,101,1,7" x:Name="frameMain" JournalOwnership="OwnsJournal" NavigationUIVisibility="Hidden">
</Frame>
CGN007 21-Feb-12 6:35am    
Could please update more details about the problem?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900