Resize behavior cursor

6 posts, 0 answers
  1. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 28 Apr 2014 Link to this post

    Hi,

    I would like to know if it's possible to change the cursor in the resize process when we try to resize an appointment over a slot that I don't want to permit. A cursor like we have when we block the drop operation.

    Also, I would like to know if it's possible to resize of an readonly slot depending on a specific scenario?

    Thank's
    Alain
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 29 Apr 2014 Link to this post

    Hi,

    Yes,you can implement custom ScheduleViewDragDropBehavior class as it is shown here  and here to change the logic for drag and resize.

    By overriding  the CanResize method you can  forbid the resize over slots(return false) and the cursor will be changed.


    Regards,
    Rosi
    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. Christie Admin
    Christie Admin avatar
    239 posts
    Member since:
    Aug 2013

    Posted 29 Apr 2014 in reply to Rosi Link to this post

    Hi Rosi,

    by returning false, the cursor remain a resize cursor but of course, the appointment does not resize but the cursor still a resize cursor. Here is the logic I implemented. To try what you told me, I replace all my logic by the following line "return false;" but the problem remain the same.

            public override bool CanResize(DragDropState state)
            {
                bool canResize = true;

                if (this.OnCanResize != null)
                {
                    
                    ScheduleViewByWeekCanResizeArgs args = new ScheduleViewByWeekCanResizeArgs();

                    args.CanResizeAgendaSpot.SourceMeetingId = (Guid)(state.Appointment as AppointmentSpot).MeetingId;
                    args.CanResizeAgendaSpot.DestinationSpotStart = state.Appointment.Start;
                    args.CanResizeAgendaSpot.DestinationSpotEnd = state.Appointment.End;

                    this.OnCanResize(this, args);

                    canResize = args.CanResizeAgendaSpot.IsCompatible;
                }

                if (canResize)
                {
                    return base.CanResize(state);
                }
                else
                {
                    return false;
                }
            }

    Thank's
    Alain
  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 29 Apr 2014 Link to this post

    Hi,

    I am sorry that I mislead you. What I suggested you will be true for drag operations only(if you override the CanDrop method instead CanResize). For resizing the "resize" cursor is hardcoded in RadScheduleView's code and cannot be overriden. I suggest you add this feature request to our Feedback portal. and once again apologize for the misunderstanding.

    Regards,
    Rosi
    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.
     
  6. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 29 Jan 2015 in reply to Rosi Link to this post

    Was this feature ever implemented?  I overrode the CanStartResize method in ScheduleViewDragDropBehavior to disable resizing of appointments, which works fine.  However the resize cursor still appears when you hover near the edge of an appointment, which is is misleading and confusing to the user.  Is there a way to omit this cursor change yet?
  7. Scott
    Scott avatar
    38 posts
    Member since:
    Sep 2012

    Posted 29 Jan 2015 in reply to Scott Link to this post

    Please disregard this question.  I found the answer in this post:
    http://www.telerik.com/forums/clumsy-grabbing-of-thin-appointments-due-to-resize-arrow-on-hover-d94a6121bf8d
Back to Top
UI for WPF is Visual Studio 2017 Ready