Infragistics2.Win.v8.1
VAlign Enumeration
See Also   Example
Infragistics.Win Namespace : VAlign Enumeration

An enumerator for aligning text or images

Syntax

Visual Basic (Declaration) 
Public Enum VAlign 
   Inherits Enum
C# 
public enum VAlign : Enum 

Members

MemberDescription
Default Use the current default
Top Align to the top
Middle Align in the middle
Bottom Align to the bottom

Example

This sample uses the image related properties of the appearance object. For simplicity we use the form's icon.

Visual BasicCopy Code
    Imports Infragistics.Win

    Private Sub SetupGridImages()

        Dim appearance As Appearance = New Appearance()

        appearance.ImageBackground = Me.Icon.ToBitmap()
        appearance.ImageBackgroundOrigin = ImageBackgroundOrigin.Form
        appearance.ImageBackgroundStyle = ImageBackgroundStyle.Stretched
        appearance.ImageBackgroundAlpha = Alpha.UseAlphaLevel
        appearance.AlphaLevel = 125
        appearance.Image = Me.Icon.ToBitmap()
        appearance.ImageVAlign = VAlign.Middle
        appearance.ImageHAlign = HAlign.Center

        Me.ultraGrid1.DisplayLayout.Appearance = appearance

    End Sub
C#Copy Code
       using Infragistics.Win;

       
private void SetupGridImages()
       {

           Appearance appearance =
new Appearance();

           appearance.ImageBackground =
this.Icon.ToBitmap();
           appearance.ImageBackgroundOrigin = ImageBackgroundOrigin.Form;
           appearance.ImageBackgroundStyle = ImageBackgroundStyle.Stretched ;
           appearance.ImageBackgroundAlpha = Alpha.UseAlphaLevel ;
           appearance.AlphaLevel = 125;
           appearance.Image =
this.Icon.ToBitmap();
           appearance.ImageVAlign = VAlign.Middle;
           appearance.ImageHAlign = HAlign.Center;
           
           
this.ultraGrid1.DisplayLayout.Appearance  = appearance;

       }

See Also