'宣言 Public Property MonthHeaderCaptionStyle As MonthHeaderCaptionStyle
public MonthHeaderCaptionStyle MonthHeaderCaptionStyle {get; set;}
月ヘッダーのキャプションは、月の名前と年を表示します。MonthHeaderCaptionStyle は MonthOfYear.ShortDescription または MonthOfYear.LongDescription が表示できるかどうかを決定します。
注: 現在のカルチャの YearMonthPattern が 'MMM' または 'MMMM' 書式指定子のいずれも含まないとき、MonthHeaderCaptionStyle プロパティは適用できません。
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
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewMulti; using Microsoft.VisualBasic; private void SetupMonthHeaders() { // Get the current culture's long date format string string formatString = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern; // Set the MonthHeaderCaptionStyle property to display the full name of the month if ( Microsoft.VisualBasic.Strings.InStr( formatString, "MMMM", CompareMethod.Binary ) > 0 ) this.ultraMonthViewMulti1.MonthHeaderCaptionStyle = MonthHeaderCaptionStyle.LongDescription; else this.ultraMonthViewMulti1.MonthHeaderCaptionStyle = MonthHeaderCaptionStyle.ShortDescription; // 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 ( this.ultraMonthViewMulti1.MonthHeaderPaddingResolved.Width < 5 ) this.ultraMonthViewMulti1.MonthHeaderPadding = new Size( 5, this.ultraMonthViewMulti1.MonthHeaderPaddingResolved.Height ); // Make sure the headers are going to be displayed this.ultraMonthViewMulti1.MonthHeadersVisible = true; }