public MainVM(IFlightSimulatorModel m) { model = m; model.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) { NotifyPropertyChanged("VM" + e.PropertyName); }; // Initialize other view models WheelViewModel = new WheelVM(model); DashboardViewModel = new DashboardVM(model); MapViewModel = new MapVM(model); Ip = ConfigurationManager.AppSettings.Get("ip"); Port = int.Parse(ConfigurationManager.AppSettings.Get("port")); }
public void SetViewModel(DashboardVM dashboardVM) { dashboardViewModel = dashboardVM; DataContext = dashboardViewModel; }