'Declaration Public Property TimeDisplayStyle As TimeDisplayStyleEnum
public TimeDisplayStyleEnum TimeDisplayStyle {get; set;}
The TimeDisplayStyle property can be used to change the way Appointment objects display the start and end time of the appointment.
For example, setting the property to TimeDisplayStyleEnum.Clock results in the appointment times being displayed as an "analog" clock.
Note: The width of the visual representation of the Appointment also affects whether the appointment times are displayed.
If the appointment's width is less than double the amount of space required to display the appointment time(s), one or both of the times may be hidden.
In the case where the AppointmentEndTimeVisible property is set to true, the Appointment.EndDateTime is hidden first, then the Appointment.StartDateTime, where horizontal space is insufficient.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.MonthViewSingle Private Sub SetupActivityDisplay() ' Add an appointment, note and holiday for the current date Dim startTime As DateTime = New DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 9, 0, 0) Dim endTime As DateTime = New DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 17, 30, 0) Me.UltraMonthViewSingle1.CalendarInfo.Appointments.Add(startTime, endTime, "Today's Appointment") Me.UltraMonthViewSingle1.CalendarInfo.Notes.Add(DateTime.Today, "Today's Note") ' Set the ActivityDisplayStyle property to display Appointments and Notes, but not Holidays Me.UltraMonthViewSingle1.ActivityDisplayStyle = ActivityDisplayStyleEnum.Appointments Or ActivityDisplayStyleEnum.Notes ' Set the TimeDisplayStyle property to display Appointment times as an analog clock Me.UltraMonthViewSingle1.TimeDisplayStyle = TimeDisplayStyleEnum.Clock ' Set the AppointmentEndTimeVisible property to display the end time of Appointments Me.UltraMonthViewSingle1.AppointmentEndTimeVisible = True End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewSingle; using System.Diagnostics; private void SetupActivityDisplay() { // Add an appointment, note and holiday for the current date DateTime startTime = new DateTime( DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 9, 0, 0 ); DateTime endTime = new DateTime( DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, 17, 30, 0 ); this.ultraMonthViewSingle1.CalendarInfo.Appointments.Add( startTime, endTime, "Today's Appointment" ); this.ultraMonthViewSingle1.CalendarInfo.Notes.Add( DateTime.Today, "Today's Note" ); // Set the ActivityDisplayStyle property to display Appointments and Notes, but not Holidays this.ultraMonthViewSingle1.ActivityDisplayStyle = ActivityDisplayStyleEnum.Appointments | ActivityDisplayStyleEnum.Notes; // Set the TimeDisplayStyle property to display Appointment times as an analog clock this.ultraMonthViewSingle1.TimeDisplayStyle = TimeDisplayStyleEnum.Clock; // Set the AppointmentEndTimeVisible property to display the end time of Appointments this.ultraMonthViewSingle1.AppointmentEndTimeVisible = true; }
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