Spread WPF Documentation
TextIndent Property (StyleInfo)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > StyleInfo Class : TextIndent Property
Gets or sets the amount to indent the text in a cell.
Syntax
'Declaration
 
<System.ComponentModel.DefaultValueAttribute()>
Public Property TextIndent As System.Integer
'Usage
 
Dim instance As StyleInfo
Dim value As System.Integer
 
instance.TextIndent = value
 
value = instance.TextIndent
[System.ComponentModel.DefaultValue()]
public System.int TextIndent {get; set;}

Property Value

The amount to indent the text in a cell in pixels. The default value is 0 pixels.
Exceptions
ExceptionDescription
The assigned value is less than 0.
Remarks
Only a non-negative value is acceptable.
Example
This example sets the TextIndent property.
gcSpreadSheet1.Sheets[0].NamedStyles.Add(new GrapeCity.Windows.SpreadSheet.Data.StyleInfo() { Background = new SolidColorBrush(Colors.Red), Name = "aaa", VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Center} );
gcSpreadSheet1.Sheets[0].NamedStyles.Add(new GrapeCity.Windows.SpreadSheet.Data.StyleInfo() { Background = new SolidColorBrush(Colors.Blue), Name = "ParentStyle", TextIndent = 5});
gcSpreadSheet1.Sheets[0].Cells[0, 0].StyleName = "aaa";
gcSpreadSheet1.Sheets[0].Cells[0, 0].ParentStyleName = "ParentStyle";
gcSpreadSheet1.Invalidate();
GcSpreadSheet1.Sheets(0).NamedStyles.Add(New GrapeCity.Windows.SpreadSheet.Data.StyleInfo() With {.Background = New SolidColorBrush(Colors.Red), .Name = "aaa", .VerticalAlignment = GrapeCity.Windows.SpreadSheet.Data.CellVerticalAlignment.Center})
GcSpreadSheet1.Sheets(0).NamedStyles.Add(New GrapeCity.Windows.SpreadSheet.Data.StyleInfo() With {.Background = New SolidColorBrush(Colors.Blue), .Name = "ParentStyle", .TextIndent = 5})
GcSpreadSheet1.Sheets(0).Cells(0, 0).StyleName = "aaa"
GcSpreadSheet1.Sheets(0).Cells(0, 0).ParentStyleName = "ParentStyle"
GcSpreadSheet1.Invalidate()
See Also

Reference

StyleInfo Class
StyleInfo Members