Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti
Private Sub SetupTipStyle()
' Get a count on each activity type for the currently visible month(s)
Dim appointments As Integer = 0, holidays As Integer = 0, notes As Integer = 0
Dim month As Infragistics.Win.UltraWinSchedule.MonthViewMulti.VisibleMonth
For Each month In Me.ultraMonthViewMulti1.VisibleMonths
appointments += month.Month.Appointments.Count
holidays += month.Month.Holidays.Count
notes += month.Month.Notes.Count
Next
' Set the TipStyle property so that only the most prevalent type
' of activity for the currently visible months is displayed in the tooltip
If (appointments > holidays And appointments > notes) Then
Me.ultraMonthViewMulti1.TipStyle = TipStyleDay.Appointments
ElseIf (holidays > appointments And holidays > notes) Then
Me.ultraMonthViewMulti1.TipStyle = TipStyleDay.Holidays
ElseIf (notes > appointments And notes > holidays) Then
Me.ultraMonthViewMulti1.TipStyle = TipStyleDay.Notes
Else
' If no one type of activity was any more prevalent than
' the other types, set the TipStyle to None
Me.ultraMonthViewMulti1.TipStyle = TipStyleDay.None
End If
End Sub