User define Theme - For timebar

2 posts, 0 answers
  1. Balaji
    Balaji avatar
    19 posts
    Member since:
    Jul 2011

    Posted 10 Sep 2011 Link to this post


    Currently , we have the implemented the Zoom in (Item container, Mouse button Left up) and Zoom out (Group Container Mouse up) based on some mouse click events ,  and also some other event in the Timebar control to control the movable selection bar. 

    Now i want to apply some , theme at run time, so i just want to take the user control resource to different Xaml file(eg Green Theme , Blue theme and etc) . I have almost copied theme which come along with the Examples and then i have added other events (Like MOuse button up and Down ect , Silder selection changes etc), so now the style has some events,

    so when i tried to add the resource dictionary at runtime, system says could able to find the mouse up and left events, How could and accomplish this.

    our Requirement is based on the user selection , i need to change the theme (Basically the Item container button , Group container button and it's mouse over color etc ) has to be changed. 

    I was able to accomplish , just by changing the Time bar button background color in the code behind by getting the key name and apply new color, since i have the user resourses in teh same file. However i want to accomplish the same using the themes , How could i do this?  I am having the event in the styles


    <telerik:GroupContainer x:Name="PART_GroupContainer" ItemsSource="{TemplateBinding IntervalGroups}" Grid.Row="0" Grid.RowSpan="2"  telerik:StyleManager.Theme="{StaticResource Theme}" MouseLeftButtonUp="PART_GroupContainer_MouseLeftButtonUp">
                                                    <telerik:LabelMeasurementPanel Slider="{Binding ElementName=PART_Slider}"/>

    [This is inside the Thump control Style]
      <Border BorderBrush="{TemplateBinding BorderBrush}" 
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{StaticResource TimeBar_SelectionThumb_Thumbs_OuterBackground}"
                                    <Border x:Name="BackgroundAnimation" 
                                        BorderBrush="{StaticResource TimeBar_SelectionThumb_Thumbs_InnerBorder}"
                                        BorderThickness="{StaticResource TimeBar_SelectionThumb_Thumbs_InnerBorder_BorderThickness}"
                                        Background="{TemplateBinding Background}"

    Thanks in Advance
  2. Sia
    Sia avatar
    692 posts

    Posted 14 Sep 2011 Link to this post

    Hello Balaji,

    Having in mind the error you receive, it appears that your custom theme is not applied.
    Could you please give us more details about the way it is set?
    A sample project if possible where the described problem can be observed will help us a lot in giving you the most appropriate solution of your problem.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top