<?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. Fragment之一:基本原理 分类: H1_ANDROID 2013-11-18 14:15 1642人阅读 评论(0) 收藏

    1.低版本API对Fragment的支持 Fragment必须被加载进Acitivity中,才能呈现.而在低于3.0版本的API中,由于不存在Fragment,因此必须使用support包: (1)对 ...

  2. 逐步把Nginx及Redis引入项目组之负载均衡技术调研初版总结

    本篇以一个Nginx服务.两个Tomcat服务.一个Redis搭建一个负载均衡环境,由于就一台电脑暂以随机分配client请求策略开展,详细工作中推荐以IP地址来实现client请求的动态负载策略.省 ...

  3. xv6 gdb

    The "remote" target does not support "run". https://sourceware.org/gdb/onlinedoc ...

  4. 忙里偷闲( ˇˍˇ )闲里偷学【C语言篇】——(6)动态内存分配

    一.传统数组的缺点: 1.数组的长度必须事先定制,且只能是常整数,不能是变量 int len = 5; int a[len]; //error 2.传统形式定义的数组,该程序的内存程序员无法手动释放 ...

  5. [Ramda] R.project -- Select a Subset of Properties from a Collection of Objects in Ramda

    In this lesson we'll take an array of objects and map it to a new array where each object is a subse ...

  6. bat文件从@含义起

    今天看到一个批处理文件,内容很简单,执行很方便,学习了一下才知道就是一条条的dos命令, 掌握其中的几个常用命令能看懂别人的文件就行了 1.@ 一般紧随其后 类似@echo off 其作用类似于ech ...

  7. 【物理】概念的理解 —— Phase(相位)

    Phase is the position of a point in time (an instant) on a waveform cycle. 相位指的是波形周期中点在某一时刻的位置.Phase ...

  8. 【codeforces 779C】Dishonest Sellers

    [题目链接]:http://codeforces.com/contest/779/problem/C [题意] 有n个商品; 打折前买和打折后买的价格不一样; 且必须有至少k个商品在打折前买; 问你买 ...

  9. PHP基本的文件和文件夹操作常用的汇总

    资源:http://www.ido321.com/835.html 一.基本文件的操作 文件的基本操作有:文件推断.文件夹推断.文件大小.读写性推断.存在性推断及文件时间等 1: <?php 2 ...

  10. General-Purpose Operating System Protection Profile

    1 Protection Profile Introduction   This document defines the security functionality expected to be ...