Spread WPF Documentation
CellHorizontalAlignment Enumeration
Example Example 


Specifies the horizontal alignment of the cell.
Syntax
'Declaration
 
Public Enum CellHorizontalAlignment 
   Inherits System.Enum
'Usage
 
Dim instance As CellHorizontalAlignment
public enum CellHorizontalAlignment : System.Enum 
Members
MemberDescription
CenterIndicates that the cell content starts from the center in the horizontal alignment.
GeneralIndicates that the horizontal alignment is based on the value type.
LeftIndicates that the cell content starts from the left in the horizontal alignment.
RightIndicates that the cell content starts from the right in the horizontal alignment.
Example
This example sets the CellHorizontalAlignment enumeration.
GrapeCity.Windows.SpreadSheet.Data.StyleInfo aaa = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo();
aaa.Background = New SolidColorBrush(Colors.Aquamarine);
aaa.Parent = "ParentStyle";
aaa.Name = "aaa";
GrapeCity.Windows.SpreadSheet.Data.StyleInfo ParentStyle = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo();
ParentStyle.Background = new SolidColorBrush(Colors.Aquamarine);
ParentStyle.HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right;
ParentStyle.Name = "ParentStyle";
gcSpreadSheet1.Sheets[0].NamedStyles.Add(aaa);
gcSpreadSheet1.Sheets[0].NamedStyles.Add(ParentStyle);
gcSpreadSheet1.Sheets[0].Cells[0, 0].StyleName = "aaa";
GcSpreadSheet1.Invalidate();
Dim aaa As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo()
aaa.Background = New SolidColorBrush(Colors.Aquamarine)
aaa.Parent = "ParentStyle"
aaa.Name = "aaa"
Dim ParentStyle As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo()
ParentStyle.Background = New SolidColorBrush(Colors.Aquamarine)
ParentStyle.HorizontalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment.Right
ParentStyle.Name = "ParentStyle"
GcSpreadSheet1.Sheets(0).NamedStyles.Add(aaa)
GcSpreadSheet1.Sheets(0).NamedStyles.Add(ParentStyle)
GcSpreadSheet1.Sheets(0).Cells(0, 0).StyleName = "aaa"
GcSpreadSheet1.Invalidate()
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.Data.CellHorizontalAlignment

Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

GrapeCity.Windows.SpreadSheet.Data Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.