我想创建一个UserControl(如ItemsControl),其中可能包含多个元素。如何创建UserControl,其中可能包含C#/ WPF中的其他元素
我想用这个用户控件这样的:
<local:MyUserControl Margin="10,34,10,10" Background="#FF202020">
<local:OtherUserControl Background="#FF202020" SelectedBackground="#FF303030" />
<local:OtherUserControl Background="#FF202020" SelectedBackground="#FF303030" />
<local:OtherUserControl Background="#FF202020" SelectedBackground="#FF303030" />
<local:OtherUserControl Background="#FF202020" SelectedBackground="#FF303030" />
<local:OtherUserControl Background="#FF202020" SelectedBackground="#FF303030" />
</local:MyUserControl>
我应该在XAML写尽它的工作原理就像我需要什么?你能给我任何代码的例子吗?
我不需要在我的用户noly使用的部件,我需要用我的用户在我的主窗口,在这个窗口中,我需要使用: ' <地方:的MyUserControl> <其它这里元素> 本地:MyUserControl> ' –
SkyDancer