Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Private Sub GetResolvedColorInfo()
' If there are no months being displayed, return
If (Me.ultraCalendarCombo1.VisibleMonths.Count = 0) Then Return
Dim appData As AppearanceData = New AppearanceData()
Dim flags As AppearancePropFlags = AppearancePropFlags.ForeColor Or AppearancePropFlags.BackColor
Dim info As String = String.Empty
' Get the resolved BackColor and ForeColor of the control's main Appearance
Me.ultraCalendarCombo1.ResolveAppearance(appData, flags)
info += "Appearance: BackColor = " + appData.BackColor.ToString() + ", ForeColor = " + appData.ForeColor.ToString() + vbCrLf
' We must reset the AppearancePropFlags we are using each time
' because when an appearance property is resolved, the corresponding
' bit is stripped out of the AppearancePropFlags
flags = AppearancePropFlags.ForeColor Or AppearancePropFlags.BackColor
' Get the resolved BackColor and ForeColor of the DateButtonAppearace
Me.ultraCalendarCombo1.ResolveDateButtonAppearace(appData, flags)
info += "DateButtonAppearace: BackColor = " + appData.BackColor.ToString() + ", ForeColor = " + appData.ForeColor.ToString() + vbCrLf
' Get the resolved BackColor and ForeColor of the DateButtonAreaAppearance
flags = AppearancePropFlags.ForeColor Or AppearancePropFlags.BackColor
Me.ultraCalendarCombo1.ResolveDateButtonAreaAppearance(appData, flags)
info += "DateButtonAreaAppearance: BackColor = " + appData.BackColor.ToString() + ", ForeColor = " + appData.ForeColor.ToString() + vbCrLf
' Display the information in a message box
MessageBox.Show(info, "GetResolvedColorInfo", MessageBoxButtons.OK)
End Sub