StrokeCollection.Save 메서드

정의

StrokeCollection을 저장합니다.

오버로드

Save(Stream)

지정한 StrokeCollectionStream을 저장합니다.

Save(Stream, Boolean)

지정된 경우 StrokeCollection을 지정한 Stream에 저장하고 압축합니다.

Save(Stream)

지정한 StrokeCollectionStream을 저장합니다.

public:
 void Save(System::IO::Stream ^ stream);
public void Save (System.IO.Stream stream);
member this.Save : System.IO.Stream -> unit
Public Sub Save (stream As Stream)

매개 변수

stream
Stream

Stream를 저장할 StrokeCollection입니다.

예제

다음 예제에 저장 하는 방법을 보여 줍니다.는 StrokeCollection 를 사용 하 여 파일에는 Save(Stream, Boolean) 메서드. 이 예제에서는 있다고 가정를 InkCanvas 호출 inkCanvas1합니다.

private void SaveStrokes_Click(object sender, RoutedEventArgs e)
{
    FileStream fs = null;

    try
    {
        fs = new FileStream(inkFileName, FileMode.Create);
        inkCanvas1.Strokes.Save(fs);
    }
    finally
    {
        if (fs != null)
        {
            fs.Close();
        }
    }
}
Private Sub SaveStrokes_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)

    Dim fs As FileStream = Nothing

    Try
        fs = New FileStream(inkFileName, FileMode.Create)
        inkCanvas1.Strokes.Save(fs)
    Finally
        If Not fs Is Nothing Then
            fs.Close()
        End If
    End Try

End Sub

설명

합니다 Save 메서드 저장 된 StrokeCollection 로 잉크 직렬화 형식 ISF ().

적용 대상

Save(Stream, Boolean)

지정된 경우 StrokeCollection을 지정한 Stream에 저장하고 압축합니다.

public:
 virtual void Save(System::IO::Stream ^ stream, bool compress);
public virtual void Save (System.IO.Stream stream, bool compress);
abstract member Save : System.IO.Stream * bool -> unit
override this.Save : System.IO.Stream * bool -> unit
Public Overridable Sub Save (stream As Stream, compress As Boolean)

매개 변수

stream
Stream

Stream를 저장할 StrokeCollection입니다.

compress
Boolean

StrokeCollection을 압축하려면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에 저장 하는 방법을 보여 줍니다.는 StrokeCollection 를 사용 하 여 파일에는 Save(Stream, Boolean) 메서드. 이 예제에서는 있다고 가정를 InkCanvas 호출 inkCanvas1합니다.

private void SaveStrokes_Click(object sender, RoutedEventArgs e)
{
    FileStream fs = null;

    try
    {
        fs = new FileStream(inkFileName, FileMode.Create);
        inkCanvas1.Strokes.Save(fs);
    }
    finally
    {
        if (fs != null)
        {
            fs.Close();
        }
    }
}
Private Sub SaveStrokes_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)

    Dim fs As FileStream = Nothing

    Try
        fs = New FileStream(inkFileName, FileMode.Create)
        inkCanvas1.Strokes.Save(fs)
    Finally
        If Not fs Is Nothing Then
            fs.Close()
        End If
    End Try

End Sub

설명

합니다 Save 메서드 저장 된 StrokeCollection 로 잉크 직렬화 형식 ISF ().

적용 대상