Exemplo n.º 1
0
        public searchTool()
        {
            InitializeComponent();
            var viewModel = new searchTool_ModelView();
            this.DataContext = viewModel;

            viewModel.NewToolRequested += (s, a) =>
            {
                NewTool newToolWindow = new NewTool();
                newToolViewModel = newToolWindow.DataContext as NewTool_ViewModel;
                newToolViewModel.ToolInserted += (so, ar) =>
                {
                    viewModel.selectedTool = so as ToolRepresentation;
                    viewModel.OnToolSelected();
                    newToolWindow.Close();
                };
                newToolWindow.Show();
            };
        }
Exemplo n.º 2
0
 public NewTool()
 {
     InitializeComponent();
     var viewModel = new NewTool_ViewModel();
     this.DataContext = viewModel;
 }