StrokeCollection.Save 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
를 저장합니다 StrokeCollection.
오버로드
| Name | Description |
|---|---|
| Save(Stream) |
지정된 StrokeCollection에 Stream 저장합니다. |
| Save(Stream, Boolean) |
지정된 경우 StrokeCollection 지정된 Stream 값을 저장하고 압축합니다. |
Save(Stream)
지정된 StrokeCollection에 Stream 저장합니다.
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 ISF(Ink Serialized Format)로 저장 StrokeCollection 합니다.
적용 대상
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
true 압축하려면 ;이고 StrokeCollection, 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 ISF(Ink Serialized Format)로 저장 StrokeCollection 합니다.