This is a migrated thread and some comments may be shown as answers.
Putting other controls into a TabStripPanel
3 Answers 68 Views
This is a migrated thread and some comments may be shown as answers.
simeon
Top achievements
Rank 1
simeon asked on 12 Aug 2009, 01:33 PM
Hi,

First post.  Cool control library by the way...

Is it possible to display other controls in the TabStripPanel in the TabControl.  We would like to display some static data there that really needs to be seen across all the tabs.  I know we could just display the data in textblocks above the tabcontrol but we want the controls to theme the same as the TabStripPanel and kind of look part of it.

Any recommendations how to do this?

Cheers,

Simeon

3 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 14 Aug 2009, 06:00 AM
Hello simeon,

Please find attached a sample project that shows how to edit the HeaderTemplate and place some content into it.

 <DataTemplate x:Key="header1">
            <StackPanel Orientation="Horizontal">
                <Ellipse Width="10" Height="10" Fill="Green"
                        VerticalAlignment="Center" Margin="2" />
                <TextBlock Text="{Binding Name}" />

            </StackPanel>
        </DataTemplate>
......
  <nav:RadTabControl x:Name="tabControl" ItemTemplateSelector="{StaticResource myContentTemplates}">
            <nav:RadTabControl.ItemContainerStyle>
                <Style TargetType="nav:RadTabItem">
                    <Setter Property="HeaderTemplateSelector"
                            Value="{StaticResource myHeaderTemplates}" />
                </Style>
            </nav:RadTabControl.ItemContainerStyle>
        </nav:RadTabControl>

I hope that this will help you. Please let us know if you have any other questions.

Best wishes,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
simeon
Top achievements
Rank 1
answered on 14 Aug 2009, 08:17 AM
Sorry I dont think I explained quite what I meant.  I thought the TabStrip panel containted the tabsheet headers.  Your example puts content into the tabsheet header.  What I was looking to do was increase the height of the Grey strip that holds all of the tab sheet headers and put a few textbox's with textblocks in it above the tabsheet headers. Then when the UI theme changes to say the office blue one the grey bar goes a light blue colour and the background for our user controls in that region matches it.  Really I was just being lazy in not wanting to find out the colour from the theme and coloring a canva's to match it.


Cheers,

Simeon
0
Bobi
Telerik team
answered on 14 Aug 2009, 01:59 PM
Hello simeon,

If you want to accomplish this you have to set some custom template to RadTabControl. For more information please visit the following articles that will help you editing the RadTabControl in Blend:

http://www.telerik.com/help/silverlight/radcontrols-for-silverlight-expression-blend-support.html
http://www.telerik.com/help/silverlight/extend-and-modify-builtin-themes.html

In the RadTabControl  ControlTemplate you have to find "ItemsPresenterElement" and put the TextBloxk next to it the final code should looks like for example:
            <StackPanel>
                <TextBlock x:Name="text" Text="some text" />
                <!--TabStrip-->
                <ItemsPresenter Margin="2 3 0 0"
                                 x:Name="ItemsPresenterElement" />
              </StackPanel>

I hope that this will help you.

Regards,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
simeon
Top achievements
Rank 1
Answers by
Bobi
Telerik team
simeon
Top achievements
Rank 1
Share this question
or