You can quickly customize the appearance of a sheet by applying a "skin" to it. A skin is simply a collection of appearance properties that apply to an entire sheet such as colors, grid lines, and whether to show headers. This saves you the time and effort of setting the properties individually.
Spread includes several built-in skins that are already made and ready for you to use. You can also create your own custom skin and save it so that you can use it in other Spread components for a common format.
If you apply a skin to a sheet with a hierarchy of child sheets, be sure to apply the skin to the parent sheet as well as to each of the child sheets. For more information on hierarchical displays, refer to Working with Hierarchical Data Display.
For more information and instructions about | See |
---|---|
Creating and applying your own sheet skins | Creating a Custom Skin for a Sheet |
Creating and applying your own cell-level styles | Creating and Applying a Style for Cells |
Saving the sheet skin to a file or stream | Saving and Loading a Skin |
Customizing a skin in the Spread Designer | SheetSkin Editor in the Spread Designer Guide |
Sheet skins | SheetSkin class |
This example code sets the first sheet to use the Colorful2 predefined skin.
C# |
Copy Code
|
---|---|
FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(fpSpread1.Sheets[0]); |
VB |
Copy Code
|
---|---|
FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(fpSpread1.Sheets(0)) |
This example code sets the first sheet to use the Colorful2 predefined skin.
C# |
Copy Code
|
---|---|
// Create new SheetView object. FarPoint.Win.Spread.SheetView newsheet = new FarPoint.Win.Spread.SheetView(); // Apply a skin to the SheetView object. FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(newsheet); // Assign the SheetView object to the first sheet in the component. fpSpread1.Sheets[0] = newsheet; |
VB |
Copy Code
|
---|---|
' Create new SheetView object. Dim newsheet As New FarPoint.Win.Spread.SheetView() ' Apply a skin to the SheetView object. FarPoint.Win.Spread.DefaultSkins.Colorful2.Apply(newsheet) ' Assign the SheetView object to the first sheet in the component. fpSpread1.Sheets(0) = newsheet |