Class
AppointmentDraggingBehavior

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

cs-api-definition
public class AppointmentDraggingBehavior : RadDragDropService, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IMessageListener

Inheritance: objectDisposableObjectRadObjectRadServiceRadDragDropServiceAppointmentDraggingBehavior

Implements: ICustomTypeDescriptorIDisposableIMessageListenerINotifyPropertyChanged

Inherited Members RadDragDropService.messageFilterAddedRadDragDropService.xOutlineFormOffsetRadDragDropService.yOutlineFormOffsetRadDragDropService.beginPointRadDragDropService.DisposeManagedResources()RadDragDropService.HandleLeftButtonUp()RadDragDropService.HandleEscKeyDown()RadDragDropService.PrepareContext()RadDragDropService.IsDropTargetValid(ISupportDrop)RadDragDropService.RestoreOriginalMouseCursor()RadDragDropService.SetHintWindowPosition(Point)RadDragDropService.ShouldBeginDrag(Point, Point)RadDragDropService.OnPreviewDragStart(PreviewDragStartEventArgs)RadDragDropService.PerformStart()RadDragDropService.Commit()RadDragDropService.GetDropTarget(Point, out Point)RadDragDropService.OnPreviewDropTarget(PreviewDropTargetEventArgs)RadDragDropService.BeginDrag(Point, ISupportDrag)RadDragDropService.EndDrag(Point, RadControl)RadDragDropService.EndDrag()RadDragDropService.DoMouseMove(Point)RadDragDropService.CanCommitRadDragDropService.ValidCursorRadDragDropService.InitializedRadDragDropService.InvalidCursorRadDragDropService.UseDefaultPreviewRadDragDropService.DropTargetRadDragDropService.DropLocationRadDragDropService.HintWindowRadDragDropService.PreviewDragDropRadDragDropService.PreviewDragOverRadDragDropService.PreviewDropTargetRadDragDropService.PreviewDragStartRadDragDropService.PreviewDragHintRadService.CanOperate()RadService.Start(object)RadService.Stop(bool)RadService.Pause()RadService.Resume()RadService.OnStarted()RadService.OnStarting(RadServiceStartingEventArgs)RadService.OnStopped()RadService.OnStopping(RadServiceStoppingEventArgs)RadService.IsContextValid(object)RadService.Abort()RadService.PerformResume()RadService.PerformPause()RadService.SetContext(object)RadService.OnEnabledChanged()RadService.ContextRadService.AvailableAtDesignTimeRadService.StateRadService.NameRadService.EnabledRadService.StartingRadService.StartedRadService.StoppingRadService.StoppedRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.GetValue(RadProperty)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.SetValueCore(RadPropertyValue, object, object, ValueSource)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.AddStylePropertySetting(IPropertySetting)RadObject.GetInheritedValue(RadProperty)RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.IsPropertyCancelable(RadPropertyMetadata)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.PerformDispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing

Constructors

AppointmentDraggingBehavior(RadScheduler)

Declaration

cs-api-definition
public AppointmentDraggingBehavior(RadScheduler scheduler)

Parameters

scheduler

RadScheduler

AppointmentDraggingBehavior(SchedulerVisualElement)

Declaration

cs-api-definition
public AppointmentDraggingBehavior(SchedulerVisualElement activeOwner)

Parameters

activeOwner

SchedulerVisualElement

Properties

ActiveFeedback

Gets the active feedback.

Declaration

cs-api-definition
public DragFeedbackElement ActiveFeedback { get; }

Property Value

DragFeedbackElement

ActiveOwner

Gets the behavior's active owner.

Declaration

cs-api-definition
public SchedulerVisualElement ActiveOwner { get; }

Property Value

SchedulerVisualElement

AutoScrollDayViewOnDrag

Gets or sets a value indicating whether the appointment areas in DayView should be automatically scrolled when dragging off their bounds.

Declaration

cs-api-definition
public bool AutoScrollDayViewOnDrag { get; set; }

Property Value

bool

DragNavigationInterval

Gets or sets the minimum time interval between automatic view navigations.

Declaration

cs-api-definition
public TimeSpan DragNavigationInterval { get; set; }

Property Value

TimeSpan

DragNavigationOffset

Gets or sets the offset from the bounds of the control in pixels after which the automatic view navigation will be triggered.

Declaration

cs-api-definition
public int DragNavigationOffset { get; set; }

Property Value

int

IsDragging

Indicates whether there is an active drag operation.

Declaration

cs-api-definition
public bool IsDragging { get; }

Property Value

bool

Scheduler

The RadScheduler that owns the behaviors.

Declaration

cs-api-definition
public RadScheduler Scheduler { get; }

Property Value

RadScheduler

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

cs-api-definition
public bool ShowCreateExceptionDialog { get; set; }

Property Value

bool

ShowOccurrenceValidationMessages

Gets or sets a value indicating whether a message box should be shown when an occurrence is dragged to an invalid location.

Declaration

cs-api-definition
public bool ShowOccurrenceValidationMessages { get; set; }

Property Value

bool

Methods

AddToOwnerCollection()

Adds the active feedback to the active owner.

Declaration

cs-api-definition
public virtual bool AddToOwnerCollection()

Returns

bool

BeginDrag(SchedulerVisualElement, AppointmentElement)

Request move operation.

Declaration

cs-api-definition
public bool BeginDrag(SchedulerVisualElement newOwner, AppointmentElement appointment)

Parameters

newOwner

SchedulerVisualElement

appointment

AppointmentElement

Returns

bool

CanStart(object)

Determines whether the service may be started. Validation is as follows:

  1. Check whether Enabled is true.
  2. Check the context through IsContextValid method. An exception is thrown if context is invalid.
  3. Checks the current state - it should be Initial or Stopped.

Declaration

cs-api-definition
protected override bool CanStart(object context)

Parameters

context

object

Returns

bool

Overrides RadDragDropService.CanStart(object)

CreateFeedback(RadScheduler, SchedulerView, AppointmentElement)

Creates a new appointment feedback of a given appointment.

Declaration

cs-api-definition
public virtual DragFeedbackElement CreateFeedback(RadScheduler scheduler, SchedulerView view, AppointmentElement appointment)

Parameters

scheduler

RadScheduler

view

SchedulerView

appointment

AppointmentElement

Returns

DragFeedbackElement

DoDragOver(Point)

Handles dragging the active feedback to a given point.

Declaration

cs-api-definition
public void DoDragOver(Point controlDropLocation)

Parameters

controlDropLocation

Point

The destination point in control coordinates.

Drop()

Handles the Drop operation.

Declaration

cs-api-definition
public virtual void Drop()

GetAllDayHeaderAtPoint(Point)

Gets a DayViewAllDayHeader at a specified location.

Declaration

cs-api-definition
protected DayViewAllDayHeader GetAllDayHeaderAtPoint(Point location)

Parameters

location

Point

The location in control coordinates.

Returns

DayViewAllDayHeader

The DayViewAllDayHeader at that location.

GetCellAtPoint(Point)

Gets a SchedulerCellElement at a specified location.

Declaration

cs-api-definition
protected SchedulerCellElement GetCellAtPoint(Point location)

Parameters

location

Point

The location in control coordinates.

Returns

SchedulerCellElement

The SchedulerCellElement at that location.

GetCellDate(SchedulerCellElement)

Gets the destination date for an appointment that was dropped on a given cell.

Declaration

cs-api-definition
protected virtual DateTime GetCellDate(SchedulerCellElement cell)

Parameters

cell

SchedulerCellElement

The SchedulerCellElement.

Returns

DateTime

The destination date.

GetDayViewTableAtPoint(Point)

Gets a DayViewAppointmentsTable at a specified location.

Declaration

cs-api-definition
protected DayViewAppointmentsTable GetDayViewTableAtPoint(Point location)

Parameters

location

Point

The location in control coordinates.

Returns

DayViewAppointmentsTable

The DayViewAppointmentsTable at that location.

GetFeedback(SchedulerVisualElement)

Gets a specific feedback.

Declaration

cs-api-definition
public DragFeedbackElement GetFeedback(SchedulerVisualElement feedbackOwnerElement)

Parameters

feedbackOwnerElement

SchedulerVisualElement

Returns

DragFeedbackElement

GetMonthViewAreaAtPoint(Point)

Gets a MonthViewAreaElement at a specified location.

Declaration

cs-api-definition
protected MonthViewAreaElement GetMonthViewAreaAtPoint(Point location)

Parameters

location

Point

The location in control coordinates.

Returns

MonthViewAreaElement

The MonthViewAreaElement at that location.

GetTimelinePresenterAtPoint(Point)

Gets a TimelineAppointmentsPresenter at a specified location.

Declaration

cs-api-definition
protected TimelineAppointmentsPresenter GetTimelinePresenterAtPoint(Point location)

Parameters

location

Point

The location in control coordinates.

Returns

TimelineAppointmentsPresenter

The TimelineAppointmentsPresenter at that location.

HandleMouseMove(Point)

Declaration

cs-api-definition
protected override void HandleMouseMove(Point mousePos)

Parameters

mousePos

Point

Overrides RadDragDropService.HandleMouseMove(Point)

HandleMouseMoveOutsideControlBounds(Point, Rectangle)

Declaration

cs-api-definition
protected virtual void HandleMouseMoveOutsideControlBounds(Point mousePos, Rectangle controlRect)

Parameters

mousePos

Point

controlRect

Rectangle

HideFeedbacks()

Hides the active feedbacks.

Declaration

cs-api-definition
protected virtual bool HideFeedbacks()

Returns

bool

[true] if successful, [false] otherwise

InitializeSettings(AppointmentElement)

Declaration

cs-api-definition
protected virtual void InitializeSettings(AppointmentElement appointment)

Parameters

appointment

AppointmentElement

IsElementOwner(SchedulerVisualElement)

Gets whether the element is found in the owners collection.

Declaration

cs-api-definition
public bool IsElementOwner(SchedulerVisualElement owner)

Parameters

owner

SchedulerVisualElement

Returns

bool

IsRealDrag(Point, Point)

Gets whether this is a valid drag operation.

Declaration

cs-api-definition
public virtual bool IsRealDrag(Point mouseOffsetPosition, Point mouseDownPosition)

Parameters

mouseOffsetPosition

Point

mouseDownPosition

Point

Returns

bool

Move(DateTime, SchedulerCellElement, SchedulerVisualElement)

Moves the feedback to a specific date in a specific resource.

Declaration

cs-api-definition
public virtual bool Move(DateTime newDate, SchedulerCellElement cell, SchedulerVisualElement newOwner)

Parameters

newDate

DateTime

The destination date.

cell

SchedulerCellElement

The destination cell.

newOwner

SchedulerVisualElement

The destination visual element.

Returns

bool

[true] if the move was performed, [false] otherwise

MoveFeedback(SchedulerVisualElement)

Moves the active feedback to a new owner.

Declaration

cs-api-definition
public virtual void MoveFeedback(SchedulerVisualElement newOwner)

Parameters

newOwner

SchedulerVisualElement

The new owner of the feedback.

OnAppointmentDropped(AppointmentMovedEventArgs)

Declaration

cs-api-definition
protected virtual void OnAppointmentDropped(AppointmentMovedEventArgs args)

Parameters

args

AppointmentMovedEventArgs

OnAppointmentDropping(AppointmentMovingEventArgs)

Declaration

cs-api-definition
protected virtual void OnAppointmentDropping(AppointmentMovingEventArgs args)

Parameters

args

AppointmentMovingEventArgs

OnAppointmentMoved()

Declaration

cs-api-definition
protected virtual void OnAppointmentMoved()

OnAppointmentMovingEventArgs(AppointmentMovingEventArgs)

Declaration

cs-api-definition
protected virtual void OnAppointmentMovingEventArgs(AppointmentMovingEventArgs args)

Parameters

args

AppointmentMovingEventArgs

OnFeedbackCreating(FeedbackCreatingEventArgs)

Declaration

cs-api-definition
protected virtual void OnFeedbackCreating(FeedbackCreatingEventArgs args)

Parameters

args

FeedbackCreatingEventArgs

OnInitializing(FeedbackInitializingEventArgs)

Declaration

cs-api-definition
protected virtual void OnInitializing(FeedbackInitializingEventArgs args)

Parameters

args

FeedbackInitializingEventArgs

OnPreviewDragDrop(RadDropEventArgs)

Declaration

cs-api-definition
protected override void OnPreviewDragDrop(RadDropEventArgs e)

Parameters

e

RadDropEventArgs

Overrides RadDragDropService.OnPreviewDragDrop(RadDropEventArgs)

OnPreviewDragHint(PreviewDragHintEventArgs)

Declaration

cs-api-definition
protected override void OnPreviewDragHint(PreviewDragHintEventArgs e)

Parameters

e

PreviewDragHintEventArgs

Overrides RadDragDropService.OnPreviewDragHint(PreviewDragHintEventArgs)

OnPreviewDragOver(RadDragOverEventArgs)

Declaration

cs-api-definition
protected override void OnPreviewDragOver(RadDragOverEventArgs e)

Parameters

e

RadDragOverEventArgs

Overrides RadDragDropService.OnPreviewDragOver(RadDragOverEventArgs)

PerformStop()

Stops the service. Performs the core logic.

Declaration

cs-api-definition
protected override void PerformStop()

Overrides RadDragDropService.PerformStop()

PrepareAppointment(IEvent)

Declaration

cs-api-definition
protected virtual IEvent PrepareAppointment(IEvent appointment)

Parameters

appointment

IEvent

Returns

IEvent

RemoveFeedback(SchedulerVisualElement)

Removes the visual feedback. Cancels the drag operation.

Declaration

cs-api-definition
public virtual bool RemoveFeedback(SchedulerVisualElement owner)

Parameters

owner

SchedulerVisualElement

Returns

bool

ResetAppointmentVisibility(IEvent)

Declaration

cs-api-definition
protected void ResetAppointmentVisibility(IEvent appointment)

Parameters

appointment

IEvent

ResetCellsHoverState()

Declaration

cs-api-definition
protected virtual void ResetCellsHoverState()

SetAppointmentVisibility(IEvent, ElementVisibility)

Declaration

cs-api-definition
protected void SetAppointmentVisibility(IEvent appointment, ElementVisibility visibility)

Parameters

appointment

IEvent

visibility

ElementVisibility

ValidateOccurrenceDropTarget(DateTime, DateTime, bool)

Declaration

cs-api-definition
protected virtual bool ValidateOccurrenceDropTarget(DateTime targetStartDate, DateTime targetEndDate, bool allDay)

Parameters

targetStartDate

DateTime

targetEndDate

DateTime

allDay

bool

Returns

bool

Events

AppointmentDropped

Occurs when drag drop has finished.

Declaration

cs-api-definition
public event EventHandler<AppointmentMovedEventArgs> AppointmentDropped

Event Value

EventHandler<AppointmentMovedEventArgs>

AppointmentDropping

Occurs when drag drop is finishing.

Declaration

cs-api-definition
public event EventHandler<AppointmentMovingEventArgs> AppointmentDropping

Event Value

EventHandler<AppointmentMovingEventArgs>

AppointmentMoved

Occurs when an appointment is moved.

Declaration

cs-api-definition
public event EventHandler AppointmentMoved

Event Value

EventHandler

AppointmentMoving

Occurs when an appointment is moving.

Declaration

cs-api-definition
public event EventHandler<AppointmentMovingEventArgs> AppointmentMoving

Event Value

EventHandler<AppointmentMovingEventArgs>

FeedbackCreating

Occurs when the feedback is creating.

Declaration

cs-api-definition
public event EventHandler<FeedbackCreatingEventArgs> FeedbackCreating

Event Value

EventHandler<FeedbackCreatingEventArgs>

FeedbackInitialized

Occurs when the feedback is initialized.

Declaration

cs-api-definition
public event EventHandler<FeedbackInitializingEventArgs> FeedbackInitialized

Event Value

EventHandler<FeedbackInitializingEventArgs>

In this article
DefinitionConstructorsAppointmentDraggingBehavior(RadScheduler)AppointmentDraggingBehavior(SchedulerVisualElement)PropertiesActiveFeedbackActiveOwnerAutoScrollDayViewOnDragDragNavigationIntervalDragNavigationOffsetIsDraggingSchedulerShowCreateExceptionDialogShowOccurrenceValidationMessagesMethodsAddToOwnerCollection()BeginDrag(SchedulerVisualElement, AppointmentElement)CanStart(object)CreateFeedback(RadScheduler, SchedulerView, AppointmentElement)DoDragOver(Point)Drop()GetAllDayHeaderAtPoint(Point)GetCellAtPoint(Point)GetCellDate(SchedulerCellElement)GetDayViewTableAtPoint(Point)GetFeedback(SchedulerVisualElement)GetMonthViewAreaAtPoint(Point)GetTimelinePresenterAtPoint(Point)HandleMouseMove(Point)HandleMouseMoveOutsideControlBounds(Point, Rectangle)HideFeedbacks()InitializeSettings(AppointmentElement)IsElementOwner(SchedulerVisualElement)IsRealDrag(Point, Point)Move(DateTime, SchedulerCellElement, SchedulerVisualElement)MoveFeedback(SchedulerVisualElement)OnAppointmentDropped(AppointmentMovedEventArgs)OnAppointmentDropping(AppointmentMovingEventArgs)OnAppointmentMoved()OnAppointmentMovingEventArgs(AppointmentMovingEventArgs)OnFeedbackCreating(FeedbackCreatingEventArgs)OnInitializing(FeedbackInitializingEventArgs)OnPreviewDragDrop(RadDropEventArgs)OnPreviewDragHint(PreviewDragHintEventArgs)OnPreviewDragOver(RadDragOverEventArgs)PerformStop()PrepareAppointment(IEvent)RemoveFeedback(SchedulerVisualElement)ResetAppointmentVisibility(IEvent)ResetCellsHoverState()SetAppointmentVisibility(IEvent, ElementVisibility)ValidateOccurrenceDropTarget(DateTime, DateTime, bool)EventsAppointmentDroppedAppointmentDroppingAppointmentMovedAppointmentMovingFeedbackCreatingFeedbackInitialized
Not finding the help you need?
Contact Support