This is a migrated thread and some comments may be shown as answers.

Control Template for all themes

5 Answers 107 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 06 Jun 2011, 04:56 PM
Hi,

i have the following problem. When I create the control template for ScheduleView with Expression blend it automatically uses the office black theme. since we provide theme switching in our application i would need a control template that respects the currently set theme. how can I achieve this without doing everything manually?

thanks in advance,

michael

5 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 07 Jun 2011, 09:35 AM
Hi Michael,

I presume that you wish to make a customization to the RadScheduleView control in its ControlTemplate and you wish to support that in each of the themes that go with the RadScheduleView control.

Once you have chosen to change the control template of the control, all maintenance is done manually. There is not an automated or programmed way to update each of the theme resource dictionaries, except to do that manually.

In case you need all themes, you can include them in your project and programmatically apply different resources when your application theme changes. Please, find attached a set of all themes for RadScheduleView from 2011 Q1 SP1 release.

I hope this will be helpful.

Regards,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Michael
Top achievements
Rank 1
answered on 07 Jun 2011, 10:56 AM
Hi Dani,

thanks for your fast reply. even if this is not the answer i wanted to hear :-), but was afraid of, it is an answer and it will help me for my next development steps. the reason why I need to change the control template is that i want to adjust the CurrentVisibleRangeText property of the scheduler. Do you know another way for this problem than modifying the control template?

kind regards,

michael
0
Dani
Telerik team
answered on 08 Jun 2011, 08:24 AM
Hello Michael,

Currently, the CurrentVisibleRangeText is available as read only. The alternative to set a different visible range text is to inherit the RadScheduleView and override the UpdateVisibleRange method. You can provide your own formatting logic for the visible range dates.

I hope this helps.

Best wishes,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Michael
Top achievements
Rank 1
answered on 15 Jun 2011, 02:52 PM
Hello Dani,

What should I do in the UpdateVisibleRange method? The method returns void and has no parameters. I also can't find it in the API reference.

thanks,

michael
0
Dani
Telerik team
answered on 16 Jun 2011, 09:27 AM
Hi Michael,

Actually, you will not be able to override the UpdateVisibleRange method. I am sorry for the misleading guidance. It will take a few more steps to accomplish the task you wish.

After the next LIB, you will be able to inherit the DayViewDefinition and the WeekViewDefinition. For your custom DayViewDefinition, you need to override the FormatVisibleRangeText() method. It accepts range start, range end and current date as parameters and returns a string.
For the custom WeekViewDefinition, you need to override the GetVisibleRangeStart() method.

Please, note that, since this is WPF, for the DayViewDefinition and the WeekViewDefinition, you will also need to override the CreateInstanceCore() method. It simply does one thing - returns your new view definition. 

Once again, I apologize if the former explanation caused you inconvenience. I hope this information will be helpful.

Regards,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Michael
Top achievements
Rank 1
Answers by
Dani
Telerik team
Michael
Top achievements
Rank 1
Share this question
or