MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit copied to clipboard
Show slider value tooltip without having to click first
Bug explanation
I submitted an issue to FanControl which is, per its developer, related to this project. When using the mouse scroll wheel to change a slider, the value tooltip doesn't show unless clicking the slider first. I suppose this could be intended behavior, but it would be nice to have an option to always show the value when changing it without having to click first.
Version
5.0
Did some investigation into this.
Reproduction steps. In the demo app click on the "tracks" (repeat buttons) above or below the slider thumb. Note that the value changes but the tooltip is not shown until you click on the thumb itself.
It appears that the issue is clicking on the repeat buttons does not move focus to the Slider.
Some more info on this:
When setting IsMoveToPointEnabled to True in the style for the Slider, there is additional code executed before the actual base.OnPreviewMouseLeftButtonDown(e);. I assume that is the issue with this bug.
For reference see: https://source.dot.net/#PresentationFramework/System/Windows/Controls/Slider.cs,773
Simply setting IsMoveToPointEnabled to False works, however this would impact the UX since - as the name implies - you can't jump to a value on the track with a single click anymore:
I created a branch here if someone wants to fiddle around