效果图
下面上代码
Windows1.xaml
<Window x:Class="WpfApp.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp"
mc:Ignorable="d"
Title="Window1" Height="450" Width="800">
<Window.Resources>
<local:ValueToColorConverter x:Key="converter" />
</Window.Resources>
<StackPanel>
<Slider Minimum="0" Maximum&