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

Style ScrollBar

2 Answers 77 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 28 Oct 2009, 07:41 AM
Hello,

I would like to apply my own style to the horizontal and vertical ScrollBar control for my RadTabControl.

I have tried to find some documentation on this but can't find any, but I did find this post that said I need to edit the template for RadTabControl.
http://www.telerik.com/community/forums/silverlight/tabcontrol/tabitem-background-color.aspx#731163

I have tried this but I can't find where I can apply my ScrollBar style, all I get is this template for each side of the TabControl:

                <Grid> 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="auto"/>  
                        <RowDefinition Height="*"/>  
                    </Grid.RowDefinitions> 
                    <VisualStateManager.VisualStateGroups> 
                        <VisualStateGroup x:Name="CommonStates">  
                            <VisualState x:Name="Disabled"/>  
                            <VisualState x:Name="Normal"/>  
                        </VisualStateGroup> 
                    </VisualStateManager.VisualStateGroups> 
                    <Border Grid.Row="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">  
                        <ContentPresenter x:Name="ContentElement" Content="{TemplateBinding SelectedContent}" ContentTemplate="{TemplateBinding SelectedContentTemplate}"/>  
                    </Border> 
                    <Grid> 
                        <Rectangle Fill="{StaticResource RadTabControlHeaderBackground}" Visibility="{TemplateBinding BackgroundVisibility}"/>  
                        <ItemsPresenter Margin="2 4 0 0"/>  
                    </Grid> 
                    <Rectangle x:Name="DisableVisual" Fill="{StaticResource RadTabItemDisabledBackground}" Visibility="Collapsed" Grid.RowSpan="2"/>  
                </Grid> 

According to SilverlightSpy, the ScrollViewer is burried well done in the above ContentPresenter, inside a RadPanelBar control, but I have no idea how to apply my custom style to this.

Help appreciated!
Regards,
James.

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 03 Nov 2009, 08:56 AM
Hello James,

Could you, please, let us know which version of our controls do you use because in the 2009.2 812 version there is no ScrollBar in the RadTabControl.

Best wishes,

Dimitrina
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James
Top achievements
Rank 1
answered on 04 Nov 2009, 08:11 AM
Hello,

Thanks for this information - I'm actually using an older build: 2009.2.828.1030

The newer builds break a lot of my RadDocking templates so I'm waiting until Q3 is released before doing a single big upgrade.

Regards,
James.
Tags
TabControl
Asked by
James
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
James
Top achievements
Rank 1
Share this question
or