■ InkCanvas 클래스 : ISF 데이터 저장하기

----------------------------------------------------------------------------------------------------

using System.IO;

using System.Windows.Controls;

 

#region 데이터 저장하기 - SaveISFData(inkCanvas, filePath)

 

/// <summary>

/// 데이터 저장하기

/// </summary>

/// <param name="inkCanvas">InkCanvas 객체</param>

/// <param name="filePath">파일 경로</param>

public void SaveISFData(InkCanvas inkCanvas, string filePath)

{

    FileStream fileStream = null;

 

    try

    {

        fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write);

 

        inkCanvas.Strokes.Save(fileStream);

    }

    finally

    {

        if(fileStream != null)

        {

            fileStream.Close();

        }

    }

}

 

#endregion

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요