tags:

views:

796

answers:

1

Hi,

I have a wrap panel that is dynamically populated with Label and TextBox control. The display will be something like this:

Label 1 [textbox] Label 4 [textbox] Label 2 [textbox] Label 5 [textbox] Label 3 [textbox]

and so on...

How can I setup the wrap panel so that it displays the controls like above?

Also the window length is fixed and sometimes there are many labels and they are cut off from the right hand side.

+1  A: 

It seems like I have to play around with the ItemWidth property of the Wrap Panel control.

<WrapPanel Width="Auto" ItemWidth="60" Height="Auto" HorizontalAlignment="Left" Orientation="Horizontal" x:Name="textBoxPanel" />
azamsharp