コード例 #1
0
        public NewsPage()
        {
            InitializeComponent();

            Debug.WriteLine("Starting viewModel");
            RSSFeedViewModelObject = new RSSFeedViewModel(Navigation);
            BindingContext         = RSSFeedViewModelObject;



            // start the first refresh of the listview
            FeedListView.IsRefreshing = true;
            FeedListView.BeginRefresh();

            // add select item event
            FeedListView.ItemSelected += (sender, e) => {
                var item = ((ListView)sender).SelectedItem;
                var feed = (FeedItem)item;


                webview.Source = feed.guid;


                web.IsVisible = true;
            };
        }
コード例 #2
0
 /// <summary>
 /// Creating view
 /// </summary>
 private void CreateView()
 {
     view      = new RSSFeedUserControl();
     viewModel = new RSSFeedViewModel();
     viewModel.ChangeModule = changeModule;
     view.DataContext       = viewModel;
 }
コード例 #3
0
        public RSSReaderPage()
        {
            InitializeComponent();

            RSSFeedViewModelObject = new RSSFeedViewModel(Navigation);


            Title          = "RSS Feeds";
            BindingContext = RSSFeedViewModelObject;
        }
コード例 #4
0
        public RSSReaderPage()
        {
            InitializeComponent();

            Debug.WriteLine("Starting viewModel");
            RSSFeedViewModelObject = new RSSFeedViewModel(Navigation);
            Title          = "ORMAA RSS Feeds";
            BindingContext = RSSFeedViewModelObject;


            // subscribe to event fired when download of RSS Feed is completed.

            //MessagingCenter.Subscribe<Application>(this, "stopActivity", (sender) => {

            //    Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
            //    {
            //         hideWaitAnimation();
            //    });
            //});

            //// subscribe to event fired when download of RSS Feed is started.

            //MessagingCenter.Subscribe<Application>(this, "startActivity", (sender) => {

            //    Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
            //    {
            //        showWaitAnimation();
            //    });
            //});

            // start the first refresh of the listview
            FeedListView.IsRefreshing = true;
            FeedListView.BeginRefresh();

            // add select item event
            FeedListView.ItemSelected += (sender, e) => {
                //((ListView)sender).SelectedItem = null;

                var item = ((ListView)sender).SelectedItem;
                var feed = (FeedItem)item;

                // Create a webview
                //var browser = new WebView
                //{
                //    Source = feed.guid
                //};
                //webview.Children.Add(browser);
                webview.Source = feed.guid;
                //webview.Scale = 0.9;

                web.IsVisible = true;
            };
        }
コード例 #5
0
        public RSSReaderPage(MasterPage Master)
        {
            InitializeComponent();

            FeedView = this.FeedListView;

            RSSFeedViewModelObject = new RSSFeedViewModel(Navigation, Master);

            master = Master;


            Title          = "Avanade Studio TV";
            BindingContext = RSSFeedViewModelObject;

            //Subscibe to insert expenses
            MessagingCenter.Subscribe <string>(this, "Update", (obj) =>
            {
                this.Reload();
            });
        }