public MainPage()
        {
            this.InitializeComponent();

            ViewModel = new CalculatorExtensionsViewModel();
            ViewModel.Init(typeof(FuelCalculatorExtension), typeof(TemperatureConversionExtension));
            calculatorExtensionsUC.ViewModel = ViewModel;
        }
Exemple #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));
        }