Change slider bar color

后端 未结 6 728
梦毁少年i
梦毁少年i 2020-12-20 19:09

It should be very easy to do this but I haven\'t found the information that I need. What I want is as simple as changing the color of the slider bar:

6条回答
  •  执念已碎
    2020-12-20 19:55

    For what it's worth, the only way I could change the Slider Thumb color on Win10 UWP for Phone was to overwrite the System Foreground brush. (You can also apparently completely re-template the whole Slider)

    So, I put into my App.xaml

    
    
    
        
    
    
    
    

    The addition to Application.Resources is the really important thing here. It's where we're overwriting the Foreground color for ALL common elements, like Checkbox, ContentDialog, ProgressRing, etc.... So, that's the downside to this method too.

    Changing the Thumb color on a Slider is a known problem point for XAML UWP. Microsoft has plans to make it easier in the immediate future.

提交回复
热议问题