slider

How to style the slider control in WPF?

浪尽此生 提交于 2020-08-22 06:39:30
问题 I want to style the slider control so that the height of the draggable thumb is set to 8 pixels. What is the simplest way to do this in WPF? <Slider> <Slider.Style> <!-- which xaml here? --> </Slider.style> </Slider> 回答1: The Slider Control has many parts Thumb, RepeatButtons and a Track. It is one of those controls that have named elements, like PART_Track, referenced by the code-behind for it to work correctly. A good starting point is to use Blend to help you out. Start a new project (or