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

Specifies if and how a color gradient will be used to fill the background of a UIElement.

Syntax

Visual Basic (Declaration) 
Public Enum GradientStyle 
   Inherits System.Enum
C# 
public enum GradientStyle : System.Enum 

Members

MemberDescription
BackwardDiagonal Specifies a gradient from upper right to lower left.
Circular Specifies a gradient that starts with the primary color in the center point and migrates toward the secondary color on the edges in a circular pattern.
Default The default style.
Elliptical Specifies a gradient that starts with the primary color in the center point and migrates toward the secondary color on the edges in a elliptical pattern.
ForwardDiagonal Specifies a gradient from upper left to lower right.
GlassBottom20 Specifies a vertical gradient that provides a glass like appearance with 20% highlight at the bottom.
GlassBottom20Bright Specifies a vertical gradient that provides a glass like appearance with a bright 20% highlight at the bottom.
GlassBottom37 Specifies a vertical gradient that provides a glass like appearance with 37% highlight at the bottom.
GlassBottom37Bright Specifies a vertical gradient that provides a glass like appearance with a bright 37% highlight at the bottom.
GlassBottom50 Specifies a vertical gradient that provides a glass like appearance with 50% highlight at the bottom.
GlassBottom50Bright Specifies a vertical gradient that provides a glass like appearance with a bright 50% highlight at the bottom.
GlassLeft20 Specifies a horizontal gradient that provides a glass like appearance with 20% highlight on the left.
GlassLeft20Bright Specifies a horizontal gradient that provides a glass like appearance with a bright 20% highlight on the left.
GlassLeft37 Specifies a horizontal gradient that provides a glass like appearance with 37% highlight on the left.
GlassLeft37Bright Specifies a horizontal gradient that provides a glass like appearance with a bright 37% highlight on the left.
GlassLeft50 Specifies a horizontal gradient that provides a glass like appearance with 50% highlight on the left.
GlassLeft50Bright Specifies a horizontal gradient that provides a glass like appearance with a bright 50% highlight on the left.
GlassRight20 Specifies a horizontal gradient that provides a glass like appearance with 20% highlight on the right.
GlassRight20Bright Specifies a horizontal gradient that provides a glass like appearance with a bright 20% highlight on the right.
GlassRight37 Specifies a horizontal gradient that provides a glass like appearance with 37% highlight on the right.
GlassRight37Bright Specifies a horizontal gradient that provides a glass like appearance with a bright 37% highlight on the right.
GlassRight50 Specifies a horizontal gradient that provides a glass like appearance with 50% highlight on the right.
GlassRight50Bright Specifies a horizontal gradient that provides a glass like appearance with a bright 50% highlight on the right.
GlassTop20 Specifies a vertical gradient that provides a glass like appearance with 20% highlight at the top.
GlassTop20Bright Specifies a vertical gradient that provides a glass like appearance with a bright 20% highlight at the top.
GlassTop37 Specifies a vertical gradient that provides a glass like appearance with 37% highlight at the top.
GlassTop37Bright Specifies a vertical gradient that provides a glass like appearance with a bright 37% highlight at the top.
GlassTop50 Specifies a vertical gradient that provides a glass like appearance with 50% highlight at the top.
GlassTop50Bright Specifies a vertical gradient that provides a glass like appearance with a bright 50% highlight at the top.
Horizontal Specifies a gradient from left to right.
HorizontalBump Specifies a gradient that starts with the secondary color in the center and migrates toward the primary color on the left and right.
HorizontalWithGlassBottom50 Specifies a horizontal gradient with a vertical glass overlay similar to the Windows Vista Explorer toolbar.
HorizontalWithGlassTop50 Specifies a horizontal gradient with a vertical glass overlay similar to the Windows Vista Explorer toolbar.
None No gradient. Use solid or hatch backcolor.
Rectangular Specifies a gradient that starts with the primary color in the center point and migrates toward the secondary color on the edges in a rectangular pattern.
Vertical Specifies a gradient from top to bottom.
VerticalBump Specifies a gradient that starts with the secondary color in the center and migrates toward the primary color on the top and bottom.
VerticalWithGlassLeft50 Specifies a vertical gradient with a horizontal glass overlay similar to the Windows Vista Explorer toolbar.
VerticalWithGlassRight50 Specifies a vertical gradient with a horizontal glass overlay similar to the Windows Vista Explorer toolbar.

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