Interaction logic for BuiltInParamSelectorView.xaml
Exemplo n.º 1
0
 public void CustomizeView(BuiltInParamSelector model, NodeView nodeView)
 {
     DynamoModel                = nodeView.ViewModel.DynamoViewModel.Model;
     DynamoViewmodel            = nodeView.ViewModel.DynamoViewModel;
     SyncContext                = new DispatcherSynchronizationContext(nodeView.Dispatcher);
     ViewModel                  = model;
     ViewModel.EngineController = nodeView.ViewModel.DynamoViewModel.EngineController;
     View = new BuiltInParamSelectorView();
     nodeView.inputGrid.Children.Add(View);
     View.DataContext = model;
     model.RequestChangeBuiltInParamSelector += new Action(UpdateParameterSelector);
     this.UpdateParameterSelector();
 }
Exemplo n.º 2
0
        public void CustomizeView(BuiltInParamSelector model, NodeView nodeView)
        {
            if (nodeView?.Dispatcher == null)
            {
                return;
            }

            _dynamoViewmodel            = nodeView.ViewModel.DynamoViewModel;
            _syncContext                = new DispatcherSynchronizationContext(nodeView.Dispatcher);
            _viewModel                  = model;
            _viewModel.EngineController = nodeView.ViewModel.DynamoViewModel.EngineController;
            _view = new BuiltInParamSelectorView();
            nodeView.inputGrid.Children.Add(_view);
            _view.DataContext = model;
            model.RequestChangeBuiltInParamSelector += UpdateParameterSelector;
            UpdateParameterSelector();
        }