'Declaration 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 )
The following sample code illustrates how to resolve the appearance of a specific panel as well as the appearance of an UltraStatusBar control.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinStatusBar Imports System.Diagnostics Private Sub button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button4.Click Dim appData As AppearanceData Dim requestedProps As AppearancePropFlags Dim panel As UltraStatusPanel ' ------------------------------------------------ ' Resolve the appearance of a status bar panel. ' ------------------------------------------------ ' Get the first panel panel = Me.ultraStatusBar1.Panels(0) ' Initialize the appearance data structure appData = New AppearanceData() ' Specify which appearance properties we want to resolve. ' In this case just the backcolor and forecolor. requestedProps = AppearancePropFlags.BackColor Or AppearancePropFlags.ForeColor ' Call either the panel's 'ResolveAppearance' method ' or the control's 'ResolvePanelAppearance' method to ' resolve the appearance of this panel (this may be ' different that the appearance of the status bar ' control which is resolved below). 'Me.ultraStatusBar1.ResolvePanelAppearance( panel, ref appData, ref requestedProps ) panel.ResolveAppearance(appData, requestedProps) ' Write out the resolved colors Debug.WriteLine("BackColor: " + appData.BackColor.ToString() + ", ForeColor: " + appData.ForeColor.ToString()) ' ------------------------------------------------ ' Resolve the appearance of the status bar control ' ------------------------------------------------ ' Re-initialize the appearance data structure appData = New AppearanceData() ' Specify which appearance properties we want to resolve. ' In this case we want all 'Render' properties. This ' includes every property but the 'Cursor' property. requestedProps = AppearancePropFlags.AllRender ' Call the control's 'ResolveAppearance' method ' to resolve the appearance of the status bar ' control. Me.ultraStatusBar1.ResolveAppearance(appData, requestedProps) ' Write out the resolved gradient related properties. Debug.WriteLine("BackGradientStyle: " + appData.BackGradientStyle.ToString() + ", BackColor: " + appData.BackColor.ToString() + ", BackColor2: " + appData.BackColor2.ToString()) End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinStatusBar; private void button4_Click(object sender, System.EventArgs e) { AppearanceData appData; AppearancePropFlags requestedProps; UltraStatusPanel panel; // ------------------------------------------------ // Resolve the appearance of a status bar panel. // ------------------------------------------------ // Get the first panel panel = this.ultraStatusBar1.Panels[0]; // Initialize the appearance data structure appData = new AppearanceData(); // Specify which appearance properties we want to resolve. // In this case just the backcolor and forecolor. requestedProps = AppearancePropFlags.BackColor | AppearancePropFlags.ForeColor; // Call either the panel's 'ResolveAppearance' method // or the control's 'ResolvePanelAppearance' method to // resolve the appearance of this panel (this may be // different that the appearance of the status bar // control which is resolved below). //this.ultraStatusBar1.ResolvePanelAppearance( panel, ref appData, ref requestedProps ); panel.ResolveAppearance( ref appData, ref requestedProps ); // Note: The reason that the 'requestedProps' parameter // is also passed in by reference is that as each requested // property is resolved its bit is stripped out of the // passed in parameter. On return from the call the only // bits remaining in 'requestedProps' will be those // properties which were not resolved. Normally, // 'requestedProps' has no bits set after the call returns. // Write out the resolved colors Debug.WriteLine("BackColor: " + appData.BackColor.ToString() + ", ForeColor: " + appData.ForeColor.ToString() ); // ------------------------------------------------ // Resolve the appearance of the status bar control // ------------------------------------------------ // Re-initialize the appearance data structure appData = new AppearanceData(); // Specify which appearance properties we want to resolve. // In this case we want all 'Render' properties. This // includes every property but the 'Cursor' property. requestedProps = AppearancePropFlags.AllRender; // Call the control's 'ResolveAppearance' method // to resolve the appearance of the status bar // control. this.ultraStatusBar1.ResolveAppearance( ref appData, ref requestedProps ); // Write out the resolved gradient related properties. Debug.WriteLine("BackGradientStyle: " + appData.BackGradientStyle.ToString() + ", BackColor: " + appData.BackColor.ToString() + ", BackColor2: " + appData.BackColor2.ToString() ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2