コード例 #1
0
        public HomeViewModel(IMvxNavigationService navigationService,
                             GardianAppContext appContext,
                             NavCommand navCommand,
                             ShareCommand shareCommand)
        {
            this.appContext     = appContext;
            appContext.Settings = new AppSettings("All News", string.Empty);
            appContext.SaveSettings(appContext.Settings);

            //Command
            GoToNewsDetailsCommand = new GoToNewsDetailsCommand(navigationService);
            NavMenuTriggerCommand  = new MvxCommand(NavPanelTrigger);
            NavCommand             = navCommand;
            ShareCommand           = shareCommand;

            PageTitle      = "All News";
            IsPaneOpen     = true;
            NewsCollection = new ObservableCollection <StoryHeader>();

            ProgressRingIsActive   = true;
            ProgressRingVisibility = true;
            Initialize();
        }
コード例 #2
0
 public override void Prepare(string parameter)
 {
     appContext.Settings = new AppSettings(PageTitle, parameter);
     appContext.SaveSettings(appContext.Settings);
     InitializeSelectedItem();
 }