public Vector2 GetTargetImageSize() { var windowWidth = Window.Current.Bounds.Width; var windowHeight = Window.Current.Bounds.Height; var height = Math.Min(windowWidth * (1 / _listItemAspectRatio), windowHeight - 200); var width = _listItemAspectRatio * height; var maxWidth = ResourcesHelper.GetDimentionInPixel("MaxWidthOfDetails"); if (width >= maxWidth) { width = maxWidth; height = width / _listItemAspectRatio; } return(new Vector2((float)width, (float)height)); }
private Vector2 GetTargetSize() { var windowWidth = Window.Current.Bounds.Width; var windowHeight = Window.Current.Bounds.Height; var height = Math.Min(windowWidth * (2f / 3f), windowHeight - 200); var width = 1.5f * height; var maxWidth = ResourcesHelper.GetDimentionInPixel("MaxWidthOfDetails"); if (width >= maxWidth) { width = maxWidth; height = width / 1.5f; } return(new Vector2((float)width, (float)height + 100f)); }