读书人

ControlTemplate只得有一个Line

发布时间: 2012-09-11 10:49:03 作者: rapoo

ControlTemplate只能有一个Line?
我在xaml中添加第2条线时提示:
The object 'ControlTemplate' already has a child and cannot add 'Line'. 'ControlTemplate' can accept only one
child。
请大家帮忙看看,谢谢。

[解决办法]
不是只能有一个Line而是只能有一个Child,你应该用一个容器来承载你的Line(s),比如Panel或者Grid

读书人网 >C#

热点推荐