views:

47

answers:

1

Hi....I am using Slider control for audio player in silverlight 3.0 application. I can do forward and backward the slider.The problem is the slider is not moving automatically even the audio is playing. How to get it??

+1  A: 

Sounds to me that you don't have TwoWay binding set up. In you binding statement, use Mode=TwoWay. Maybe I'm not completely understanding your question, but that's the first thing I would look at.

JSprang
The below one is my xaml code. <Slider x:Name="SliderPosition" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" MouseLeftButtonDown="MouseClicked" MouseLeftButtonUp="MouseReleased" ValueChanged="SliderPosition_ValueChanged" Height="30" Width="484" Minimum="0" ></Slider>
Srikanth
there is no property like mode for slider control.
Srikanth
I'm assuming that as the audio player plays, you want the slider to move and represent how much of the audio clip is completed, is this correct?The 'Mode' is used in a binding statement, like this:<Slider Value="{Binding AudioPlayerValue, Mode=TwoWay}"/>AudioPlayerValue would be the property in your ViewModel that you want to bind to, or you could use element to element binding. I'm not exactly sure what your audio player is, so I don't feel that I can completely answer your question.
JSprang