This is a migrated thread and some comments may be shown as answers.

Centering the VirtualizingWrapPanel content

1 Answer 77 Views
VirtualizingWrapPanel
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 02 Jul 2012, 09:02 AM
Hello,
I wish to have the content of the VirtualizingWrapPanel centered vertically and horizzontally (I'm builind a metro style-like menu and I wish to place my buttons in the center of the screen), since I don't know at prior how many menu's items the app will show (there's a sort of permission profiling) I wish the content to be centered first then auto arrange on horizontal.

How can I achive this?

Thanks

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 04 Jul 2012, 11:38 AM
Hi Paolo,

You can set the Margins from the sides that you desire when defining the WrapPanel itself.

<ListBox.ItemsPanel>
    <ItemsPanelTemplate>
        <telerik:VirtualizingWrapPanel Margin="150, 150, 0, 150"
                                       ScrollStep="100"
                                       ItemWidth="250"
                                       Orientation="Vertical"/>
    </ItemsPanelTemplate>
</ListBox.ItemsPanel>

Hope this helps!  All the best,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
VirtualizingWrapPanel
Asked by
Michele
Top achievements
Rank 2
Answers by
Nick
Telerik team
Share this question
or