Exemple #1
0
 public SearchViewModel() : base()
 {
     Title   = "Barbie App";
     Season1 = ViewModelFactory.NewList(new Season1Section());
     Season2 = ViewModelFactory.NewList(new Season2Section());
     Season3 = ViewModelFactory.NewList(new Season3Section());
     Season4 = ViewModelFactory.NewList(new Season4Section());
     Season5 = ViewModelFactory.NewList(new Season5Section());
     Season6 = ViewModelFactory.NewList(new Season6Section());
     Season7 = ViewModelFactory.NewList(new Season7Section());
 }
        public MainViewModel(int visibleItems) : base()
        {
            Title          = "Barbie App";
            this.SectionAd = new AdvertisingViewModel();
            Season1        = ViewModelFactory.NewList(new Season1Section(), visibleItems);
            Season2        = ViewModelFactory.NewList(new Season2Section(), visibleItems);
            Season3        = ViewModelFactory.NewList(new Season3Section(), visibleItems);
            Season4        = ViewModelFactory.NewList(new Season4Section(), visibleItems);
            Season5        = ViewModelFactory.NewList(new Season5Section(), visibleItems);
            Season6        = ViewModelFactory.NewList(new Season6Section(), visibleItems);
            Season7        = ViewModelFactory.NewList(new Season7Section(), visibleItems);

            if (GetViewModels().Any(vm => !vm.HasLocalData))
            {
                Actions.Add(new ActionInfo
                {
                    Command    = RefreshCommand,
                    Style      = ActionKnownStyles.Refresh,
                    Name       = "RefreshButton",
                    ActionType = ActionType.Primary
                });
            }
        }