Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti
Imports Microsoft.VisualBasic
Private Sub SetupMonthHeaders()
' Get the current culture's long date format string
Dim formatString As String = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern
If (Microsoft.VisualBasic.Strings.InStr(formatString, "MMMM", CompareMethod.Binary) > 0) Then
' Set the MonthHeaderCaptionStyle property to display the full name of the month
Me.ultraMonthViewMulti1.MonthHeaderCaptionStyle = MonthHeaderCaptionStyle.LongDescription
Else
' Set the MonthHeaderCaptionStyle property to display the abbreviated name of the month
Me.ultraMonthViewMulti1.MonthHeaderCaptionStyle = MonthHeaderCaptionStyle.ShortDescription
End If
' Check the MonthHeaderCaptionPaddingResolved property to determine
' the actual numeric value for the padding that is applied to the month
' header captions. If the width is less than 5, we will make it 5.
If (Me.ultraMonthViewMulti1.MonthHeaderPaddingResolved.Width < 5) Then
Me.ultraMonthViewMulti1.MonthHeaderPadding = New Size(5, Me.ultraMonthViewMulti1.MonthHeaderPaddingResolved.Height)
' Make sure the headers are going to be displayed
Me.ultraMonthViewMulti1.MonthHeadersVisible = True
End If
End Sub