Version

DayDisplayStyle Property (UltraMonthViewSingleBase)

Gets/sets the type of formatting that is applied to the text that represents a given day's date.
Syntax
'Declaration
 
Public Property DayDisplayStyle As DayDisplayStyleEnum
public DayDisplayStyleEnum DayDisplayStyle {get; set;}
Remarks

The value of the DayDisplayStyle property has a slightly different effect on the UltraMonthViewSingle and UltraWeekView controls, as illustrated by the following table:

Property Value UltraMonthViewSingle UltraWeekView
Auto As horizontal space allows. The name of the month is displayed for the first visible day in the control, as well as the first day of each month. As horizontal space allows. The same formatting is applied to each day in the week.
Full Month displayed in full.
Example: "February 01"
Day of week and month displayed in full.
Example: "Friday, February 01"
Medium Short representation of the month.
Example: "Feb 01"
Day of week displayed in full, with a short representation of the month.
Example: "Friday, Feb 01"
Short Name of month is not displayed - only the day's number is displayed. Month is not displayed, with a short representation of the day of week.
Example: "Fri 01"

Example
Demonstrates how to use the control's various display styles to customize the way the control displays the names of days of the week, and whether the name of the month and/or the year number appear in the day area.

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;

		}
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