MonthHeaderPadding の幅または高さが -1 に設定されると、コントロールはキャプションの周囲のデフォルトのパッディングを計算します。MonthHeaderPaddingResolvedは、月ヘッダー内のキャプションとスクロール ボタンのパッディングの実際的な量を決定します。
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; }