Edward_jie

for you, my Hall of Frame

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

    Uri uri = new Uri("background.png", UriKind.Relative);
            var source = new BitmapImage();
            source.CreateOptions = BitmapCreateOptions.None;
            System.Windows.Resources.StreamResourceInfo s = Application.GetResourceStream(uri);
            source.SetSource(s.Stream);
            WriteableBitmap bmp = new WriteableBitmap(source);

原文链接:http://www.wannabedeveloper.com/writeablebitmap-invalid-pointer-from-constructor/

posted on 2012-09-12 11:44  Edward_诺  阅读(214)  评论(0编辑  收藏  举报