积极答复者
wpf tab如何做出这种效果?

问题
答案
-
这种不规则形状是不是可以通过PathGeometry来实现呢? 例如:
<Path Stroke="DarkGray" StrokeThickness="2"> <Path.Data> <PathGeometry> <PathFigure StartPoint="80,40" IsClosed="False"> <LineSegment Point="160,40"></LineSegment> <LineSegment Point="200,100"></LineSegment> <LineSegment Point="80,100"></LineSegment> <LineSegment Point="80,40"></LineSegment> </PathFigure> </PathGeometry> </Path.Data> </Path>
执行结果是:
- 已编辑 MaJiXiang 2011年9月16日 10:02
- 已建议为答案 Jie BaoModerator 2011年9月16日 16:20
- 已标记为答案 a013strife 2011年9月19日 6:26
-
请问这样的path怎么放到tabcontrol中呢?代码看看?
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 a013strife 2011年9月19日 6:26
全部回复
-
这种不规则形状是不是可以通过PathGeometry来实现呢? 例如:
<Path Stroke="DarkGray" StrokeThickness="2"> <Path.Data> <PathGeometry> <PathFigure StartPoint="80,40" IsClosed="False"> <LineSegment Point="160,40"></LineSegment> <LineSegment Point="200,100"></LineSegment> <LineSegment Point="80,100"></LineSegment> <LineSegment Point="80,40"></LineSegment> </PathFigure> </PathGeometry> </Path.Data> </Path>
执行结果是:
- 已编辑 MaJiXiang 2011年9月16日 10:02
- 已建议为答案 Jie BaoModerator 2011年9月16日 16:20
- 已标记为答案 a013strife 2011年9月19日 6:26
-
哈哈,你看下 Olaf WPF大牛的这系列自定TabControl的文章,应该有收获:
- http://blogs.intuidev.com/post/2010/01/25/TabControlStyling_PartOne.aspx
- http://blogs.intuidev.com/post/2010/01/26/TabControlStyling_PartTwo.aspx
- http://blogs.intuidev.com/post/2010/02/15/WPF-TabControl-series-Part-4-Closeable-TabItems.aspx
- http://blogs.intuidev.com/post/2010/02/10/TabControlStyling_PartThree.aspx
然后你看这个帖子吧,直接就能够解答你的问题: http://stackoverflow.com/questions/561931/how-to-create-trapezoid-tabs-in-wpf-tab-control
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
请问这样的path怎么放到tabcontrol中呢?代码看看?
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 a013strife 2011年9月19日 6:26
-
哈哈,这个视频啥的 我还真没接触多少.不过个人觉得在Blend中 右键Edit Template,对生成的 Template 可以做很多修改。 再利用Blend的很好的可视化绘图性,就能做到。 这个你可能需要一些专门作Blend的帮助了,我们是关注与VS上WPF的,主攻Code Design,设计上的是由Expression Blend 论 坛 http://social.expression.microsoft.com/Forums/en-US/categories
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.