Spread Windows Forms 9.0 Product Documentation
Save(SheetSkin,String) Method
Example 


Name of the skin
Path and file name to which to save the skin overwriting the file if it already exists
Saves a skin to a file.
Syntax
'Declaration
 
Public Overloads Shared Sub Save( _
   ByVal skin As SheetSkin, _
   ByVal fileName As String _
) 
'Usage
 
Dim skin As SheetSkin
Dim fileName As String
 
SheetSkin.Save(skin, fileName)
public static void Save( 
   SheetSkin skin,
   string fileName
)

Parameters

skin
Name of the skin
fileName
Path and file name to which to save the skin overwriting the file if it already exists
Example
This example saves a skin.
FarPoint.Win.Spread.SheetSkin sk = new FarPoint.Win.Spread.SheetSkin("TestSkin", 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);

sk.Apply(fpSpread1);

SaveFileDialog sfd = new SaveFileDialog();
string s;
sfd.Filter = "skin files (*.skn)|*.skn";
sfd.FilterIndex = 2;
sfd.RestoreDirectory = true;
if (sfd.ShowDialog() == DialogResult.OK) 
{
    s = sfd.FileName;
    FarPoint.Win.Spread.SheetSkin.Save(sk,s);
}
Dim sk As New FarPoint.Win.Spread.SheetSkin("TestSkin", 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)

sk.Apply(FpSpread1)

Dim sd As New SaveFileDialog()
Dim s As String
sd.Filter = "skin files (*.skn)|*.skn"
sd.FilterIndex = 2
sd.RestoreDirectory = True
If sd.ShowDialog() = DialogResult.OK Then
    s = sd.FileName
    If Not (s Is Nothing) Then
        FarPoint.Win.Spread.SheetSkin.Save(sk, s)
    End If
End If
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetSkin Class
SheetSkin Members
Overload List

User-Task Documentation

Saving a Skin

 

 


Copyright © GrapeCity, inc. All rights reserved.