Version

AppointmentDragMode Property

Returns or sets a value indicating whether AppointmentUIElements can be dragged by the user, and whether they can be dragged to a different Owner.
Syntax
'Declaration
 
Public Property AppointmentDragMode As TimelineViewAppointmentDragMode
public TimelineViewAppointmentDragMode AppointmentDragMode {get; set;}
Remarks

By default, appointments can be dragged from one owner to another. To allow dragging of appointments within the same owner, set the AppointmentDragMode property to 'WithinSameOwner'; to disallow appointment dragging altogether, set it to 'NotAllowed'.

Whether an appointment can be dragged to a particular owner can also be controlled by handling the AppointmentsDragging event and setting the value of the event arguments' AllowOwnerChange property accordingly. At the time the event is fired, the value of this property reflects the resolved value of the AppointmentDragMode property, but this can be changed by a listener of the event and in that case, overrides the value of AppointmentDragMode.

Note: An appointment on which the Locked property is set to true cannot be resized, dragged, or edited.

Example
The following code sample demonstrates how to use the properties of the UltraTimelineView control to customize the appearance and behavior for appointments and holidays:

Imports System.Collections.Generic
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

    Public Sub InitActivityProps(ByVal control As UltraTimelineView)

        '  Align activities with the PrimaryInterval, so that the
        '  edges of the elements are flush with the time slot borders
        control.AlignActivityWithPrimaryInterval = DefaultableBoolean.True

        '  Set the height of the bar color indicator, and show it
        control.AppointmentDisplaySettings.BarColorIndicatorHeight = 5
        control.AppointmentDisplaySettings.BarColorIndicatorVisibility = TimelineViewBarColorIndicatorVisibility.ShowOnTop

        '  Show continuation arrows for appointments whose start/end time is not visible
        control.AppointmentDisplaySettings.DateTimeContinuationIndicatorVisibility = TimelineViewDateTimeContinuationIndicatorVisibility.Both

        '  Don't display the resolved appointment appearance image to conserve space
        control.AppointmentDisplaySettings.DisplayAppearanceImage = DefaultableBoolean.False

        '  Display the appointment subject, but not the location
        control.AppointmentDisplaySettings.DisplayLocation = DefaultableBoolean.False
        control.AppointmentDisplaySettings.DisplaySubject = DefaultableBoolean.True

        '  Display the recurrence and reminder indicators on the left
        control.AppointmentDisplaySettings.RecurrenceIndicatorVisibility = TimelineViewRecurrenceIndicatorVisibility.Right
        control.AppointmentDisplaySettings.ReminderIndicatorVisibility = TimelineViewReminderIndicatorVisibility.Left

        '  Display the start and end times, each on either side of the subject
        control.AppointmentDisplaySettings.TimeVisibility = TimelineViewAppointmentTimeVisibility.BothSeparate

        '  Only allow dragging appointments within the same owner
        control.AppointmentDragMode = TimelineViewAppointmentDragMode.WithinSameOwner

        '  Always show appointment tooltips
        control.AppointmentToolTipVisibility = TimelineViewActivityToolTipVisibility.Always

        '  Hide all-day events from the timeline view
        control.AppointmentVisibility = TimelineViewAppointmentVisibility.HideAllDayEvents

        '  Enable automatic creation of appointments when enter key
        '  is pressed on a time slot, and when a time slot is double-clicked
        control.AutoAppointmentCreate = True
        control.AutoAppointmentDialog = True

        '  Only show holidays for the unassigned owner, and never show tooltips for them
        control.HolidayVisibility = TimelineViewHolidayVisibility.ShowForUnassignedOwner
        control.HolidayToolTipVisibility = TimelineViewActivityToolTipVisibility.Never

        '  Only show activities whose duration is at least one hour
        '  allow appointment resizing, but only to a duration of
        '  no less than two hours
        control.AllowAppointmentResize = True
        control.MinimumActivityDuration = TimeSpan.FromHours(1)
        control.MinimumAppointmentResizeDuration = TimeSpan.FromHours(2)
    End Sub
using System.Collections.Generic;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

    public void InitActivityProps( UltraTimelineView control )
    {
        //  Align activities with the PrimaryInterval, so that the
        //  edges of the elements are flush with the time slot borders
        control.AlignActivityWithPrimaryInterval = DefaultableBoolean.True;

        //  Set the height of the bar color indicator, and show it
        control.AppointmentDisplaySettings.BarColorIndicatorHeight = 5;
        control.AppointmentDisplaySettings.BarColorIndicatorVisibility = TimelineViewBarColorIndicatorVisibility.ShowOnTop;

        //  Show continuation arrows for appointments whose start/end time is not visible
        control.AppointmentDisplaySettings.DateTimeContinuationIndicatorVisibility = TimelineViewDateTimeContinuationIndicatorVisibility.Both;

        //  Don't display the resolved appointment appearance image to conserve space
        control.AppointmentDisplaySettings.DisplayAppearanceImage = DefaultableBoolean.False;

        //  Display the appointment subject, but not the location
        control.AppointmentDisplaySettings.DisplayLocation = DefaultableBoolean.False;
        control.AppointmentDisplaySettings.DisplaySubject = DefaultableBoolean.True;
        
        //  Display the recurrence and reminder indicators on the left
        control.AppointmentDisplaySettings.RecurrenceIndicatorVisibility = TimelineViewRecurrenceIndicatorVisibility.Right;
        control.AppointmentDisplaySettings.ReminderIndicatorVisibility = TimelineViewReminderIndicatorVisibility.Left;

        //  Display the start and end times, each on either side of the subject
        control.AppointmentDisplaySettings.TimeVisibility = TimelineViewAppointmentTimeVisibility.BothSeparate;

        //  Only allow dragging appointments within the same owner
        control.AppointmentDragMode = TimelineViewAppointmentDragMode.WithinSameOwner;

        //  Always show appointment tooltips
        control.AppointmentToolTipVisibility = TimelineViewActivityToolTipVisibility.Always;

        //  Hide all-day events from the timeline view
        control.AppointmentVisibility = TimelineViewAppointmentVisibility.HideAllDayEvents;

        //  Enable automatic creation of appointments when enter key
        //  is pressed on a time slot, and when a time slot is double-clicked
        control.AutoAppointmentCreate = true;
        control.AutoAppointmentDialog = true;

        //  Only show holidays for the unassigned owner, and never show tooltips for them
        control.HolidayVisibility = TimelineViewHolidayVisibility.ShowForUnassignedOwner;
        control.HolidayToolTipVisibility = TimelineViewActivityToolTipVisibility.Never;

        //  Only show activities whose duration is at least one hour;
        //  allow appointment resizing, but only to a duration of
        //  no less than two hours
        control.AllowAppointmentResize = true;
        control.MinimumActivityDuration = TimeSpan.FromHours(1);
        control.MinimumAppointmentResizeDuration = TimeSpan.FromHours(2);
    }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also