Toolbars do not pick up application level theme.

2 posts, 0 answers
  1. Don
    Don avatar
    40 posts
    Member since:
    Apr 2009

    Posted 25 Jan 2010 Link to this post

    I have toolbars defined on my dialogs and they do not pick up the theme defined in the application. I have enclosed a screenshot but this error is pretty straight forward. I have to set the theme directly on the toolbar for it to display correctly. We are using the 2009 Q3 version of the controls. (2009.3.1103.1030)

    The application startup code

            public App() 
            { 
                this.Startup += this.Application_Startup; 
                this.Exit += this.Application_Exit; 
                this.UnhandledException += this.Application_UnhandledException; 
                StyleManager.ApplicationTheme = ThemeManager.FromName("Office_Blue"); 
                 
                InitializeComponent(); 
            } 
     
     

    The page code

    <UserControl x:Class="ToolbarStyleTest.MainPage" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"  
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
      <Grid x:Name="LayoutRoot"
            <Grid.RowDefinitions> 
                <RowDefinition Height="30px" /> 
                <RowDefinition Height="30px" /> 
                <RowDefinition /> 
            </Grid.RowDefinitions> 
            <telerikNavigation:RadToolBar x:Name="mainToolbar" telerik:StyleManager.Theme="Office_Blue" Width="Auto" Grid.Column="0" Grid.Row="0" > 
                <Button BorderThickness="0" x:Name="btnSaveAndClose" Margin="0"
                    <StackPanel Orientation="Horizontal" Margin="4,0,0,0" > 
                        <TextBlock Text="Save and Close" Margin="2,0,0,0" /> 
                    </StackPanel> 
                </Button> 
                <telerikNavigation:RadToolBarSeparator /> 
                <Button BorderThickness="0" x:Name="btnPrint" Margin="0"
                    <StackPanel Orientation="Horizontal" Margin="4,0,0,0"
                        <TextBlock Text="Print" Margin="2,0,0,0" /> 
                    </StackPanel> 
                </Button> 
                <Button BorderThickness="0" x:Name="btnHelp" Margin="0"
                    <StackPanel Orientation="Horizontal" Margin="4,0,0,0" > 
                        <TextBlock Text="Help" Margin="2,0,0,0" /> 
                    </StackPanel> 
                </Button> 
            </telerikNavigation:RadToolBar> 
            <telerikNavigation:RadToolBar x:Name="mainToolbar2" Width="Auto" Grid.Column="0" Grid.Row="1" > 
                <Button BorderThickness="0" x:Name="btnSaveAndClose2" Margin="0"
                    <StackPanel Orientation="Horizontal" Margin="4,0,0,0" > 
                        <TextBlock Text="Save and Close" Margin="2,0,0,0" /> 
                    </StackPanel> 
                </Button> 
                <telerikNavigation:RadToolBarSeparator /> 
                <Button BorderThickness="0" x:Name="btnPrint2" Margin="0"
                    <StackPanel Orientation="Horizontal" Margin="4,0,0,0"
                        <TextBlock Text="Print" Margin="2,0,0,0" /> 
                    </StackPanel> 
                </Button> 
                <Button BorderThickness="0" x:Name="btnHelp2" Margin="0"
                    <StackPanel Orientation="Horizontal" Margin="4,0,0,0" > 
                        <TextBlock Text="Help" Margin="2,0,0,0" /> 
                    </StackPanel> 
                </Button> 
            </telerikNavigation:RadToolBar> 
        </Grid> 
    </UserControl> 
     



  2. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 27 Jan 2010 Link to this post

    Hi Don,

    We are aware of this issue and it will be fixed as soon as possible. In the meantime, you can make OfficeBlue an application theme. <telerikOffice_BlueTheme x:Key="Theme" IsApplicationTheme="True" />

    Please find attached an example. If you have further questions please do not hesitate to ask us.

    Sincerely yours,
    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.
  3. DevCraft banner
Back to Top