'Declaration Public Property DayOfWeekHeaderDisplayStyle As DayDisplayStyleEnum
public DayDisplayStyleEnum DayOfWeekHeaderDisplayStyle {get; set;}
The value of the DayOfWeekHeaderDisplayStyle property effects the way that text is formatted in the DayOfWeek headers.
The UltraMonthViewSingle control raises an event when a DayOfWeek header is clicked (see DayOfWeekHeadersVisible)
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.MonthViewSingle Private Sub SetupDisplayStyles() ' Make the ActiveDay today Me.UltraMonthViewSingle1.CalendarInfo.ActiveDay = Me.UltraMonthViewSingle1.CalendarInfo.GetDay(DateTime.Today, True) ' Make the current day the only visible day in the control ' Hide all days of the week except for the day of the week of the current day Dim dow As Infragistics.Win.UltraWinSchedule.DayOfWeek For Each dow In Me.UltraMonthViewSingle1.CalendarInfo.DaysOfWeek If dow.DayOfTheWeek = Me.UltraMonthViewSingle1.CalendarInfo.ActiveDay.DayOfWeek.DayOfTheWeek Then dow.Visible = True Else dow.Visible = False End If Next ' Set the VisibleWeeks property to 1 Me.UltraMonthViewSingle1.VisibleWeeks = 1 ' Scroll the current day into view Me.UltraMonthViewSingle1.ScrollDayIntoView(DateTime.Today, True) ' Set the DayDisplayStyle property to Full Me.UltraMonthViewSingle1.DayDisplayStyle = DayDisplayStyleEnum.Full ' Set the DayOfWeekHeaderDisplayStyle property to Medium Me.UltraMonthViewSingle1.DayOfWeekHeaderDisplayStyle = DayDisplayStyleEnum.Medium ' Add an Appointment for today Me.UltraMonthViewSingle1.CalendarInfo.Appointments.Add(DateTime.Today.AddHours(9.0F), DateTime.Today.AddHours(9.5F), "Today's Appointment") ' Set the TimeDisplayStyle property to UseSystemSetting Me.UltraMonthViewSingle1.TimeDisplayStyle = TimeDisplayStyleEnum.UseSystemSetting ' Set the ActivityDisplayStyle property to Appointments Me.UltraMonthViewSingle1.ActivityDisplayStyle = ActivityDisplayStyleEnum.Appointments ' Set the YearDisplayStyle property to FirstDayOfMonth Me.UltraMonthViewSingle1.YearDisplayStyle = YearDisplayStyleEnum.FirstDayOfMonth End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewSingle; using System.Diagnostics; private void SetupDisplayStyles() { // Make the ActiveDay today this.ultraMonthViewSingle1.CalendarInfo.ActiveDay = this.ultraMonthViewSingle1.CalendarInfo.GetDay( DateTime.Today, true ); // Make the current day the only visible day in the control // Hide all days of the week except for the day of the week of the current day foreach( Infragistics.Win.UltraWinSchedule.DayOfWeek dow in this.ultraMonthViewSingle1.CalendarInfo.DaysOfWeek ) { if ( (int)( dow.DayOfTheWeek ) == (int)( this.ultraMonthViewSingle1.CalendarInfo.ActiveDay.DayOfWeek.DayOfTheWeek ) ) dow.Visible = true; else dow.Visible = false; } // Set the VisibleWeeks property to 1 this.ultraMonthViewSingle1.VisibleWeeks = 1; // Scroll the current day into view this.ultraMonthViewSingle1.ScrollDayIntoView( DateTime.Today, true ); // Set the DayDisplayStyle property to Full this.ultraMonthViewSingle1.DayDisplayStyle = DayDisplayStyleEnum.Full; // Set the DayOfWeekHeaderDisplayStyle property to Medium this.ultraMonthViewSingle1.DayOfWeekHeaderDisplayStyle = DayDisplayStyleEnum.Medium; // Add an Appointment for today this.ultraMonthViewSingle1.CalendarInfo.Appointments.Add( DateTime.Today.AddHours(9.0F), DateTime.Today.AddHours(9.5F), "Today's Appointment" ); // Set the TimeDisplayStyle property to UseSystemSetting this.ultraMonthViewSingle1.TimeDisplayStyle = TimeDisplayStyleEnum.UseSystemSetting; // Set the ActivityDisplayStyle property to Appointments this.ultraMonthViewSingle1.ActivityDisplayStyle = ActivityDisplayStyleEnum.Appointments; // Set the YearDisplayStyle property to FirstDayOfMonth this.ultraMonthViewSingle1.YearDisplayStyle = YearDisplayStyleEnum.FirstDayOfMonth; }
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