sdk - Volume slider c# windows phone 7.1 -


i have problem slider volume in windows phone app 7.1

this xaml

<slider name="volumeslider" verticalalignment="center" valuechanged="changemediavolume" minimum="0" maximum="1" value="0.5" margin="0,146,0,-27"/> 

and function changemediavolume

private void changemediavolume(object sender, routedpropertychangedeventargs<double> args) {    audioplayer.volume = (double)volumeslider.value; } 

if don't have lines it's ok... when in code debugger show error.

a first chance exception of type 'system.windows.markup.xamlparseexception' occurred in system.windows.ni.dll

if there handler exception, program may safely continued.

probably what's wrong it. try changing line

<slider name="volumeslider" ... 

to

<slider x:name="volumeslider" ... 

Comments

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -