Пример #1
0
        public PinnedSectionViewModel(Data.MainDataSource source,
                                      ForumSectionViewModel forumViewModel) : base()
        {
            _source                = source;
            _viewmodel             = forumViewModel;
            _viewmodel.DataLoaded += new EventHandler(OnForumDataLoaded);

            PinnedItemsManager.PinnedStatusChanged += PinnedItemsManager_PinnedStatusChanged;
            this.UpdateStatus("Tap and hold your favorite forums to pin them here.");
        }
Пример #2
0
        private List <HomePageSection> CreateItems()
        {
            var forums    = new ForumSectionViewModel(Data.MainDataSource.Instance);
            var bookmarks = new BookmarkSectionViewModel(Data.MainDataSource.Instance);
            var pinned    = new PinnedSectionViewModel(Data.MainDataSource.Instance, forums);

            _items = new List <HomePageSection>()
            {
                new HomePageSection("forums")
                {
                    Content = forums, Command = forums
                },
                new HomePageSection("bookmarks")
                {
                    Content = bookmarks, Command = bookmarks
                },
                new HomePageSection("pinned")
                {
                    Content = pinned, Command = pinned
                }
            };

            return(_items);
        }