public AddEnvironmentDialog(IEnumerable <EnvironmentViewBase> pages, EnvironmentViewBase selected) { if (pages == null) { throw new ArgumentNullException(nameof(pages)); } DataContext = new AddEnvironmentView(pages, selected); InitializeComponent(); }
public AddEnvironmentDialog(IEnumerable <EnvironmentViewBase> pages, EnvironmentViewBase selected) { if (pages == null) { throw new ArgumentNullException(nameof(pages)); } DataContext = new AddEnvironmentView(pages, selected); IsLandscape = Utilities.IsLandscape; var startWidth = Math.Min(SystemParameters.PrimaryScreenWidth, IsLandscape ? 1024 : 700); var startHeight = Math.Min(SystemParameters.PrimaryScreenHeight, IsLandscape ? 700 : 1024); WindowWidth = startWidth; WindowHeight = startHeight; MinimumWindowWidth = WindowWidth; MinimumWindowHeight = WindowHeight; InitializeComponent(); }