'宣言 Public Property DayOfWeekCaptionStyle As DayOfWeekCaptionStyle
public DayOfWeekCaptionStyle DayOfWeekCaptionStyle {get; set;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub SetupDayOfWeekCaptionStyle(ByVal hide As Boolean, ByVal firstTwoLetters As Boolean) '-------------------------------------------------------------------------------- ' DayOfWeekCaptionStyle ' ' This example uses the control's DayOfWeekDisplayStyle and DayOfWeekCaptionStyle ' properties to control the way the DayOfWeek captions are displayed '-------------------------------------------------------------------------------- ' If the 'hide' parameter is true, set the DayOfWeekDisplayStyle property ' to 'None' and return, since the DayOfWeekCaptionStyle is then irrelevant If hide Then Me.ultraMonthViewMulti1.DayOfWeekDisplayStyle = DayOfWeekDisplayStyle.None Return Else ' Otherwise, set it up to display only in the first row Me.ultraMonthViewMulti1.DayOfWeekDisplayStyle = DayOfWeekDisplayStyle.FirstRow End If ' If the 'firstTwoLetters' parameter is true, set the DayOfWeekCaptionStyle ' property to FirstTwoLetters so the first 2 letters of the name of the ' day of the week is displayed (e.g., Mo, Tu, We, etc.); otherwise, set it ' to display only one If (firstTwoLetters) Then Me.ultraMonthViewMulti1.DayOfWeekCaptionStyle = DayOfWeekCaptionStyle.FirstTwoLetters Else Me.ultraMonthViewMulti1.DayOfWeekCaptionStyle = DayOfWeekCaptionStyle.FirstLetter End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void SetupDayOfWeekCaptions( bool hide, bool firstTwoLetters ) { // If the 'hide' parameter is true, set the DayOfWeekDisplayStyle property // to 'None' and return, since the DayOfWeekCaptionStyle is then irrelevant if ( hide ) { this.ultraMonthViewMulti1.DayOfWeekDisplayStyle = DayOfWeekDisplayStyle.None; return; } else // Otherwise, set it up to display only in the first row this.ultraMonthViewMulti1.DayOfWeekDisplayStyle = DayOfWeekDisplayStyle.FirstRow; // If the 'firstTwoLetters' parameter is true, set the DayOfWeekCaptionStyle // property to FirstTwoLetters so the first 2 letters of the name of the // day of the week is displayed (e.g., Mo, Tu, We, etc.); otherwise, set it // to display only one if ( firstTwoLetters ) this.ultraMonthViewMulti1.DayOfWeekCaptionStyle = DayOfWeekCaptionStyle.FirstTwoLetters; else this.ultraMonthViewMulti1.DayOfWeekCaptionStyle = DayOfWeekCaptionStyle.FirstLetter; }