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

RadPane ScrollViewer Incompatable with Theme

3 Answers 114 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Richard Harrigan
Top achievements
Rank 1
Richard Harrigan asked on 12 Mar 2013, 11:41 PM
Hi

 I am using Docking and all my RadPanel's have content controls that support scrollbars except for one RadPane.  I can get scrollbars by using the microsoft scrollviewer but my whole screen looks weird because one panel has a different style than all the others.  It seems that this defeats the purpose of using themes.  If there are xaml styles already built for this could they be provided with detail instructions on how to incorporate.  I have limited xaml experience and zero Blend experience.  I use third-party controls so I can concentrate on the c# part of the app without having to worry to much about xaml. 

Thanks
Rich

3 Answers, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 15 Mar 2013, 09:14 AM
Hi Richard,

RadPane will not pass its theme to its content. That is the reason scrollbars to have different look rather than the theme. Please, try setting the theme on the ScrollViewer explicitly, i.e. with an x:Key.
<Style x:Key="CustomScollViewr" TargetType="ScrollViewer">
    <Setter Property="telerik:StyleManager.Theme" Value="Office_Black" />
</Style>

Expression Blend is the easiest way for styling the RadDocking control. It generates all necessary styles and resources and make RadDocking control easy to modify without deep knowledge of XAML. Please, check the follow online articles for styling the RadDocking control:

Another way for styling RadDocking is to take the resources from the RadControls installation folder on your machine. Inside that folder you will find the Themes folder which contains all themes resources. Just drill down to the Telerik.Windows.Controls.Docking.xaml file and theme of your choice and include those resources in the project.

I hope this will be helpful.

All the best,
Maria
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Richard Harrigan
Top achievements
Rank 1
answered on 15 Mar 2013, 04:46 PM
Hi Maria

The following worked:   Slightly different than your suggestion, is it OK?  How would I do this is c# code?  I want to provide the ability for the user to change themes.

Thanks
Rich

<telerik:RadPane Header="Join Conditions"

ContextMenuTemplate="{x:Null}"

CanUserClose="False" CanFloat="False" CanUserPin="False">

<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" telerik:StyleManager.Theme="Office_Black">

<Grid Name="conditionGrid" Grid.Row="0" Margin="2" DataContext="{Binding OpConds}" Background="Transparent">
.
.

0
Masha
Telerik team
answered on 18 Mar 2013, 08:49 AM
Hello Richard,

You can easily apply the theme in code behind on ScrollViewer like this:

StyleManager.SetTheme(customScrollViewer, new VistaTheme());

I hope it helps.

Greetings,
Maria
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Docking
Asked by
Richard Harrigan
Top achievements
Rank 1
Answers by
Masha
Telerik team
Richard Harrigan
Top achievements
Rank 1
Share this question
or