Customizing the "Please provide an Appointment Source"

12 posts, 0 answers
  1. Rich Reuter
    Rich Reuter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 18 Jul 2012 Link to this post

    Is there a way to customize - either change or remove - the message that says "Please provide an Appointment Source" as the appointments on the calendar are being loaded?  
  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 19 Jul 2012 Link to this post

    Hello Rich,

    To modify the message "Please provide an Appointment Source",  you will have to edit the RadScheduleViewControlTemplate of the RadScheduleView control.

    <Grid x:Name="AppointmentSourceWarning" Background="White" Visibility="{Binding AppointmentsSource, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedNullToVisibilityConverter}}">
         <TextBlock Text="Please provide an AppointmentsSource" FontSize="32" Foreground="Black"    HorizontalAlignment="Center" VerticalAlignment="Center" />
    </Grid>


    Hope this hepls.

    Kind regards,
    Maria
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Rich Reuter
    Rich Reuter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 19 Jul 2012 Link to this post

    Ok. Thanks for your help. It would be nice to have that as a dependency property where you could set the content that way rather than having modify the control template.
  5. guy
    guy avatar
    46 posts
    Member since:
    Sep 2010

    Posted 21 Sep 2012 Link to this post

    hi
    can you send the conext of this xaml
    where to pu the Grid?full example will be good
  6. chillfire
    chillfire avatar
    9 posts
    Member since:
    Apr 2008

    Posted 15 Apr 2014 Link to this post

    Hi,

    I am using v.2013.3.1316 and cannot find the RadScheduleViewControlTemplate option for the ScheduleView control?
    Has this changed in the newer version?

    cheers
    craig
  7. Masha
    Admin
    Masha avatar
    355 posts

    Posted 15 Apr 2014 Link to this post

    Hi Craig,

    I believe you need to modify the Template property of RadScheduleVIew.
    RadScheduleViewControlTemplate is the default Tempate we used for RadScheduleView control. You can find all its styles and resources inside Themes.Implicit folder of your personal installation. Simply look for Telerik.Windows.Controls.ScheduleView.xaml file under the theme of your choice.

    I hope this helps.

    Regards,
    Masha
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 12 Nov 2014 in reply to Masha Link to this post

    Can you provide an example for this?  I'm having trouble modifying the template to change this text.
  9. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 12 Nov 2014 in reply to Scott Link to this post

    I got this to work by copying all 235 lines of code from the control template in Telerik.Windows.Controls.ScheduleView.xaml, then adding that to my xaml page, then just changing the text "Please provide an Appointment Source" to what I need.  Now my question is - Do I need to copy all 235 lines of code or is there some way to simply change the section I need to (see below)?  It adds a lot of code to my page for one little change.

    <Grid x:Name="AppointmentSourceWarning" Background="White" Visibility="{Binding AppointmentsSource, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedNullToVisibilityConverter}}">
                                        <TextBlock Text="Please provide an Appointment Source" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24"/>
                                    </Grid>
  10. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 12 Nov 2014 in reply to Scott Link to this post

    Oh, and for anyone else reading this, I also had to add the following references to the page/UserControl that contains my scheduleview:

    xmlns:telerikScheduleView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
  11. Masha
    Admin
    Masha avatar
    355 posts

    Posted 13 Nov 2014 Link to this post

    Hello Rich,

    I've attached a sample project which demonstrates the desired approach. I've used implicit styles approach for the provided example.

    Hope it helps.

    Regards,
    Masha
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  12. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 13 Nov 2014 in reply to Masha Link to this post

    I downloaded your your sample project.  All you did was take that same 235 lines of code I'm referring to and move it to app.xaml instead of the main user control.  I was asking if there is a way to cut down on the amount of code needed to change this template.  I'm going to assume the answer is no since you also used this large chunk of style code.  If there is actually a way to use LESS code to achieve the desired affect, please let me know.  
    Thanks again.
  13. Masha
    Admin
    Masha avatar
    355 posts

    Posted 18 Nov 2014 Link to this post

    Hi Scott,

    Unfortunately there is no other way to change the appointment source warning text at the moment.
    However we decided to add this text to the localization manager which will allow you to customize the appointment source warning text without editing the control template. This option will be available in our next internal build.

    I hope this helps.

    Regards,
    Masha
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner