Ejemplo n.º 1
0
        public GenerateSheetMetalDrawingsWindow()
        {
            InitializeComponent();
            ViewModel = new GenerateSheetMetalDrawingsViewModel();

            // TODO find a better solution: don't reuse the window, then there's also no need to intercept the closing event.
            // see http://msdn.microsoft.com/en-us/library/aa972163.aspx
            // and http://stackoverflow.com/a/848106/2314596

            Closing +=
                (sender, e) =>
            {
                e.Cancel = true;
                Hide();
            };
        }
        public GenerateSheetMetalDrawingsWindow()
        {
            InitializeComponent();
            ViewModel = new GenerateSheetMetalDrawingsViewModel();

            // TODO find a better solution: don't reuse the window, then there's also no need to intercept the closing event.
            // see http://msdn.microsoft.com/en-us/library/aa972163.aspx
            // and http://stackoverflow.com/a/848106/2314596

            Closing +=
                (sender, e) =>
                {
                    e.Cancel = true;
                    Hide();
                };
        }