如何向stackpanel添加路径列表? [英] How to add a list of path to a stackpanel?
本文介绍了如何向stackpanel添加路径列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道如何在 StackPanel
中添加一个路径
,但如何添加列出<路径>
到 StackPanel
?
什么我试过了:
I know how to add one Path
to a StackPanel
, but how can I add a List<Path>
to a StackPanel
?
What I have tried:
foreach (var onePath in drawThisList)
{
myStack.Children.Add(onePath);
}
但它无效。
But it is not working.
推荐答案
好像,你正在使用WPF ...
检查:
wpf - 指定的Visual已经是另一个Visual或root的子CompositionTarget - Stack Overflow [ ^ ]
指定的Visual已经是另一个Visual的子项或CompositionTarget的根。 [ ^ ] br />
Go好运!
Seems, you're using WPF...
Check this:
wpf - Specified Visual is already a child of another Visual or the root of a CompositionTarget - Stack Overflow[^]
Specified Visual is already a child of another Visual or the root of a CompositionTarget.[^]
Good luck!
这篇关于如何向stackpanel添加路径列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文