WPF CornerRadius 将角转向外侧
我正在尝试为菜单制作自己的 ControlTemplate。我想把一些物品的角转到外面。所以它看起来像 Word TabItems,我无法发布图像。但我希望你明白我的意思。
是否有可能像这样改变圆角半径?或者还有其他的可能性吗?
问候 标记
Im trying to make my own ControlTemplate for an menu. Id like to turn the corners of some items to the outside. So that it look like the Word TabItems, i cant post an image im sry. But i hope you understand what i mean.
Is there a possibility to change the cornerradius like that? or are there other possibilitys?
regards
Mark
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我想做类似的事情时,我经常使用网格,并在网格的“角”部分绘制路径。
例如,像word中的选项卡可以被绘制为具有2x3网格的网格。最上面一行将垃圾邮件全部 3 个单元格,并包含一个设置了顶部两个角半径的对象。底行的中间单元格将是文本,左侧和右侧的单元格将是按照您想要的方式绘制的
Path
。When I want to do something like that I often use a Grid with a
Path
drawn in the "corner" sections of the grid.For example, a tab like the one in word could be drawn as a grid with 2x3 grid. The Top row would spam all 3 cells and contain an object with the top two corner radius set. The bottom row's middle cell would be the Text and the left and right ones would be a
Path
drawn the way you want it.