ControlTemplate.Trigger on StyleManager.Theme

2 posts, 0 answers
  1. Steve
    Steve avatar
    127 posts
    Member since:
    Jun 2011

    Posted 02 Oct 2012 Link to this post

    I'm trying to avoid a lot of custom work with themes because all I want to do is change the Header BorderBrush used on various controls.  I was hoping I could do this as in the following snippet from a RadCalendar Style in my ResourceDictionary...

    <ControlTemplate TargetType="{x:Type telerik:RadCalendar}">
            <!-- Standard RadCalendar Suff Omitted for brevity -->
            <Trigger Property="telerik:StyleManager.Theme"
                <Setter TargetName="Navigation"
                        <LinearGradientBrush EndPoint="0.5,1"
                            <GradientStop Color="#FF5B5B5B"
                                          Offset="1" />
                            <GradientStop Color="#FF868686" />
                            <GradientStop Color="#FF0E0E0E"
                                          Offset="0.449" />
            <Trigger Property="telerik:StyleManager.Theme"
                <Setter TargetName="Navigation"

    And then in my xaml...

    <telerik:RadDatePicker Width="300" telerik:StyleManager.Theme="{Binding TelerikTheme}" CalendarStyle="{StaticResource RadCalendarStyle1}"/>

    However it doesn't work.  Is there anyway to implement something along these lines?

    Thanks in advance,

  2. Masha
    Masha avatar
    355 posts

    Posted 08 Oct 2012 Link to this post

    Hi Steve,

    We recommend using Implicit Styles when styling our controls - they allow to customize certain parts of the templates more easily.  Please find attached a sample project which illustrates how to achieve the needed approach with implicit styles

    If this does not help, send us a simple runnable project which demonstrates exactly the scenario. You should open a support ticket and attach the project there.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top