Пример #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            Container container = new Container(x =>
                                                { x.For <IModelList>().Use <ModelList>(); x.For <IXamlScriptGenerator>().Use <XamlScriptGenerator>(); });
            var window = container.GetInstance <MainView>();

            window.DataContext = container.GetInstance <ViewModel>();
            window.Top         = (SystemParameters.FullPrimaryScreenHeight - window.Height) / 2;
            window.Left        = 0;
            window.WindowState = WindowState.Minimized;
            window.Show();
            var minwindow = new MinimizeWindow();

            minwindow.Top  = (SystemParameters.FullPrimaryScreenHeight - minwindow.Height) / 2;
            minwindow.Left = 0;

            minwindow.Show();
        }
Пример #2
0
 private void ExecuteMinimizeWindow()
 {
     MinimizeWindow.Invoke();
 }