MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

Show slider value tooltip without having to click first

Open vertigo220 opened this issue 1 year ago • 2 comments

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

vertigo220 avatar Jul 08 '24 21:07 vertigo220

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.

Keboo avatar Jul 11 '24 07:07 Keboo

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: SliderClickbug

I created a branch here if someone wants to fiddle around

corvinsz avatar Oct 11 '24 21:10 corvinsz