Returns or sets whether a new
Appointment is automatically created and placed in edit mode when the user has time slots selected and presses the enter key.
The following code sample demonstrates how to use the AutoAppointmentCreate property to prevent automatic appointment creation for a particular owner.
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
'Declaration
Public Property AutoAppointmentCreate As Boolean
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;
private void ultraDayView1_AfterActiveOwnerChanged(object sender, Infragistics.Win.UltraWinSchedule.AfterActiveOwnerChangedEventArgs e)
{
UltraDayView ultraDayView = sender as UltraDayView;
// If the new ActiveOwner is the unassigned owner, disallow automatic appointment creation
if ( e.NewActiveOwner != null &&
e.NewActiveOwner == ultraDayView.CalendarInfo.Owners.UnassignedOwner )
ultraDayView.AutoAppointmentCreate = false;
else
ultraDayView.AutoAppointmentCreate = true;
}
'Declaration
Public Property AutoAppointmentCreate As Boolean
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