Infragistics(R) NetAdvantage(R) Windows Forms
AppearanceBase Class
Members  Example  See Also  E-mail your feedback on this topic.
Infragistics.Win Namespace : AppearanceBase Class

An abstract base class that is used to expose apperance related properties.

Syntax

Visual Basic (Declaration) 
Public MustInherit Class AppearanceBase 
   Inherits Infragistics.Shared.KeyedSubObjectBase
   Implements Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx 
C# 
public abstract class AppearanceBase : Infragistics.Shared.KeyedSubObjectBase, Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx  

Example

This sample creates a new appearance object and sets the color associated properties. This routine is called from the InitializeLayout event of the UltraWinGrid.

Visual BasicCopy Code
Imports Infragistics.Win
		
  Private Sub SetupActiveCellAppearanceColors()

      Dim appearance As Appearance 

      appearance = New Infragistics.Win.Appearance()

      appearance.ForeColor = Color.White
      appearance.ForeColorDisabled = Color.Gray
      appearance.BackColor = Color.Green
      appearance.BackColor2 = Color.Blue
      appearance.BackColorDisabled = Color.Red
      appearance.BackColorDisabled2 = Color.Yellow
      appearance.BackGradientStyle = GradientStyle.Elliptical
      appearance.BackColorAlpha = Alpha.UseAlphaLevel
      appearance.AlphaLevel = 125

      Me.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance

  End Sub
C#Copy Code
using Infragistics.Win;

	private void SetupActiveCellAppearanceColors()
	{

		Appearance appearance = new Appearance();

		appearance.ForeColor = Color.White ;
		appearance.ForeColorDisabled = Color.Gray ;
		appearance.BackColor = Color.Green ;
		appearance.BackColor2 = Color.Blue;
		appearance.BackColorDisabled = Color.Red;
		appearance.BackColorDisabled2 = Color.Yellow;
		appearance.BackGradientStyle = GradientStyle.Elliptical;
		appearance.BackColorAlpha = Alpha.UseAlphaLevel;
		appearance.AlphaLevel = 125;

		this.ultraGrid1.DisplayLayout.Override.CellAppearance  = appearance;

	}

See Also