■ XAML 객체 구하기 (Stream 사용)

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

using System.IO;

using System.Windows.Markup;

 

#region XAML 객체 구하기 - GetXAMLObject<T>(stream)

 

/// <summary>

/// XAML 객체 구하기

/// </summary>

/// <typeparam name="T">XAML 객체 타입</typeparam>

/// <param name="stream">스트림</param>

/// <returns>XAML 객체</returns>

public T GetXAMLObject<T>(Stream stream)

{

    return (T)(XamlReader.Load(stream));

}

 

#endregion

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

Posted by 사용자 icodebroker
TAG