Version

Appearances Property (UltraGridLayout)

A collection of all the Appearance objects created for use with this control.
Syntax
'Declaration
 
Public ReadOnly Property Appearances As Infragistics.Win.AppearancesCollection
public Infragistics.Win.AppearancesCollection Appearances {get;}
Remarks

The Appearances collection is used to contain Appearance objects that you have created and added to the control as pre-defined formatting templates. It does not represent a collection of all the Appearance objects that exist in the control. The intrinsic Appearance objects that are stored by objects such as the UltraGridBand, UltraGridRow, UltraGridCell are not included in the grid's Appearances collection.

Example
Following code adds an appearance with the key of "A1" to the Appearances collection and then assigns it to the CellAppearance off the layout's Override.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button38_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button38.Click

      Dim app1 As Infragistics.Win.Appearance = Nothing

      ' Calling Add method with a key will create a new Appearance object and add it to
      ' the collection. The passed in string is the key of the new appearance that you can
      ' use to access the appearance later on. The return value is the new appearance object
      ' that was created.
      app1 = Me.UltraGrid1.DisplayLayout.Appearances.Add("A1")

      ' Setup the app1 appearance.
      app1.BackColor = Color.Blue
      app1.ForeColor = Color.White

      ' Here is the code that shows you how to use the AppearancesCollection to access the
      ' appearances that we have added to it.
      Me.UltraGrid1.DisplayLayout.Override.CellAppearance = Me.UltraGrid1.DisplayLayout.Appearances("A1")

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button38_Click(object sender, System.EventArgs e)
{

	Infragistics.Win.Appearance app1 = null;

	// Calling Add method with a key will create a new Appearance object and add it to
	// the collection. The passed in string is the key of the new appearance that you can
	// use to access the appearance later on. The return value is the new appearance object
	// that was created.
	app1 = this.ultraGrid1.DisplayLayout.Appearances.Add( "A1" );

	// Setup the app1 appearance.
	app1.BackColor = Color.Blue;
	app1.ForeColor = Color.White;

	// Here is the code that shows you how to use the AppearancesCollection to access the
	// appearances that we have added to it.
	this.ultraGrid1.DisplayLayout.Override.CellAppearance = this.ultraGrid1.DisplayLayout.Appearances["A1"];

}
Requirements

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

See Also