private static void SetWindowSize (GenericElementHostWindow window, double ratioToCurrentScreensize)
{
var screenSize = Screen.FromControl (window).Bounds;
window.Size = new Size (
(int) (screenSize.Size.Width * ratioToCurrentScreensize),
(int) (screenSize.Size.Height * ratioToCurrentScreensize));
}
}