Example #1
0
        private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            this.DataContext = ViewModel.Instance;
            ViewModel.Instance.PropertyChanged += ViewModel_PropertyChanged;

            ViewModel.Instance.SetUpdateNowPlayingProgress(true);
            Window.Current.VisibilityChanged += Window_VisibilityChanged;
        }
Example #2
0
        private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            var parameters = ((string)e.NavigationParameter).Split('|');

            bool canChangeSelected;
            if (parameters.Count() > 1 && bool.TryParse(parameters[1], out canChangeSelected))
                ((FilterViewModelsToPivotItemsConverter)this.Resources["FilterViewModelsToPivotItemsConverter"]).CanChangeSelected = canChangeSelected;
            
            var dataContext = ViewModel.Instance.Filters.Where(p => p.GetType().Name == parameters[0]);

            bool goBackAfterClick;
            if (parameters.Count() > 2 && bool.TryParse(parameters[2], out goBackAfterClick) && goBackAfterClick)
                ((FilterViewModelsToPivotItemsConverter)this.Resources["FilterViewModelsToPivotItemsConverter"]).GoBackAfterClick = goBackAfterClick;


            if (!dataContext.Any())
                this.NavigationHelper.GoBack();
            else
                this.DataContext = dataContext;
        }
Example #3
0
 private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     this.DataContext = ViewModel.Instance;
 }
 private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
  //   this.DataContext = await ViewModel.Instance.GetArtistViewModel((string)e.NavigationParameter);
    // if (this.DataContext == null)
      //   this.NavigationHelper.GoBack();
 }
Example #5
0
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     this.DataContext = await ViewModel.Instance.GetGenreViewModel((string)e.NavigationParameter);
 }
Example #6
0
 void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     Exception = (Exception)e.PageState["Exception"];
 }
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     this.DataContext = await ViewModel.Instance.GetAlbumCoverFetchViewModel((string)e.NavigationParameter);
     if (this.DataContext == null)
         this.NavigationHelper.GoBack();
 }
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     this.DataContext = await ViewModel.Instance.GetSaveNewPlaylistViewModel();
 }