public MainPage()
        {
            this.InitializeComponent();

            ViewModel = new CalculatorExtensionsViewModel();
            ViewModel.Init(typeof(FuelCalculatorExtension), typeof(TemperatureConversionExtension));
            calculatorExtensionsUC.ViewModel = ViewModel;
        }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;

            CalculatorViewModel = new CalculatorViewModel();
            CalculatorViewModel.Init(typeof(Calculator), typeof(SubtractOperation), typeof(SlowAddOperation), typeof(AddOperation));

            CalculatorExtensionsViewModel = new CalculatorExtensionsViewModel();
            CalculatorExtensionsViewModel.Init(typeof(FuelCalculatorExtension), typeof(TemperatureConversionExtension));
        }