MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.28k stars 2.45k forks source link

[Bug] RangeSlider is incorrectly drawn when the maximum value is a high number #3722

Closed Symbai closed 4 years ago

Symbai commented 4 years ago

Describe the bug RangeSlider is incorrectly drawn when the maximum value is a high number. In the example below the second slider should start where the first slider ends.

To Reproduce See repo

Screenshots image

Environment(please complete the following information):

Repo

<StackPanel>
    <mah:RangeSlider
        Width="200"
        Height="20"
        AutoToolTipPlacement="TopLeft"
        LowerValue="190"
        Maximum="400000"
        UpperValue="300" />
        <mah:RangeSlider
        Width="200"
        Height="20"
        AutoToolTipPlacement="TopLeft"
        LowerValue="300"
        Maximum="400000"
        UpperValue="350" />
    </StackPanel>
timunie commented 4 years ago

Hi @Symbai and a happy new year.

The RangeSlider has a MinRangeWidth-Property. This changes how the Slider is drawn. You can set this to even to 0 if you want to. image

If I got you wrong please let me know.

Happy coding Tim