Spread WPF Documentation
StyleInfo Constructor(String)
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > StyleInfo Class > StyleInfo Constructor : StyleInfo Constructor(String)
The name of the new StyleInfo object.
Creates a custom style (StyleInfo object) with the specified name.
Syntax
'Declaration
 
Public Function New( _
   ByVal name As System.String _
)
'Usage
 
Dim name As System.String
 
Dim instance As New StyleInfo(name)
public StyleInfo( 
   System.string name
)

Parameters

name
The name of the new StyleInfo object.
Example
This example creates a style for the cell.
GrapeCity.Windows.SpreadSheet.Data.StyleInfo style = new GrapeCity.Windows.SpreadSheet.Data.StyleInfo("TextStyle");
style.Underline = true;
style.Strikethrough = false;
gcSpreadSheet1.Sheets[0].NamedStyles.Add(style);
gcSpreadSheet1.Sheets[0].Cells[0, 0].StyleName = "TextStyle";
gcSpreadSheet1.Sheets[0].Cells[0, 0].Text = "Style";
listBox1.Items.Add(style.IsStrikethroughSet().ToString());
listBox1.Items.Add(style.IsUnderlineSet().ToString());
//style.ResetStrikethrough();
//style.ResetUnderline();
Dim style As New GrapeCity.Windows.SpreadSheet.Data.StyleInfo("TextStyle")
style.Underline = True
style.Strikethrough = False
GcSpreadSheet1.Sheets(0).NamedStyles.Add(style)
GcSpreadSheet1.Sheets(0).Cells(0, 0).StyleName = "TextStyle"
GcSpreadSheet1.Sheets(0).Cells(0, 0).Text = "Style"
listBox1.Items.Add(style.IsStrikethroughSet().ToString())
listBox1.Items.Add(style.IsUnderlineSet().ToString())
'style.ResetStrikethrough()
'style.ResetUnderline()
See Also

Reference

StyleInfo Class
StyleInfo Members
Overload List