<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:App30"
             x:Class="App30.MainPage">
    <StackLayout>
    <ListView x:Name="myListView" ItemSelected="myListView_ItemSelected" ItemTapped="myListView_ItemTapped"
              Refreshing="myListView_Refreshing"></ListView>
        <Button Text="Refresh" Clicked="Button_Clicked"></Button>
    </StackLayout>
</ContentPage>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace App30
{
 public partial class MainPage : ContentPage
 {
  public MainPage()
  {
   InitializeComponent();
            myListView.ItemsSource = new string[]
            {
                "zhangsan","lisi","wangwu","zhaoliu"
            };
            myListView.IsPullToRefreshEnabled = true;
  }
        private void myListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            //DisplayAlert("你选择了", e.SelectedItem.ToString(), "Ok");
        }
        private void myListView_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            DisplayAlert("你选择了", e.Item.ToString(), "Ok");
        }
        private void myListView_Refreshing(object sender, EventArgs e)
        {
            myListView.ItemsSource = new string[]
           {
                "abc","123","hij","888"
           };
            myListView.EndRefresh();
        }
        private void Button_Clicked(object sender, EventArgs e)
        {
            myListView.BeginRefresh();
        }
    }
}

XF 列表视图事件的更多相关文章

  1. XF 列表视图分组列表填充

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threa ...

  2. XF 列表视图绑定集合

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threa ...

  3. delphi列表视图组件(TListView)使用方法|实例

    TListView 组件以多种形式显示列表的项目,如详细资料.小图标.大图标等形式表示列表中的项目.    列表视图与用TListBox 组件实现的列表框非常相似.不同的是,列表视图可以让用户选择不同 ...

  4. WorldWind源码剖析系列:插件列表视图类PluginListView和插件列表视图项类PluginListItem

    WorldWind中的插件类是个庞大的类,可以说从软件设计层面上统筹可扩展的插件体系的设计思想是WorldWind中的精华,值得学习和借鉴.插件体系中的所用到的类可以分为两大类,一类是插件类Plugi ...

  5. VS2010/MFC编程入门之二十八(常用控件:列表视图控件List Control 上)

    前面一节中,鸡啄米讲了图片控件Picture Control,本节为大家详解列表视图控件List Control的使用.      列表视图控件简介 列表视图控件List Control同样比较常见, ...

  6. MFC编程入门之二十八(常用控件:列表视图控件List Control上)

    前面一节中,讲了图片控件Picture Control,本节为大家详解列表视图控件List Control的使用. 列表视图控件简介 列表视图控件List Control同样比较常见,它能够把任何字符 ...

  7. MFC常用控件之列表视图控件(List Control)

    近期学习了鸡啄米大神的博客,对其中的一些知识点做了一些自己的总结.不过,博客内容大部分来自鸡啄米.因此,这个博客算是转载博客,只是加了一些我自己的理解而已.若想学习鸡啄米大神的博客总结,请点击连接:h ...

  8. 滚动视图、列表视图[ListView、SimpleAdapter类]

    滚动视图 <ScrollView android: layout_width="fill_parent" android: layout_height="fill_ ...

  9. Filter List Views 筛选器列表视图

    In this lesson, you will learn how to filter a List View. Three techniques, based on different scena ...

随机推荐

  1. SAP 中的popup dialog (弹出对话框) 常见实现方法

      方法1: FM:POPUP_TO_CONFIRM(标准对话弹出消息) 有三个button:YES-NO-CANL,可进行对应的逻辑推断 可设定标题,描写叙述问题,不方便对文本进行换行等排版,不能改 ...

  2. Docker CE for Windows安装使用

    原文:Docker CE for Windows安装使用 官网下载并安装Docker CE for Windows IDEA连接Docker Docker一些常用命令 Docker for windo ...

  3. request与response对象详述

    request与response对象. 1. request代表请求对象 response代表的响应对象. 学习它们我们可以操作http请求与响应. 2.request,response体系结构. 在 ...

  4. Python 网络爬虫与信息获取(一)—— requests 库的网络爬虫

    1. 安装与测试 进入 cmd(以管理员权限),使用 pip 工具,pip install requests 进行安装: 基本用法: >> import requests >> ...

  5. 如何使用Name对象,包括WorkspaceNames和DatasetNames

    转自chanyinhelv原文 如何使用Name对象,包括WorkspaceNames和DatasetNames 第一原文链接 该博主还有很多有关arcgis二次开发的不错的文章. 如何使用Name对 ...

  6. js进阶 11-1 jquery中的页面内容操作的三个方法

    jquery中的页面内容操作的三个方法 一.总结 一句话总结:记三个方法即可.text,html,val.因为这里是方法,所以设置值的是后面方法的参数. 1.jquery中的页面内容操作的三个方法? ...

  7. cordova之File Transfer (Permission denied) 权限导致下载失败 - 简书

    原文:cordova之File Transfer (Permission denied) 权限导致下载失败 - 简书 在文件上传时,由于权限问题,会报错(Permission denied),安卓6. ...

  8. sublime 内容高级搜索

    在发展中经常需要搜索内表面的文件.更好地想找到$video->getTitle() 在该文件中使用的表面.好了,这个时候就需要使用高级搜索功能,的操作,如以下: ctrl+shif+f纽带 例如 ...

  9. 给定正整数n,计算出n个元素的集合{1,2,....,n}能够划分为多少个不同的非空集合

    给定正整数n,计算出n个元素的集合{1,2,....,n}能够划分为多少个不同的非空集合 附源码: #include<iostream> using namespace std; int ...

  10. Druid 专题

    数据源配置: #datasource #Introductions: https://github.com/alibaba/druid/wiki/DruidDataSource%E9%85%8D%E7 ...