private void DrawStuff()
{
//
//if (buffer == null)
//{
// buffer = new RenderTargetBitmap((int)Background.Width, (int)Background.Height, 96, 96, PixelFormats.Pbgra32);
// Background.Source = buffer;
// return;
//}
//using (DrawingContext drawingContext = drawingVisual.RenderOpen())
//{
// drawingContext.DrawRectangle(new SolidColorBrush(Colors.Red), null, new Rect(0, 0, 10, 10));
//}
//buffer.Render(drawingVisual);
} private void DrawImage() {
//
// layoutDocumentMapContainer
//if (dockPanelMapContainer.ActualWidth <1 || dockPanelMapContainer.ActualHeight < 1 || this.Background == null)
//{
// return;
//}
//using (Bitmap bitmap = new Bitmap((int)dockPanelMapContainer.ActualWidth, (int)dockPanelMapContainer.ActualHeight))
//{
// this.Background.Visibility = Visibility.Visible;
// this.Background.Width = (double)bitmap.Width;
// this.Background.Height = (double)bitmap.Height;
// Graphics graphics = Graphics.FromImage(bitmap);
// graphics.FillRectangle(new System.Drawing.SolidBrush(System.Drawing.Color.Blue), new RectangleF(0, 0, (float)(dockPanelMapContainer.ActualWidth - 0), (float)(dockPanelMapContainer.ActualHeight - 0)));
// MemoryStream memoryStream = new MemoryStream();
// bitmap.Save(memoryStream, ImageFormat.Png);
// memoryStream.Position = 0L;
// BitmapImage bitmapImage = new BitmapImage();
// bitmapImage.BeginInit();
// bitmapImage.StreamSource = memoryStream;
// bitmapImage.EndInit();
// this.Background.Source = bitmapImage;
// graphics.Dispose();
// graphics = null;
//}
}

最新文章

  1. [LintCode] Best Time to Buy and Sell Stock 买卖股票的最佳时间
  2. c语言中在引用math库后,编译出现错误(.text+0x9c):对‘sqrt’未定义的引用的解决办法
  3. gvim 快速编辑例子
  4. phpinfo() 中 Local Value(局部变量)Master Value(主变量) 的区别
  5. zoj 1789 The Suspects
  6. android ListView和GridView拖拽移位具体实现及拓展
  7. js基础例子
  8. sql server 规则
  9. Handlebars.js 模板引擎
  10. CentOSv6.8 修改防火墙配置、修改SSH端口
  11. 纠错:基于FPGA串口发送彩色图片数据至VGA显示
  12. [SCOI2007]最大土地面积
  13. [AHOI 2016初中组]自行车比赛
  14. 996.ICU与死亡因素
  15. 20175314 《Java程序设计》第八周学习总结
  16. 解决小程序webview缓存机制
  17. Beta冲刺 (3/7)
  18. freeRTOS中文实用教程5--内存管理
  19. ThinkingInJava 学习 之 0000006 复用类
  20. (1)Python3笔记 数据类型之Number与String

热门文章

  1. Java的23种设计模式,详细讲解(三)
  2. PHP中设计模式以及魔术方法
  3. CMD查看redis
  4. (一)创建新的react native 应用程序
  5. Mybatis书写
  6. Windows Cluster失败后,AlwaysOn在残存Server节点上快速恢复DB的详细步骤
  7. 如何在VIM中保存编辑的只读文件
  8. ACM-ICPC 2018 沈阳赛区网络预赛 J. Ka Chang(树上分块+dfs序+线段树)
  9. KMP算法计算next值和nextVal值
  10. 类数组(Array-like)对象应用