I am creating Volume Slider from my music player for Window 8, but throwing an exception by saying:
'System.ArgumentException' was done on Microsoft.Phone.ni.dll but the user code
was not in my code: < Pre>
& lt; Slider X: name = "volume slider" horizontal alignment = "left" margin = "18,563,0,0" vertical alignment = "top" width = "245" randartransform.org = "0.467, -0.833" value changed = "changed media volume" /> ;
and
// Change the volume of the media Private Zero ChangeMediaVolume (Object Sender, RoutingProperty Changed Event Events> Double & gt; Args) {{ BackgroundAudioPlayer.Instance.Volume = (Double) VolumeSlider.Value; }} Zero initializePropertyValues () {BackgroundAudioPlayer.Instance.Volume = (Double) VolumeSlider.Value; }
You do not set the extent of the slider. The default limit is 0 to 10, however, BackgroundAutoPlayer.Instance.Volume requires a value between 0 and 1, the default value is 0.85, as you can read
Use it
& lt; Slider x: name = "volume slider" horizontal alignment = "left" margin = "18,563,0,0" vertical alignment = "top" width = "245" rendertransform = "0.467, -0.833" max = "1" value changed = " ChangeMediaVolume "/> And maybe you have SmallChange = "0.01" and LargeChange = "0.1"
Want to set up? Hope this helps
No comments:
Post a Comment