Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Private Sub UltraDayView1_AfterActiveOwnerChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.AfterActiveOwnerChangedEventArgs) Handles UltraDayView1.AfterActiveOwnerChanged
Dim ultraDayView As ultraDayView = DirectCast(sender, ultraDayView)
' If the new ActiveOwner is the unassigned owner, disallow automatic appointment creation
If Not e.NewActiveOwner Is Nothing AndAlso e.NewActiveOwner Is ultraDayView.CalendarInfo.Owners.UnassignedOwner Then
ultraDayView.AutoAppointmentCreate = False
Else
ultraDayView.AutoAppointmentCreate = True
End If
End Sub