Emulating TrackBar Resizing Behavior in a UserControl

I'm currently implementing a double TrackBar with two sliders. Things are going well, but I'm not sure how to go about implementing the sizing properties a TrackBar has.

In the Winforms editor in Visual Studio, a TrackBar with AutoSize set to true automatically sizes vertically and only gives you handles to size it horizontally (with the default Orientation value):

However, I'm not sure how to get these sizing properties with my custom control:

Sizing it myself works fine for now, but I'd like to emulate TrackBar 's behavior. How would I go about that?

链接地址: http://www.djcxy.com/p/62000.html

上一篇: SplitContainer面板调整大小问题

下一篇: 在UserControl中模拟TrackBar调整行为