Version

ActivityDisplayStyle Property

Gets/sets a value which determines which activities (Appointment, Note, or Holiday) are displayed.
Syntax
'Declaration
 
Public Property ActivityDisplayStyle As ActivityDisplayStyleEnum
public ActivityDisplayStyleEnum ActivityDisplayStyle {get; set;}
Remarks

The ActivityDisplayStyleEnum values are bit flags, which can be combined by using the logical OR operator to produce any display combination of the three activity types. For example, setting the property to Appointments | Notes (0x0003) will result in all activities except Holidays being displayed.

Example
Demonstrates how to use the ActivityDisplayStyle property to display only appointments and notes; demonstrates how to make appointment times display as an analog clock, and to ensure the displaying of appointment end times

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;

		}
Requirements

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

See Also