Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Customizing the Sheet Appearance > Customizing the Appearance of the Overall Component > Applying a Skin to the Component |
You can quickly customize the appearance of the spreadsheet component by applying a "skin" to it. A skin is simply a collection of appearance properties that apply to an entire component or to an individual 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 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.
For instructions on creating and applying your own skins, see Creating a Custom Skin for a Component.
For instructions on creating and applying your own cell-level styles, see Creating and Applying a Style for Cells.
For instructions on saving the skin to a file or stream, refer to Saving and Loading a Skin.
For information on customizing a skin in the Spread Designer, refer to the SpreadSkin Editor in the Spread Designer Guide.
For more details about spread skins, refer to the SpreadSkin class.
This example code sets the component to use the Classic predefined skin.
C# |
Copy Code
|
---|---|
FarPoint.Win.Spread.DefaultSpreadSkins.Classic.Apply(fpSpread1); |
VB |
Copy Code
|
---|---|
FarPoint.Win.Spread.DefaultSpreadSkins.Classic.Apply(FpSpread1) |
This example code sets the first sheet to use the Classic 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.DefaultSpreadSkins.Classic.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.DefaultSpreadSkins.Classic.Apply(newsheet) ' Assign the SheetView object to the first sheet in the component. FpSpread1.Sheets(0) = newsheet |