バージョン

BeforeActiveOwnerChanged イベント (UltraDayView)

アクティブオーナーが変更される前に発生するイベント。
シンタックス
'宣言
 
Public Event BeforeActiveOwnerChanged As BeforeActiveOwnerChangedEventHandler
public event BeforeActiveOwnerChangedEventHandler BeforeActiveOwnerChanged
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、BeforeActiveOwnerChangedEventArgs 型の引数を受け取りました。次の BeforeActiveOwnerChangedEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
Cancel System.ComponentModel.CancelEventArgsから継承されます。 
ClearSelectedActivities SelectedAppointmentsSelectedHolidays および SelectedNotes (UltraMonthViewSingleBase 派生のコントロールに限る) コレクションをクリアする必要があるかどうかを取得または設定します。
NewActiveOwner 新しいアクティブオーナーを返します。
解説

このイベントは、ActiveOwner が変更される前に発生します。

イベント引数 Cancel パラメーターを True に設定することによって、操作はこのイベント内からキャンセルできます。

使用例
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

    Private Sub UltraDayView1_BeforeActiveOwnerChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeActiveOwnerChangedEventArgs) Handles UltraDayView1.BeforeActiveOwnerChanged

        '	If the new ActiveOwner is the unassigned owner, cancel
        '	 the event to disallow the unassigned owner from becoming
        '	activated.
        If e.NewActiveOwner.IsUnassigned Then
            e.Cancel = True
        End If

    End Sub

    Private Sub UltraWeekView1_BeforeActiveOwnerChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeActiveOwnerChangedEventArgs) Handles UltraWeekView1.BeforeActiveOwnerChanged

        '	If the new ActiveOwner is the unassigned owner, cancel
        '	 the event to disallow the unassigned owner from becoming
        '	activated.
        If e.NewActiveOwner.IsUnassigned Then
            e.Cancel = True
        End If

    End Sub

    Private Sub UltraWeekView1_AfterActiveOwnerChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.AfterActiveOwnerChangedEventArgs) Handles UltraWeekView1.AfterActiveOwnerChanged

        '	Synchronize the UltraWeekView's ActiveOwner when the
        '	ActiveOwner changes in the UltraDayView control
        If Not Me.UltraDayView1.ActiveOwner Is e.NewActiveOwner Then
            Me.UltraDayView1.ActiveOwner = e.NewActiveOwner
        End If

    End Sub

    Private Sub UltraDayView1_AfterActiveOwnerChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.AfterActiveOwnerChangedEventArgs) Handles UltraDayView1.AfterActiveOwnerChanged

        '	Synchronize the UltraWeekView's ActiveOwner when the
        '	ActiveOwner changes in the UltraDayView control
        If Not Me.ultraWeekView1.ActiveOwner Is e.NewActiveOwner Then
            Me.ultraWeekView1.ActiveOwner = e.NewActiveOwner
        End If

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

		private void ultraDayView1_BeforeActiveOwnerChanged(object sender, Infragistics.Win.UltraWinSchedule.BeforeActiveOwnerChangedEventArgs e)
		{
			//	If the new ActiveOwner is the unassigned owner, cancel
			//	 the event to disallow the unassigned owner from becoming
			//	activated.
			if ( e.NewActiveOwner.IsUnassigned )
				e.Cancel = true;
		}

		private void ultraWeekView1_BeforeActiveOwnerChanged(object sender, Infragistics.Win.UltraWinSchedule.BeforeActiveOwnerChangedEventArgs e)
		{		
			//	If the new ActiveOwner is the unassigned owner, cancel
			//	 the event to disallow the unassigned owner from becoming
			//	activated.
			if ( e.NewActiveOwner.IsUnassigned )
				e.Cancel = true;
		}

		private void ultraDayView1_AfterActiveOwnerChanged(object sender, Infragistics.Win.UltraWinSchedule.AfterActiveOwnerChangedEventArgs e)
		{
			//	Synchronize the UltraWeekView's ActiveOwner when the
			//	ActiveOwner changes in the UltraDayView control
			if ( this.ultraWeekView1.ActiveOwner != e.NewActiveOwner )
				this.ultraWeekView1.ActiveOwner = e.NewActiveOwner;		
		}

		private void ultraWeekView1_AfterActiveOwnerChanged(object sender, Infragistics.Win.UltraWinSchedule.AfterActiveOwnerChangedEventArgs e)
		{
			//	Synchronize the UltraDayView's ActiveOwner when the
			//	ActiveOwner changes in the UltraWeekView control
			if ( this.ultraDayView1.ActiveOwner != e.NewActiveOwner )
				this.ultraDayView1.ActiveOwner = e.NewActiveOwner;
		}
参照