public HomePage()
 {
     this.InitializeComponent();
     if (App.AlwaysShowNavigation)
     {
         Home.Visibility = Visibility.Collapsed;
     }
     BlogsListView.ItemsSource = _list_blogs = new CNBlogList();
     _list_blogs.DataLoaded   += _list_blogs_DataLoaded;
     _list_blogs.DataLoading  += _list_blogs_DataLoading;
 }
 public HomePage()
 {
     this.InitializeComponent();
     if (App.AlwaysShowNavigation)
     {
         Home.Visibility = Visibility.Collapsed;
     }
     BlogsListView.ItemsSource = _list_blogs = new CNBlogList();
     _list_blogs.DataLoaded += _list_blogs_DataLoaded;
     _list_blogs.DataLoading += _list_blogs_DataLoading;
 }
Beispiel #3
0
        public MainPage()
        {
            this.InitializeComponent();

            //BindingListView绑定到数据源  数据源自动加载数据
            BindingListView.ItemsSource = _binding_list_blogs = new CNBlogList();

            //手动向UnBindingListView中添加一个与要显示的数据不同的项
            ListViewItem different_item = new ListViewItem();
            different_item.Content = "我是单独不同的一项";
            different_item.HorizontalContentAlignment = HorizontalAlignment.Center;
            UnBindingListView.Items.Add(different_item);

            //手动向UnBindingListView中添加一个按钮项  点击手动加载数据
            ListViewItem loading_more = new ListViewItem();
            loading_more.Content = "点击加载更多...";
            loading_more.HorizontalContentAlignment = HorizontalAlignment.Center;
            loading_more.Tapped += loading_more_Tapped;
            UnBindingListView.Items.Add(loading_more);
        }