ClassAppointmentDraggingBehavior
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class AppointmentDraggingBehavior : RadDragDropService, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IMessageListener
Inheritance: objectDisposableObjectRadObjectRadServiceRadDragDropServiceAppointmentDraggingBehavior
Implements:
Inherited Members
Constructors
AppointmentDraggingBehavior(RadScheduler)
Declaration
public AppointmentDraggingBehavior(RadScheduler scheduler)
Parameters
scheduler
AppointmentDraggingBehavior(SchedulerVisualElement)
Declaration
public AppointmentDraggingBehavior(SchedulerVisualElement activeOwner)
Parameters
activeOwner
Properties
ActiveFeedback
Gets the active feedback.
Declaration
public DragFeedbackElement ActiveFeedback { get; }
Property Value
ActiveOwner
Gets the behavior's active owner.
Declaration
public SchedulerVisualElement ActiveOwner { get; }
Property Value
AutoScrollDayViewOnDrag
Gets or sets a value indicating whether the appointment areas in DayView should be automatically scrolled when dragging off their bounds.
DragNavigationInterval
Gets or sets the minimum time interval between automatic view navigations.
Declaration
public TimeSpan DragNavigationInterval { get; set; }
Property Value
DragNavigationOffset
Gets or sets the offset from the bounds of the control in pixels after which the automatic view navigation will be triggered.
IsDragging
Indicates whether there is an active drag operation.
Scheduler
The RadScheduler that owns the behaviors.
ShowCreateExceptionDialog
Gets or sets a value indicating whether a prompt dialog box should be shown when the user is about to create occurrence exception via drag and drop.
Declaration
public bool ShowCreateExceptionDialog { get; set; }
Property Value
ShowOccurrenceValidationMessages
Gets or sets a value indicating whether a message box should be shown when an occurrence is dragged to an invalid location.
Declaration
public bool ShowOccurrenceValidationMessages { get; set; }
Property Value
Methods
AddToOwnerCollection()
Adds the active feedback to the active owner.
BeginDrag(SchedulerVisualElement, AppointmentElement)
Request move operation.
Declaration
public bool BeginDrag(SchedulerVisualElement newOwner, AppointmentElement appointment)
Parameters
newOwner
appointment
Returns
CanStart(object)
Determines whether the service may be started. Validation is as follows:
- Check whether Enabled is true.
- Check the context through IsContextValid method. An exception is thrown if context is invalid.
- Checks the current state - it should be Initial or Stopped.
CreateFeedback(RadScheduler, SchedulerView, AppointmentElement)
Creates a new appointment feedback of a given appointment.
Declaration
public virtual DragFeedbackElement CreateFeedback(RadScheduler scheduler, SchedulerView view, AppointmentElement appointment)
Parameters
scheduler
view
appointment
Returns
DoDragOver(Point)
Handles dragging the active feedback to a given point.
Declaration
public void DoDragOver(Point controlDropLocation)
Parameters
controlDropLocation
The destination point in control coordinates.
GetAllDayHeaderAtPoint(Point)
Gets a DayViewAllDayHeader at a specified location.
Declaration
protected DayViewAllDayHeader GetAllDayHeaderAtPoint(Point location)
Parameters
location
The location in control coordinates.
Returns
The DayViewAllDayHeader at that location.
GetCellAtPoint(Point)
Gets a SchedulerCellElement at a specified location.
Declaration
protected SchedulerCellElement GetCellAtPoint(Point location)
Parameters
location
The location in control coordinates.
Returns
The SchedulerCellElement at that location.
GetCellDate(SchedulerCellElement)
Gets the destination date for an appointment that was dropped on a given cell.
Declaration
protected virtual DateTime GetCellDate(SchedulerCellElement cell)
Parameters
cell
The SchedulerCellElement.
Returns
The destination date.
GetDayViewTableAtPoint(Point)
Gets a DayViewAppointmentsTable at a specified location.
Declaration
protected DayViewAppointmentsTable GetDayViewTableAtPoint(Point location)
Parameters
location
The location in control coordinates.
Returns
The DayViewAppointmentsTable at that location.
GetFeedback(SchedulerVisualElement)
Gets a specific feedback.
Declaration
public DragFeedbackElement GetFeedback(SchedulerVisualElement feedbackOwnerElement)
Parameters
feedbackOwnerElement
Returns
GetMonthViewAreaAtPoint(Point)
Gets a MonthViewAreaElement at a specified location.
Declaration
protected MonthViewAreaElement GetMonthViewAreaAtPoint(Point location)
Parameters
location
The location in control coordinates.
Returns
The MonthViewAreaElement at that location.
GetTimelinePresenterAtPoint(Point)
Gets a TimelineAppointmentsPresenter at a specified location.
Declaration
protected TimelineAppointmentsPresenter GetTimelinePresenterAtPoint(Point location)
Parameters
location
The location in control coordinates.
Returns
The TimelineAppointmentsPresenter at that location.
HandleMouseMove(Point)
Declaration
protected override void HandleMouseMove(Point mousePos)
Parameters
mousePos
Overrides
HideFeedbacks()
Hides the active feedbacks.
Declaration
protected virtual bool HideFeedbacks()
Returns
[true] if successful, [false] otherwise
InitializeSettings(AppointmentElement)
Declaration
protected virtual void InitializeSettings(AppointmentElement appointment)
Parameters
appointment
IsElementOwner(SchedulerVisualElement)
Gets whether the element is found in the owners collection.
Declaration
public bool IsElementOwner(SchedulerVisualElement owner)
Parameters
owner
Returns
IsRealDrag(Point, Point)
Gets whether this is a valid drag operation.
Move(DateTime, SchedulerCellElement, SchedulerVisualElement)
Moves the feedback to a specific date in a specific resource.
Declaration
public virtual bool Move(DateTime newDate, SchedulerCellElement cell, SchedulerVisualElement newOwner)
Parameters
newDate
The destination date.
cell
The destination cell.
newOwner
The destination visual element.
Returns
[true] if the move was performed, [false] otherwise
MoveFeedback(SchedulerVisualElement)
Moves the active feedback to a new owner.
Declaration
public virtual void MoveFeedback(SchedulerVisualElement newOwner)
Parameters
newOwner
The new owner of the feedback.
OnAppointmentDropped(AppointmentMovedEventArgs)
Declaration
protected virtual void OnAppointmentDropped(AppointmentMovedEventArgs args)
Parameters
args
OnAppointmentDropping(AppointmentMovingEventArgs)
Declaration
protected virtual void OnAppointmentDropping(AppointmentMovingEventArgs args)
Parameters
args
OnAppointmentMoved()
Declaration
protected virtual void OnAppointmentMoved()
OnAppointmentMovingEventArgs(AppointmentMovingEventArgs)
Declaration
protected virtual void OnAppointmentMovingEventArgs(AppointmentMovingEventArgs args)
Parameters
args
OnFeedbackCreating(FeedbackCreatingEventArgs)
Declaration
protected virtual void OnFeedbackCreating(FeedbackCreatingEventArgs args)
Parameters
args
OnInitializing(FeedbackInitializingEventArgs)
Declaration
protected virtual void OnInitializing(FeedbackInitializingEventArgs args)
Parameters
args
OnPreviewDragDrop(RadDropEventArgs)
Declaration
protected override void OnPreviewDragDrop(RadDropEventArgs e)
Parameters
e
Overrides
OnPreviewDragHint(PreviewDragHintEventArgs)
Declaration
protected override void OnPreviewDragHint(PreviewDragHintEventArgs e)
Parameters
e
Overrides
OnPreviewDragOver(RadDragOverEventArgs)
Declaration
protected override void OnPreviewDragOver(RadDragOverEventArgs e)
Parameters
e
Overrides
PerformStop()
Stops the service. Performs the core logic.
Declaration
protected override void PerformStop()
Overrides
RemoveFeedback(SchedulerVisualElement)
Removes the visual feedback. Cancels the drag operation.
Declaration
public virtual bool RemoveFeedback(SchedulerVisualElement owner)
Parameters
owner
Returns
ResetAppointmentVisibility(IEvent)
Declaration
protected void ResetAppointmentVisibility(IEvent appointment)
Parameters
appointment
ResetCellsHoverState()
Declaration
protected virtual void ResetCellsHoverState()
SetAppointmentVisibility(IEvent, ElementVisibility)
Declaration
protected void SetAppointmentVisibility(IEvent appointment, ElementVisibility visibility)
Parameters
appointment
visibility
Events
AppointmentDropped
Occurs when drag drop has finished.
Declaration
public event EventHandler<AppointmentMovedEventArgs> AppointmentDropped
Event Value
AppointmentDropping
Occurs when drag drop is finishing.
Declaration
public event EventHandler<AppointmentMovingEventArgs> AppointmentDropping
Event Value
AppointmentMoved
Occurs when an appointment is moved.
AppointmentMoving
Occurs when an appointment is moving.
Declaration
public event EventHandler<AppointmentMovingEventArgs> AppointmentMoving
Event Value
FeedbackCreating
Occurs when the feedback is creating.
Declaration
public event EventHandler<FeedbackCreatingEventArgs> FeedbackCreating
Event Value
FeedbackInitialized
Occurs when the feedback is initialized.
Declaration
public event EventHandler<FeedbackInitializingEventArgs> FeedbackInitialized
Event Value