This question is locked. New answers and comments are not allowed.
I have an observable collection of items and a date template to display some of the properties of the items. Here is an example of the data template:
How can I bind the collection to the WrapPanel? I know I can add the objects in code, but I need to use data binding.
<
DataTemplate
x:Key
=
"ColorRectangleTemplate"
>
<
StackPanel
>
<
Rectangle
Width
=
"55"
Height
=
"55"
Fill
=
"{Binding Color, Converter={StaticResource ColorConverter}}"
Margin
=
"0,0,2,0"
DoubleTap
=
"ColorRectangle_OnDoubleTap"
ToolTipService.ToolTip
=
"Double Tap to see large tile. Drag to image to remove from list."
/>
<
TextBlock
HorizontalAlignment
=
"Center"
Margin
=
"0,0,2,5"
Text
=
"{Binding Color, Converter={StaticResource HtmlColorConverter}}"
/>
</
StackPanel
>
</
DataTemplate
>
How can I bind the collection to the WrapPanel? I know I can add the objects in code, but I need to use data binding.