public StopsPage(Route route) { InitializeComponent(); BindingContext = this._viewModel = new StopsViewModel(route, StkDir); _viewModel.ChangeDirection(route.Directions.FirstOrDefault()); }
private void OnDirectionChanged(object sender, EventArgs e) { var direction = (sender as Button).BindingContext as Direction; if (direction != null) { _viewModel.ChangeDirection(direction); } }