Hi
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
E.g
<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:GroupContainer.ItemsPanel>
<ItemsPanelTemplate>
<telerik:LabelMeasurementPanel Slider="{Binding ElementName=PART_Slider}"/>
</ItemsPanelTemplate>
</telerik:GroupContainer.ItemsPanel>
<telerik:GroupContainer.Template>
<ControlTemplate>
<ItemsPresenter/>
</ControlTemplate>
</telerik:GroupContainer.Template>
</telerik:GroupContainer>
[This is inside the Thump control Style]
<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{StaticResource TimeBar_SelectionThumb_Thumbs_OuterBackground}"
MouseLeftButtonDown="Border_MouseLeftButtonDown_1">
<Border x:Name="BackgroundAnimation"
BorderBrush="{StaticResource TimeBar_SelectionThumb_Thumbs_InnerBorder}"
BorderThickness="{StaticResource TimeBar_SelectionThumb_Thumbs_InnerBorder_BorderThickness}"
Background="{TemplateBinding Background}"
/>
</Border>
Thanks in Advance
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
E.g
<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:GroupContainer.ItemsPanel>
<ItemsPanelTemplate>
<telerik:LabelMeasurementPanel Slider="{Binding ElementName=PART_Slider}"/>
</ItemsPanelTemplate>
</telerik:GroupContainer.ItemsPanel>
<telerik:GroupContainer.Template>
<ControlTemplate>
<ItemsPresenter/>
</ControlTemplate>
</telerik:GroupContainer.Template>
</telerik:GroupContainer>
[This is inside the Thump control Style]
<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{StaticResource TimeBar_SelectionThumb_Thumbs_OuterBackground}"
MouseLeftButtonDown="Border_MouseLeftButtonDown_1">
<Border x:Name="BackgroundAnimation"
BorderBrush="{StaticResource TimeBar_SelectionThumb_Thumbs_InnerBorder}"
BorderThickness="{StaticResource TimeBar_SelectionThumb_Thumbs_InnerBorder_BorderThickness}"
Background="{TemplateBinding Background}"
/>
</Border>
Thanks in Advance