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

[Solved] HeaderTemplate Problem

2 Answers 162 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Levon
Top achievements
Rank 1
Levon asked on 15 May 2013, 06:31 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 16 May 2013, 05:21 PM
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.

0
Levon
Top achievements
Rank 1
answered on 16 May 2013, 08:23 PM
Thank you for your reply, I solved the problem using the first tutorial.
Tags
PanelBar
Asked by
Levon
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Levon
Top achievements
Rank 1
Share this question
or