Wpf slider causing exception because slider value is changin

Jun 9 2014 10:10 AM

I have come wpf slider controls on a Visual C# form that causes an exception

I limit the slider travel by checking the slider value in the event 'slider1_ValueChanged'

if( slider1value < iLim )

slider1.value = iLim;          // Exception occurs here

because the value is changed in this function it causes the function to execute again in a recursive manner causing the exception

How can I change the value with causing an exception?






Answers (3)