private void InitializePage() { ViewModel = new MainViewModel(); DataContext = ViewModel; PreviousPivotPage = MainPivotPage.None; ViewModel.Initialize(); SetApplicationBarForPivot(); }
private void SetApplicationBarForPivot(MainPivotPage pivotPage = MainPivotPage.Participants) { if (PreviousPivotPage != pivotPage) { switch (pivotPage) { case MainPivotPage.Participants: ApplicationBar = AppBarBuilder.Participants.GetAppBarPivotParticipants(this); break; case MainPivotPage.Food: ApplicationBar = AppBarBuilder.Food.GetAppBarPivotFood(this); break; case MainPivotPage.Sum: ApplicationBar = AppBarBuilder.Sum.GetAppBarPivotSum(this); break; } } PreviousPivotPage = pivotPage; }