public static D2DDevice FromHwnd(HWND hwnd) { HANDLE contextHandle = D2D.CreateContext(hwnd); return(new D2DDevice(contextHandle)); }