Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. public void LoadPhotoResources(string relativeUriString)
  2.         {
  3.             Uri uri = new Uri(relativeUriString, UriKind.Relative);
  4.             StreamResourceInfo sri = Application.GetResourceStream(uri);
  5.             BitmapImage bi = new BitmapImage();
  6.             bi.SetSource(sri.Stream);
  7.             WriteableBitmap wb = new WriteableBitmap(bi);
  8.             imageElement.Source = target; //<image>
  9.             wb = null;
  10.             bi = null;
  11.             sri = null;
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement