RadPane ScrollViewer Incompatable with Theme

4 posts, 0 answers
  1. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 12 Mar 2013 Link to this post

    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
  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 15 Mar 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 15 Mar 2013 Link to this post

    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">
    .
    .

  5. Masha
    Admin
    Masha avatar
    355 posts

    Posted 18 Mar 2013 Link to this post

    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.

Back to Top