Jonathan Allen
Jonathan Allen

Reputation: 70287

Silverlight: How do I design a custom layout control?

I want to create a custom control named DetailRegion that accepts a collection of child controls. From there I want layout the controls in a manner of my choosing. For example...

<localControls:DetailRegion>
    <TextBlock Text="Occupation:" Style="{StaticResource Label}" />
    <TextBlock Text="{Binding Occupation}" Style="{StaticResource Value}" />
</localControls:DetailRegion>

... may be rendered as a grid with two columns or a stack panel depending on screen width.

I'm not asking for a complete solution, I just need tutorial to get me started.

Upvotes: 1

Views: 195

Answers (1)

Andris
Andris

Reputation: 1282

Msdn have also good sample, where custom panel creation is described.

Upvotes: 1

Related Questions