Hi,
I have as list of usercontrols (Days) wich is bound to an ItemsControl.
I want every UserControl to have a border but when i try to do that with an ItemTemplate nothing happens. It's like the ItemTemplate is not used.
I don't want to add the border to the Day usercontrol.
What am i doing wrong?
This is xaml i am using:
<ItemsControl ItemsSource="{Binding Days}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderThickness="5" BorderBrush="Black">
<ContentPresenter/>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
I have as list of usercontrols (Days) wich is bound to an ItemsControl.
I want every UserControl to have a border but when i try to do that with an ItemTemplate nothing happens. It's like the ItemTemplate is not used.
I don't want to add the border to the Day usercontrol.
What am i doing wrong?
This is xaml i am using:
<ItemsControl ItemsSource="{Binding Days}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderThickness="5" BorderBrush="Black">
<ContentPresenter/>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>