WrapPanel inside RadPanelBar?

4 posts, 0 answers
  1. Jason
    Jason avatar
    2 posts
    Member since:
    Dec 2010

    Posted 02 Dec 2010 Link to this post

    For our application we would like to use WrapPanels within a RadPanelBar to create a SmartPhone look. We've looked at the samples online and searched the forums but are having trouble figuring this out. (We were hoping for a property like ItemsPanel/ItemsPanelTemplate we could override.)

    We are employing the MVVM pattern and have figured out data binding with HierarchicalDataTemplate, ContainerBindingCollection etc. The WrapPanel is the last piece of the puzzle.

    Anyone know how to pull this off?
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 06 Dec 2010 Link to this post

    Hi Jason,

    You can use the ItemContainerStyle property of the RadPanelBar and set the ItemsPanel of the RadPanelBarItems  to contain a RadWrapPanel:
        <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
            <telerik:RadWrapPanel HorizontalAlignment="Stretch"
                                    VerticalAlignment="Stretch" />
        <Style x:Key="containerStyle"
            <Setter Property="ItemsPanel"
                    Value="{StaticResource ItemsPanelTemplate1}" />
    <Grid x:Name="LayoutRoot"
        <telerikNavigation:RadPanelBar ScrollViewer.HorizontalScrollBarVisibility="Disabled"
              ItemContainerStyle="{StaticResource containerStyle}"
              ItemsSource="{Binding Manifest.Categories}"
              ItemTemplate="{StaticResource categoryTemplate}" />

    Feel free to ask if you need further assistance.

    All the best,
    Tina Stancheva
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Jason
    Jason avatar
    2 posts
    Member since:
    Dec 2010

    Posted 06 Dec 2010 Link to this post

    Works perfectly! Thank you SO much!
  4. Wolfgang Kaiser
    Wolfgang Kaiser avatar
    9 posts
    Member since:
    Dec 2009

    Posted 04 Nov 2011 Link to this post

    This sample was extremely helpful to me as well.  Thanks much.
Back to Top