如何自动扩展 WPF tabitem 以适合标题文本?
基本上,这就是它的样子,我希望我的 tabitem 自动制作标题文本适合 tabitem 内。谢谢。
Basically, this is what it looks like, I want my tabitem to automatically make the header text fit inside the tabitem. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非您指定宽度,否则 WPF tabitem 宽度是自适应的。如果未指定宽度,请检查在定义 TabItem 样式时是否固定了内容控件或容器的宽度。
初始控制模板
WPF tabitem widths are adaptive unless you specify a width. If you don't specify a width, check if you have fixed the width of the content control or container when you define the TabItem style.
Initial control template