最近在项目中使用到DrawingContext.DrawRectangle画图
using system.windows.Media
using(DrawingContext drawContext=RenderOpen())
{
drawContext.DrawRectangle(Brushes.Transparent,Pen(Brushs.White,2),new Rect(0,0,20,20));
//得到的是一个黑色框,说明WIN10中默认背景色为黑色
//现在我想得到白色框 方法如下
drawContext.DrawRectangle(Brushes.White,Pen(Brushs.White,2),new Rect(0,0,20,20));
}