public ScreenHelper() { //计算出屏幕缩放比例,640是你的UI原始设计图的高度 flag = App.ScreenWidth / 640.0; px = new PIXEL(); m = new MARGIN(); }
public SizeHelper() { //计算出屏幕缩放比例,640是你的UI原始设计图的高度 flag = 1; //App.ScreenWidth / 720.0; px = new PIXEL(); m = new MARGIN(); }
private void extendFrameIntoClientArea() { var margin = new MARGIN { cxLeftWidth = this.X, cxRightWidth = this.Width, cyBottomHeight = this.Height, cyTopHeight = this.Y }; DwmApi.DwmExtendFrameIntoClientArea(this.Handle, ref margin); }
public static extern void DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGIN pMargins);