public void set_VM(VMFlight viewModel) { vm = viewModel; DataContext = vm; this.controlsDisplay.DataContext = vm; this.Bing_Map.DataContext = vm; this.JoystickSliders.DataContext = vm; }
public Home() { InitializeComponent(); model = new FlightModel(); vm = new VMFlight(model); timer = new DispatcherTimer(); timer.Tick += new EventHandler(Timer_Tick); timer.Interval = TimeSpan.FromSeconds(3); }