Clumsy grabbing of thin appointments due to resize arrow on hover

8 posts, 1 answers
  1. Jiri
    Jiri avatar
    40 posts
    Member since:
    Oct 2013

    Posted 25 Feb 2014 Link to this post

    Hi,

    I have problem with very thin Appointments in my timeline ScheduleView. There is problem with grabbing them to perform drag and drop. It is caused by offering a resize arrow cursor when hover on that thin appointmens. How to resolve it please?

    I have already set CanStartResize and CanResize to return false in my custom ScheduleViewDragDropBehavior, but it has not helped.

    Thank you in advanced,

    Jiri
  2. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 26 Feb 2014 Link to this post

    Hi Jiri,

    What you can in this case would be to set the EnableSmallAppointmentRendering property of the used ViewDefinition to true. This way appointments smaller than the MinorTickLength will be visibly rounded to the MinorTickLength and you will be able to easily drag drop and resize them.

    Hope this will work for you.

    Regards,
    Kalin
    Telerik
  3. DevCraft banner
  4. Jiri
    Jiri avatar
    40 posts
    Member since:
    Oct 2013

    Posted 26 Feb 2014 in reply to Kalin Link to this post

    Hi Kalin,

    I don't see this property in the TimelineViewDefinition, which I use, it seems it is available only in the DayViewDefinition as I tried to find.
    Wouldn't it be possible to somehow disable that double arrow cursor ? - I don't need the resizing at all.

    Regards,
    Jiri
  5. Jiri
    Jiri avatar
    40 posts
    Member since:
    Oct 2013

    Posted 28 Feb 2014 in reply to Jiri Link to this post

    Hi,

    Any progress with this? Unfortunately it is crucial for our customer...

    Regards,
    Jiri
  6. Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 28 Feb 2014 Link to this post

    Hello Jiri,

    Currently the TimelineViewDefinition doesn't support the EnableSmallAppointmentRendering property. However we have this logged as a feature request in our Feedback portal - you can vote and track the item on the following link:
    http://feedback.telerik.com/Project/143/Feedback/Details/113768-add-option-to-enlarge-really-small-appointments-for-the-timelineviewdefinition-in

    What I can suggest you now is to either use DayViewDefinition with 30 visible days for example and the property set or you can prevent the resizing of the small appointments by overriding the CanStartResize method in the custom ScheduleViewDragDropBehavior. Inside of it you can check the duration of the Appointment and return false if it is too small:

    public override bool CanStartResize(DragDropState state)
    {
        var appDuration = state.Appointment.Duration();
        if (appDuration <= new TimeSpan(2, 0, 0))
        {
            return false;
        }
     
        return base.CanResize(state);
    }

    Hope this helps.

    Regards,
    Kalin
    Telerik
  7. Jiri
    Jiri avatar
    40 posts
    Member since:
    Oct 2013

    Posted 28 Feb 2014 in reply to Kalin Link to this post

    Hi Kalin,

    I cannot use anything else than TimelineViewDefinition.
    As I said above CanStartResize already always return false, because I don't need resizing at all, however double arrow cursosr is still offered. So wouldn't it be possible to somehow disable that offering of the resiszing cursor? I think it would solve my problem.

    Regards,
    Tomas
  8. Answer
    Kalin
    Admin
    Kalin avatar
    1208 posts

    Posted 05 Mar 2014 Link to this post

    Hello Jiri,

    The only solution I can provide for this case would to be to extract and modify the Horizontal and Vertical AppointmentItem ControlTemplates. Afterwards you will need to find the borders named
    PART_StartResizeGrip and PART_EndResizeGrip and to modify their Cursor property to be Arrow. I have prepared and attached a sample project which demonstrates the exact approach (note that the project uses Implicit Styles). You can also check the Appointment Style article from our online help documentation.

    Hope this helps.

    Regards,
    Kalin
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

  9. Jiri
    Jiri avatar
    40 posts
    Member since:
    Oct 2013

    Posted 10 Mar 2014 in reply to Kalin Link to this post

    Hi Kalin,

    Great, this works as desired, our customer can now be finally satisfied.

    Sorry for the delay with my reply, I didnt notice your solution earlier.

    Cheers,
    Jiri
Back to Top
DevCraft banner