Spread Windows Forms 12.0 Product Documentation
Save(SheetSkin,Stream) Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetSkin Class > Save Method : Save(SheetSkin,Stream) Method
Name of the skin
Stream to which to save the skin
Saves a skin to a stream.
Syntax
'Declaration
 
Public Overloads Shared Sub Save( _
   ByVal skin As SheetSkin, _
   ByVal stream As Stream _
) 
'Usage
 
Dim skin As SheetSkin
Dim stream As Stream
 
SheetSkin.Save(skin, stream)
public static void Save( 
   SheetSkin skin,
   Stream stream
)

Parameters

skin
Name of the skin
stream
Stream to which to save the skin
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();
System.IO.Stream s;
sfd.Filter = "skin files (*.skn)|*.skn";
sfd.FilterIndex = 2;
sfd.RestoreDirectory = true;
if (sfd.ShowDialog() == DialogResult.OK) 
{
    s = sfd.OpenFile();
    FarPoint.Win.Spread.SheetSkin.Save(sk,s);
    s.Close();
}
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 System.IO.Stream
sd.Filter = "skin files (*.skn)|*.skn"
sd.FilterIndex = 2
sd.RestoreDirectory = True
If sd.ShowDialog() = DialogResult.OK Then
   s = sd.OpenFile
   If Not (s Is Nothing) Then
      sk.Save(sk, s)
      s.Close()
   End If
End If
See Also

Reference

SheetSkin Class
SheetSkin Members
Overload List

User-Task Documentation

Saving a Skin