问题
This is my first question on stack-overflow so don't kick it))
I have a problem trying to create a Mac-style slider control. I have found this solution and I have implemented it in my solution, but it still doesn't satisfy me cause I need a more universal solution.
Basically I need to create this slider control with the help of four pictures - right, left and center(the rest of) pictures of track bar and one picture for thumb. These are PNG files.
Could I style default WPF slider to support such resource-oriented behavior? I'm really astonished that all samples includes templates for style but no one supports something like
<TrackBarLeft>
<Image for left>
</TrackBarLeft>
....
Could any one give me a solution for this problem? Thank you very much
回答1:
Sams "WPF Control Development Unleashed" has some guidelines on this. Check out Chapter 5: Using Existing Controls - it has an example based on a scrollbar - it might be useful.
来源:https://stackoverflow.com/questions/8338837/wpf-custom-slider-drawed-by-yourself