How to bind the value of slider from C# code in windows phone 8.1..?


  • Hi, I want to bind a custom seek bar to the position of media element.

    I think from XAML we can achieve it by 

         Value="{Binding ElementName=mediaElement, Path=Position, Mode=TwoWay, Converter={StaticResource FormatConverter}}"

    where FormatConverter is a converter class written to convert mediaElement object to slider value during binding.

    But I am creating the media element from code, so I want to write C# code to achieve the above. How to do it..?
    Monday, March 23, 2015 3:53 PM