以前耍winform碰到过闪烁问题,翻了一下,是用BufferedGraphics来解决
BufferedGraphics hostBuffer = new BufferedGraphics //自己管理这块缓冲用的画布
hostBuffer.Graphics.Clear(Form1.BackColor) //背景色刷一下
hostBuffer.Graphics.DrawImage(bmp1) //把你的图刷上去
hostBuffer.Graphics.DrawImage(bmp2) //把你的图刷上去
hostBuffer.Render(Form1.CreateGraphics) //最后再拱到窗体画布上
来wpf啦什么闪烁天生就不存在的
