MinAppointmentHeight for different appointments

6 posts, 0 answers
  1. Eloy
    Eloy avatar
    3 posts
    Member since:
    Jul 2012

    Posted 27 Aug 2012 Link to this post

    Hello!

    How could I have two MinAppointmentHeight in the same ScheduleView? In other words, how could I have appointments with different heights?

    This is how it should look like:
    http://oi47.tinypic.com/2vmtxlv.jpg 

    Thank you,

    Eloy.


  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 30 Aug 2012 Link to this post

    Hello Eloy,

    In order to make multiple appointments with different heights you will need to create a custom AppointmentStyleSelector that inherits OrientedAppointmentItemStyleSelector and than create different Styles for each of the different appointments you want to have. You can find an example how to achieve this in our online demos.

    Note that you will need to set the MinAppointmentHeight property of RadScheduleView to a value greater than the greatest height of your custom appointment styles.

    The next code snippet represents a sample custom appointment style:

    <Style x:Key="height200Style" TargetType="scheduleView:AppointmentItem"
            BasedOn="{StaticResource AppointmentItemVerticalStyleBase}">
        <Setter Property="Height" Value="200"/>
        <Setter Property="Margin" Value="8 -200 8 2"/>
    </Style>


    Kind regards,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Michael
    Michael avatar
    3 posts
    Member since:
    Jun 2012

    Posted 30 Aug 2012 Link to this post

    Thank you Vladi, now I have appointments with different heights :)

    Appointments Type 1: Height = 20
    Appointments Type 2: Height = 40

    But when set the MinAppointmentHeight property on RadScheduleView to the minimum appointment height, appointments of type 2 appear with height 20.

    And when I set the property MinAppointmentHeight to 40 the slots are divided into equal parts of height 40 so that appears an empty space in them:
    http://i46.tinypic.com/ekgh9t.png 

    How could I solve it to get this?
    http://i49.tinypic.com/14pipt.png 


    Eloy.

  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 30 Aug 2012 Link to this post

    Hi Eloy,

    The empty space that is being shown when you declare the MinAppointmentHeight is caused by the way  appointments are being rendered in the control. The value from the MinAppointmentHeight is reserved for the appointment rather than the lower value from the custom style.

    I am afraid that this exact scenario you are trying to implement cannot be achieved with the current version of RadScheduleView.

    Sorry for any inconvenience that this may be causing.

    Greetings,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Daniel
    Daniel avatar
    3 posts
    Member since:
    Dec 2014

    Posted 24 Dec 2014 Link to this post

    Hi,

    I'm dealing with this problem too. Any change we can get different resource group header heights with different appointments height with no empty spaces in a Timeline view with the current version ?
  7. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 29 Dec 2014 Link to this post

    Hello Daniel,

    With the current version of Telerik controls there isn't any build in functionality that allows different heights to be set for each GroupHeader of RadScheduleView. Also, you could not set different heights for the appointments for the TimelineViewDefinition. That functionality is only available for the MonthViewDefinition and it was presented with Q2 2014 release version of the controls. You could find more information about it on the following link:
    http://docs.telerik.com/devtools/wpf/controls/radscheduleview/howto/set-custom-appointment-height

    Hopes the provide information will help you.

    Regards,
    Nasko
    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