Example #1
0
        public MainViewModel(int visibleItems) : base()
        {
            Title                    = "Demo App";
            GreetingsTraveler        = ViewModelFactory.NewList(new GreetingsTravelerSection(), visibleItems);
            CardGameProject          = ViewModelFactory.NewList(new CardGameProjectSection(), visibleItems);
            SocialMedia              = ViewModelFactory.NewList(new SocialMediaSection());
            Contact                  = ViewModelFactory.NewList(new ContactSection());
            PlacesToLearnProgramming = ViewModelFactory.NewList(new PlacesToLearnProgrammingSection(), visibleItems);
            Learning                 = ViewModelFactory.NewList(new LearningSection(), visibleItems);

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