Esempio n. 1
0
        public GenerateSubassemblyDrawingsWindow()
        {
            InitializeComponent();
            ViewModel = new GenerateSubassemblyDrawingsViewModel();

            // 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 GenerateSubassemblyDrawingsWindow()
        {
            InitializeComponent();
            ViewModel = new GenerateSubassemblyDrawingsViewModel();

            // 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();
                };
        }