コード例 #1
0
        public AddEditPipeClassDialog()
        {
            InitializeComponent();

            PipeClassViewModel viewModel = new PipeClassViewModel();
            viewModel.View = this;
            DataContext = viewModel;
        }
コード例 #2
0
        public AddEditPipeClassDialog(int pipeClassId)
        {
            InitializeComponent();

            PipeClassViewModel viewModel = new PipeClassViewModel(pipeClassId);
            viewModel.View = this;
            viewModel.DataLoaded += () =>
                {
                    DataContext = viewModel;
                    Utils.ResetOriginalValues(this);
                };
        }