Demonstrates how to use the control's WeekendDisplayStyle property to customize the way weekend days are displayed.
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.MonthViewSingle
Private Sub SetupWeekendDisplayStyle()
Dim result As DialogResult
If Me.UltraMonthViewSingle1.WeekendDisplayStyle = WeekendDisplayStyleEnum.Full Then
' See if the user wants to compress weekend days, so that Saturday and Sunday
' appear in the same column
result = MessageBox.Show("Would you like to compress weekend days, so that Saturday and Sunday appear in the same column?", "SetupWeekendDisplayStyle", MessageBoxButtons.YesNo)
If result = DialogResult.Yes Then Me.UltraMonthViewSingle1.WeekendDisplayStyle = WeekendDisplayStyleEnum.Compressed
Else
' See if the user wants to display each weekend day in a separate column
result = MessageBox.Show("Would you like to display each weekend day in a separate column?", "SetupWeekendDisplayStyle", MessageBoxButtons.YesNo)
If result = DialogResult.Yes Then Me.UltraMonthViewSingle1.WeekendDisplayStyle = WeekendDisplayStyleEnum.Full
End If
End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.MonthViewSingle;
using System.Diagnostics;
private void SetupWeekendDisplayStyle()
{
DialogResult result;
if ( this.ultraMonthViewSingle1.WeekendDisplayStyle == WeekendDisplayStyleEnum.Full )
{
// See if the user wants to compress weekend days, so that Saturday and Sunday
// appear in the same column
result = MessageBox.Show( "Would you like to compress weekend days, so that Saturday and Sunday appear in the same column?", "SetupWeekendDisplayStyle", MessageBoxButtons.YesNo);
if ( result == DialogResult.Yes )
this.ultraMonthViewSingle1.WeekendDisplayStyle = WeekendDisplayStyleEnum.Compressed;
}
else
{
// See if the user wants to display each weekend day in a separate column
result = MessageBox.Show( "Would you like to display each weekend day in a separate column?", "SetupWeekendDisplayStyle", MessageBoxButtons.YesNo);
if ( result == DialogResult.Yes )
this.ultraMonthViewSingle1.WeekendDisplayStyle = WeekendDisplayStyleEnum.Full;
}
}
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