private void OptimiseDesign(object sender, RoutedEventArgs e) { Button b = sender as Button; ViewModel vm = this.DataContext as ViewModel; AutoDesign AD = new AutoDesign() { SizeToContent = SizeToContent.WidthAndHeight, Owner = Application.Current.MainWindow, WindowStartupLocation = WindowStartupLocation.CenterOwner, DataContext = vm }; AD.Show(); }
private void OptimiseDesign(object sender, RoutedEventArgs e) { Button b = sender as Button; ViewModel vm = this.DataContext as ViewModel; /*DesignOptimisation designO = new DesignOptimisation(vm.SelectedColumn); * if (designO.newDesign) * vm.SelectedColumn = designO.column;*/ AutoDesign AD = new AutoDesign() { SizeToContent = SizeToContent.WidthAndHeight, Owner = System.Windows.Application.Current.MainWindow, WindowStartupLocation = WindowStartupLocation.CenterOwner, DataContext = vm }; AD.Show(); }