How to Stretch WPF Tab Item Headers to Parent Control Width

后端 未结 11 1951
花落未央
花落未央 2020-11-29 23:17

Is there a way in XAML to cause the tab item headers to stretch across the width of the tab control?

For example, I have three tabs: red, blue and green. If I have a

11条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 23:58

    Everyone seems to be going the converter route, but it really is as simple as using a UniformGrid with Rows set to 1 in the TabControl template, in place of the TabPanel. Of course, you will have to re-template it, but this isn't too bad.

提交回复
热议问题