HeaderTemplate Problem

3 posts, 1 answers
  1. Levon
    Levon avatar
    17 posts
    Member since:
    May 2013

    Posted 15 May 2013 Link to this post

    I am using Silverlight 5, and Telerik version 2012 Q2. 
    I have the following code:
    <UserControl.Resources>
        <DataTemplate x:Key="ContentTemplate">
            <ScrollViewer HorizontalScrollBarVisibility="Auto">
                <ItemsControl x:Name="Test"
                              ItemsSource="{Binding Items}">
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <toolkit:WrapPanel Orientation="Vertical" Height="220">
                            </toolkit:WrapPanel>
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <controls:ParameterItem Style="{StaticResource ParamItem}" 
                                            Description="Description"
                                            ParamValue="Value"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </ScrollViewer>
        </DataTemplate>
    </UserControl.Resources>
    <telerik:RadPanelBar Grid.Row="1"
                  Margin="2"
                  ItemsSource="{Binding Parameters}"
                  HorizontalAlignment="Left"
                  ItemTemplate="{StaticResource ContentTemplate}"
                  Width="Auto">
    </telerik:RadPanelBar>

    My first problem is that my custom control - which is described in UserControl.Resources named ContentTemplate, sits in the header of my RadPanelBar. I want it to sit in the items part, and I want to describe my HeaderTemplate, can anyone help?
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 16 May 2013 Link to this post

    Hi Levon,

    If you're trying to display hierarchical data in RadPanelBar, then you can follow the steps described in this tutorial. And if you need to display a flat collection of data, then you can take a look at the project attached in this forum thread.

    Let me know if this information helps or if you have more questions.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Levon
    Levon avatar
    17 posts
    Member since:
    May 2013

    Posted 16 May 2013 Link to this post

    Thank you for your reply, I solved the problem using the first tutorial.
Back to Top