Spread Windows Forms 12.0 Product Documentation
DefaultStyleName Property (SheetView)

FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : DefaultStyleName Property
Gets or sets the name of the default style for the sheet.
Public Property DefaultStyleName As String
Dim instance As SheetView
Dim value As String
instance.DefaultStyleName = value
value = instance.DefaultStyleName
public string DefaultStyleName {get; set;}

Property Value

String containing the name of the default style
Specified NamedStyle object could not be found in the collection
This example sets the background color and text color for the sheet based on the style information provided.
string s;
FarPoint.Win.Spread.NamedStyle parent = new FarPoint.Win.Spread.NamedStyle("Parent");
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
si.BackColor = Color.Yellow;
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle("MyStyle", "Parent", si);
fpSpread1.ActiveSheet.DefaultStyle = ns;
s = fpSpread1.ActiveSheet.DefaultStyleName;
label1.Text = "The name of the default style is " + s;
Dim s As String
Dim parent As New FarPoint.Win.Spread.NamedStyle("Parent")
Dim si As New FarPoint.Win.Spread.StyleInfo()
si.BackColor = Color.Yellow
Dim ns As New FarPoint.Win.Spread.NamedStyle("MyStyle", "Parent", si)
FpSpread1.ActiveSheet.DefaultStyle = ns
s = FpSpread1.ActiveSheet.DefaultStyleName
Label1.Text = "The name of the default style is " & s
See Also


SheetView Class
SheetView Members

User-Task Documentation

Creating and Applying a Style for Cells