0
新年快乐!感谢您阅读本文!Tabcontrol contentTemplate定位
我有定位为的ContentTemplate动态内容的问题,我有以下几点:
<TabControl ItemsSource="{Binding Cats}">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" FontSize="16" FontWeight="Bold"></TextBlock>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<WrapPanel>
<ItemsControl ItemsSource="{Binding Products}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Content="{Binding Name}" Height="25" Width="100"></Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</WrapPanel>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
的的ItemsSource绑定猫返回分类 的列表,并在每个类别有返回列表的属性产品
目前显示的是垂直堆叠的所有按钮,但我需要的按钮,以填补wrapPanel。什么我找的ContentTemplate一个例证:
任何想法,将不胜感激!
该死的应该已经实现了那里的包装.. 非常感谢您的帮助! – Sentinel 2012-01-04 14:26:58