locked
XAML Slider Bug

    Question

  • <Slider  Value="{Binding Path=OpacityPath,Source={StaticResource Settings},Mode=TwoWay}" StepFrequency="0.01" Minimum="-1.0" Maximum="-0.20"/>

    The above will produce a slider that will function, but the slider does not slide with your finger, you can only slide it so far to the left. I mean I can use min -1 and max 0 and it will function correctly but I don't want a max of 0. The values it produces are still technically correct, but the position where it lays them out on the slider is not. Very strange.

    Saturday, April 4, 2015 5:33 AM

All replies

  • That is because this is the desired output. If you want to customize it you should either create your own controls, or you can try to bear with the default behavior. 


    ~!Firewall!~


    Saturday, April 4, 2015 5:40 AM

  • Maybe I'm just tired but I'm not understand your logic of -0.2 is the minimum and max is -1.0

    -1 is less than -0.20

    You're suggesting I invert it and set the max to -1 and min to -0.2, that to me makes no sense at all.

    Max is on the right side, min on the left. Max is the biggest, -0.2 is bigger than -1.0... The user does not see the value, that's the default behavior with the Slider so it's not bad UX, these are the values I want

    Saturday, April 4, 2015 10:26 AM
  • That is because this is the desired output. If you want to customize it you should either create your own controls, or you can try to bear with the default behavior. 


    ~!Firewall!~


    I don't think that's the desired output at all, have you tried the above code? The desired output should not involve producing a poor UX - there is no reason why the left edge should not be exactly the minimum I tell it to use and the max on the right should not be the max I tell it to use whether it is positive or negative.

    This is a very basic requirement for a slider in my opinion, min goes left most edge and max goes right most edge no matter what, as long as the max is greater than the min.

    • Edited by craig91 Saturday, April 4, 2015 8:31 PM
    Saturday, April 4, 2015 8:26 PM