public static void ResizePopupWindowOnDifferentResoultion(Window _clsWindow, double _dblBaseWidthWrt1920, double _dblBaseHeightWrt1200) { if (BaseWindowActualWidth == 0) { if ((System.Windows.SystemParameters.PrimaryScreenWidth / System.Windows.SystemParameters.PrimaryScreenHeight) > CstGenericCosntantsRepository.cdblMAIN_WINDOW_ASPECT_RATIO) { _dblBaseWindowActualHeight = System.Windows.SystemParameters.PrimaryScreenHeight; BaseWindowActualWidth = _dblBaseWindowActualHeight * (CstGenericCosntantsRepository.cdblMAIN_WINDOW_ASPECT_RATIO); } else if ((System.Windows.SystemParameters.PrimaryScreenWidth / System.Windows.SystemParameters.PrimaryScreenHeight) <= CstGenericCosntantsRepository.cdblMAIN_WINDOW_ASPECT_RATIO) { BaseWindowActualWidth = System.Windows.SystemParameters.PrimaryScreenWidth; _dblBaseWindowActualHeight = BaseWindowActualWidth / (CstGenericCosntantsRepository.cdblMAIN_WINDOW_ASPECT_RATIO); } } _clsWindow.Width = _dblBaseWidthWrt1920 * (BaseWindowActualWidth / CstGenericCosntantsRepository.cdblMAIN_WINDOW_WIDTH); _clsWindow.Height = _dblBaseHeightWrt1200 * (BaseWindowActualHeight / CstGenericCosntantsRepository.cdblMAIN_WINDOW_HEIGHT); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)