Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > PanelBar > WrapPanel inside RadPanelBar?

Not answered WrapPanel inside RadPanelBar?

Feed from this thread
  • Jason avatar

    Posted on Dec 2, 2010 (permalink)

    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?

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Dec 6, 2010 (permalink)

    Hi Jason,

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

    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

    Reply

  • Jason avatar

    Posted on Dec 6, 2010 (permalink)

    Works perfectly! Thank you SO much!

    Reply

  • Wolfgang Kaiser avatar

    Posted on Nov 4, 2011 (permalink)

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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > PanelBar > WrapPanel inside RadPanelBar?
Related resources for "WrapPanel inside RadPanelBar?"

Silverlight PanelBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]