All Day Event

15 posts, 1 answers
  1. Colin
    Colin avatar
    19 posts
    Member since:
    Jun 2011

    Posted 01 Jul 2014 Link to this post

    Hi,

    When I create a new Appointment as AllDayEvent it does not look any different from a normal event, is there any way to make it outstanding? So when someone looks at the ScheduleView he/she can instantly see that this is all day event? For example in Outlook these events are move to the top (see the attachment), so I can see them at any time when I look at the particular date. Otherwise I would have no clue that this is all day event untill I actually open it.

    Is there any way to achieve this?

     

    Kind Regards

  2. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 02 Jul 2014 Link to this post

    Hello Colin,

    You will have to set ShowAllDayArea  property of the ViewDefinition in order to show the additional area for all day appointments as in Outlook. Please note that this property is available only for DayViewDefinition and WeekViewDefinition.  You can see it in action in the ScheduleView Configurator example at our WPF Demos.

    Hope this will be helpful.

    Regards,
    Yana
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Colin
    Colin avatar
    19 posts
    Member since:
    Jun 2011

    Posted 02 Jul 2014 in reply to Colin Link to this post

    Hi Yana,

    Thank you very much for your answer, this behaviour in these to views are just what I need.

    Regards
  5. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 02 Jul 2014 Link to this post

    Hi,

    I have the same problem and checked it with Outlook.
    There I found that (in month view) a "FullDay" Appointment has no time displayed - instead the text is centered.
    And I also found (which is annoying) that RadScheduleView) doesn't display a time at all.

    So (talking about month view) while I see in Outlook - this appointment is 10:20-11:30 - I see nothing in RadScheduleView.
  6. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 02 Jul 2014 in reply to ManniAT Link to this post

    And another "strange" thing - if I add an appointment - just enter Subject and select FullDay (change nothing else) the result is a "small line" in timeline view.
    When I "blow up the thing" (give it a duration before I select FullDay) it becomes better visible.
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 04 Jul 2014 Link to this post

    Hello Manfred,

    Thank you for sending your feedback about the AllDay appointments in RadScheduleView. Indeed, their implementation is a little bit different than in Outlook.

    However, I cannot reproduce the mentioned behavior with the centered text and the ScheduleView not displaying a time at all - could you please elaborate more on this?

    As to the TimelineViewDefinition - it does not provide AllDayArea and the all-day appointments are rendered as regular appointment according their Start/End times. If the minor ticks in TimelineViewDefinition are in small intervals, any new appointment will be shown as a small line. If that's not exactly the case, can you provide more details, so we to be able to test it at our side?

    Regards,
    Yana
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  8. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 04 Jul 2014 in reply to Yana Link to this post

    Hello Yana,

    I'll try to explain - in Outlook 2007 all day appointments have centered text without a time.
    With Office 2013 centered formatting is gone - but I still can distinguish since all day events have no times displayed.

    The "thin line" display - of course I can:
    a.) Create an appointment
    b.) Set a time from 0:01 to 23:59
    AFTER THAT
    c.) Check "all day"

    But this should be set by default so that an all day appointment looks what it is -- a thing covering the whole day.

    About the missing times:
    I attached a screenshot with
    (Top) RadScheduleView
    (Center) The "Lines" where one is correct (half an hour appointment) and the other should last the whole day
    (Bottom) - Outlook showing how easy I can distinguish between All day an normal as well as I get the "when does it start / end" information on the event in month view.

    Manfred
  9. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 09 Jul 2014 Link to this post

    Hi Manfred,

    Thank you for sending the additional details.

    Indeed, the logic for rendering all-day appointments in DayView/WeekView/TimelineDefinition is the following: if there is no AllDayArea, the appointments are shown according their Start/End times. As I explained in the previous post, TimelineViewDefinition does not provide AllDayArea, so I'd suggest that you use any of the other available ViewDefinitions. Alternatively, you could implement some additional logic inside AppointmentEdited/AppointmentCreated event for updating the Start/End of the appointment, if it is set as a all-day event.

    As to the missing times - you could easily customize the AppointmentTemplateSelector and add the additional information in the template for the not all-day appointment.

    I hope this will be helpful. If you have any additional questions, let us know.

    Regards,
    Yana
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  10. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 09 Jul 2014 in reply to Yana Link to this post

    Hi Yana,

    this sounds good!
    Just change Start / End on AllDay Appointments - and select a different Template for "AllDay" types.

    Thank you
    Manfred
  11. Rob
    Rob avatar
    16 posts
    Member since:
    May 2014

    Posted 10 Jul 2014 Link to this post

    Is it possible to change the template of the all day appointment in de alldayerea?
    I have changed it for the normal appointments with a selector. But the All day event is not getting this style. I Can't find the difference anywhere.
  12. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 11 Jul 2014 Link to this post

    Hi Rob,

    In the custom AppointmentTemplateSelector you could add two different templates and in the SelectTemplate method check whether the appointment is an allday event and return the corresponding template, here is some sample snippet:

    public override DataTemplate SelectTemplate(object item, DependencyObject container, Telerik.Windows.Controls.ViewDefinitionBase activeViewDefinition)
    {
        if ((item as Occurrence).Appointment.IsAllDayEvent == true)
            return this.AllDayAppointmentTemplate;
        else
            return this.DefaultAppointmentTemplate;
    }

    Hope this helps.

    Regards,
    Yana
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  13. Rob
    Rob avatar
    16 posts
    Member since:
    May 2014

    Posted 11 Jul 2014 in reply to Yana Link to this post

    Hi Yana,

    Thanks for your reaction. But when I use your code it will step over it. For today as example I made three appointments. 1 is starting two days back and is ending tomorrow, one is an alldayevent and one is just starting really early today and is normal.

    I attached a screenshot for how the view looks. The template for the alldayevents are totaly ignored. It looks like they need a different template.

    Any advice on how to make the styling the same and not ignored?
  14. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 14 Jul 2014 Link to this post

    Hello Rob,

    I have attached a simple example to demonstrate how AppointmentTemplateSelector works at our side.  Could you please download it and give it a try? What is different in your case?

    Regards,
    Yana
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  15. Rob
    Rob avatar
    16 posts
    Member since:
    May 2014

    Posted 05 Aug 2014 in reply to Yana Link to this post

    I can't run the example, some references are wrong. But I did the same in my project and it is working. But underneeth the color there is a gradient (see screenshot attached).
    It looks like it is a chromebutton where te color is overlay. I can't find the style to edit the button.

    xaml:
    <local:ScheduleAppointmentTemplateSelector.AllDayAppointmentTemplate>
      <DataTemplate>
        <StackPanel>
          <TextBlock Background="Blue" Text="{Binding Subject}" TextWrapping="Wrap" TextTrimming="WordEllipsis"/>
         </StackPanel>
      </DataTemplate>
    </local:ScheduleAppointmentTemplateSelector.AllDayAppointmentTemplate>

    Thanks for the help already.

  16. Rob
    Rob avatar
    16 posts
    Member since:
    May 2014

    Posted 05 Aug 2014 in reply to Yana Link to this post

    Found the last issue. It works and looks good now. Thanks for the help.
Back to Top
UI for WPF is Visual Studio 2017 Ready