'宣言 Public Sub ResolveAppearance( _ ByRef appearance As Infragistics.Win.AppearanceData, _ ByRef requestedProps As Infragistics.Win.AppearancePropFlags _ )
public void ResolveAppearance( ref Infragistics.Win.AppearanceData appearance, ref Infragistics.Win.AppearancePropFlags requestedProps )
注: UltraCalendarCombo にフォーカスがあるとき、編集部分はグラデーション背景を描画できません。
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
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void GetResolvedColorInfo() { // If there are no months being displayed, return if ( this.ultraCalendarCombo1.VisibleMonths.Count == 0) return; AppearanceData appData = new AppearanceData(); AppearancePropFlags flags = AppearancePropFlags.ForeColor | AppearancePropFlags.BackColor; string info = string.Empty; // Get the resolved BackColor and ForeColor of the control's main Appearance this.ultraCalendarCombo1.ResolveAppearance( ref appData, ref flags ); info += "Appearance: BackColor = " + appData.BackColor.ToString() + ", ForeColor = " + appData.ForeColor.ToString() + "\n"; // 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 | AppearancePropFlags.BackColor; // Get the resolved BackColor and ForeColor of the DateButtonAppearace this.ultraCalendarCombo1.ResolveDateButtonAppearace( ref appData, ref flags); info += "DateButtonAppearace: BackColor = " + appData.BackColor.ToString() + ", ForeColor = " + appData.ForeColor.ToString() + "\n"; // Get the resolved BackColor and ForeColor of the DateButtonAreaAppearance flags = AppearancePropFlags.ForeColor | AppearancePropFlags.BackColor; this.ultraCalendarCombo1.ResolveDateButtonAreaAppearance( ref appData, ref flags ); info += "DateButtonAreaAppearance: BackColor = " + appData.BackColor.ToString() + ", ForeColor = " + appData.ForeColor.ToString() + "\n"; // Display the information in a message box MessageBox.Show(info, "GetResolvedColorInfo", MessageBoxButtons.OK); }