コード例 #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            bindingSource.DataSource = _viewModel;

            ViewModelValidator.AttachControlDecoratorsRecursive <WorldVariableViewModel, TextBox, TextBoxDecorator>(_viewModel, this);
            ViewModelValidator.AttachToolTipRecursive <WorldVariableViewModel, TextBox>(_viewModel, this, toolTip);
            ViewModelValidator.AttachToolTip(_viewModel, pictureBoxValidationError, toolTip);

            _viewModel.Validate();

            ActiveControl = promptTextBoxName;
        }