Spread WPF Documentation
TextIndent Property (StyleInfo)
Example 


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
System.ArgumentOutOfRangeExceptionThe 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()
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

StyleInfo Class
StyleInfo Members

 

 


Copyright © GrapeCity, inc. All rights reserved.