Centering the VirtualizingWrapPanel content

2 posts, 0 answers
  1. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 02 Jul 2012 Link to this post

    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
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 04 Jul 2012 Link to this post

    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 >>

  3. DevCraft banner
Back to Top