Where is the DataRepeater for Silverlight?
/I came across a really puzzling thing while playing with Silverlight tonight, try as I might, I couldn't find a DataRepeater style of control.
Basically, this is what I wanted to do:
<StackPanel x:Name="actions" Margin="10,0,10,5" Orientation="Horizontal" >
<HyperLinkButton Content="{Binding ActionName}" Click="Action_Click" />
</StackPanel>
And then bind these to an array of actions in the datacontext.
Sadly, StackPanel doesn't support ItemTemplates, and looking around, it seems that the only controls that supports binding collections properly are ListBox and TabControl.
The Grid control is purely for positioning.
The ItemsControl (and the child class ListBox) supports ItemTemplate, but refuses to tile my hyperlinks one after another horizontally, until the width is full and it wraps around.
Bummer.
I've settled temporarily with adding the HyperLinkButtons in the codebehind inside a foreach loop. But not using databinding for this task makes me sad.
I will get to the bottom of this.