dotnet tutorial, c#, wpf, asp.net , wcf.net, silverlight
Published articles on other web sites*
Published articles on other web sites*
WPF vs. Silverlight - Part 2 - XamlReader
XamlReader has different overloads in WPF and Silverlight. Silverlight takes a string. WPF takes a stream to a string.
UIElement element;
#if SILVERLIGHT
element = XamlReader.Load(xaml);
#else
using (MemoryStream xamlStream =
new MemoryStream(UTF8Encoding.Default.GetBytes(xaml)))
element = XamlReader.Load(xamlStream);
#endif
No comments:
Post a Comment