Control Template for all themes

6 posts, 0 answers
  1. Michael
    Michael avatar
    18 posts
    Member since:
    Aug 2010

    Posted 06 Jun 2011 Link to this post

    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
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 07 Jun 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Michael
    Michael avatar
    18 posts
    Member since:
    Aug 2010

    Posted 07 Jun 2011 Link to this post

    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
  5. Dani
    Admin
    Dani avatar
    848 posts

    Posted 08 Jun 2011 Link to this post

    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
  6. Michael
    Michael avatar
    18 posts
    Member since:
    Aug 2010

    Posted 15 Jun 2011 Link to this post

    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
  7. Dani
    Admin
    Dani avatar
    848 posts

    Posted 16 Jun 2011 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready