public MainPage() { this.InitializeComponent(); ViewModel = new CalculatorExtensionsViewModel(); ViewModel.Init(typeof(FuelCalculatorExtension), typeof(TemperatureConversionExtension)); calculatorExtensionsUC.ViewModel = ViewModel; }
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)); }