バージョン

InitialOwner プロパティ (AppointmentsDragDropEventArgs)

ドラッグ操作が開始された時に appointment(s)Owner を返します。
シンタックス
'宣言
 
Public ReadOnly Property InitialOwner As Owner
public Owner InitialOwner {get;}
使用例
Imports System.Collections.Generic
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

    AddHandler Me.dayView.AppointmentsDragDrop, AddressOf OnAppointmentsDragDrop

    Private Sub OnAppointmentsDragDrop(ByVal sender As Object, ByVal e As AppointmentsDragDropEventArgs)

        If Not (e.NewOwner Is e.InitialOwner) Then

            Dim scheduleControl As UltraScheduleControlBase = sender
            Dim changeHistory As List(Of AppointmentOwnershipChangeHistoryItem) = scheduleControl.Tag
            If changeHistory Is Nothing Then
                changeHistory = New List(Of AppointmentOwnershipChangeHistoryItem)
            End If

            changeHistory.Add(New AppointmentOwnershipChangeHistoryItem(DateTime.Now, e.InitialOwner, e.NewOwner, e.Appointments, e.HasCopies))
            scheduleControl.Tag = changeHistory

        End If

    End Sub

    Public Structure AppointmentOwnershipChangeHistoryItem

        Public timeStamp As DateTime
        Public copied As Boolean
        Public initialOwner As Owner
        Public newOwner As Owner
        Public appointments As ReadOnlyAppointmentsCollection

        Public Sub New(ByVal timeStamp As DateTime, ByVal initialOwner As Owner, ByVal newOwner As Owner, ByVal appointments As ReadOnlyAppointmentsCollection, ByVal copied As Boolean)
            Me.timeStamp = timeStamp
            Me.initialOwner = initialOwner
            Me.newOwner = newOwner
            Me.appointments = appointments
            Me.copied = copied
        End Sub
    End Structure
using System.Collections.Generic;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

    this.dayView.AppointmentsDragDrop += new AppointmentsDragDropHandler(OnAppointmentsDragDrop);

    private void OnAppointmentsDragDrop(object sender, AppointmentsDragDropEventArgs e)
    {
        if ( e.NewOwner != e.InitialOwner )
        {
            UltraScheduleControlBase scheduleControl = sender as UltraScheduleControlBase;
            List<AppointmentOwnershipChangeHistoryItem> changeHistory = scheduleControl.Tag as List<AppointmentOwnershipChangeHistoryItem>;
            if ( changeHistory == null )
                changeHistory = new List<AppointmentOwnershipChangeHistoryItem>();

            changeHistory.Add( new AppointmentOwnershipChangeHistoryItem( DateTime.Now, e.InitialOwner, e.NewOwner, e.Appointments, e.HasCopies ) );

            scheduleControl.Tag = changeHistory;
        }
    }

    public struct AppointmentOwnershipChangeHistoryItem
    {
        public DateTime timeStamp;
        public bool copied;
        public Owner initialOwner;
        public Owner newOwner;
        public ReadOnlyAppointmentsCollection appointments;

        public AppointmentOwnershipChangeHistoryItem( DateTime timeStamp, Owner initialOwner, Owner newOwner, ReadOnlyAppointmentsCollection appointments, bool copied )
        {
            this.timeStamp = timeStamp;
            this.initialOwner = initialOwner;
            this.newOwner = newOwner;
            this.appointments = appointments;
            this.copied = copied;
        }
    }
参照