You can save the skin to a file or a stream.
If you do not specify a path, the file is saved in the Visual Studio project bin folder in a Debug subfolder. If you specify a path that includes a folder that does not exist, an error message appears during code compile.
Use the Save methods in the SheetSkin or SpreadSkin class.
Using Code
Use the Save(SheetSkin,String) method in the SheetSkin class for saving to a file; use the Save(SheetSkin,Stream) method for saving to a stream.
Example
This example code saves a skin to a file on the C: drive.
C# | Copy Code |
---|---|
// define a skin and save it FarPoint.Win.Spread.SheetSkin sk = new FarPoint.Win.Spread.SheetSkin("BlueSkin", Color.White, Color.DarkGray, Color.Black, Color.Blue, FarPoint.Win.Spread.GridLines.Both, Color.Blue, Color.Red, Color.White, Color.Black, Color.LightGray, Color.Gray, false, false, true, true, true); FarPoint.Win.Spread.SheetSkin.Save(sk,"C:\\BlueSkinTemplate.skn"); // FarPoint.Win.Spread.SpreadSkin.Save for a SpreadSkin |
VB | Copy Code |
---|---|
' define a skin and save it Dim sk As New FarPoint.Win.Spread.SheetSkin("BlueSkin", Color.White, Color.DarkGray, Color.Black, Color.Blue, FarPoint.Win.Spread.GridLines.Both, Color.Blue, Color.Red, Color.White, Color.Black, Color.LightGray, Color.Gray, False, False, True, True, True) FarPoint.Win.Spread.SheetSkin.Save(sk,"C:\BlueSkinTemplate.skn") ' FarPoint.Win.Spread.SpreadSkin.Save for a SpreadSkin |