<?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. Gcc 的使用

    Gcc 的使用前言  编译器在编译过程中,先将程序代码编译成 object 文件,然後再和程序库联结,成为可执行文件.因此一个编译器须提供的参数主要有几类:  1.指定编译器编出的object 文件或 ...

  2. PatentTips - Sprite Graphics Rendering System

    BACKGROUND This disclosure relates generally to the field of computer graphics. More particularly, b ...

  3. [React] Use Jest's Snapshot Testing Feature

    Often when testing, you use the actual result to create your assertion and have to manually update i ...

  4. Qt5.4.2编译 qtpropertybrowser-2.51(从4修改到5的除错过程)

    qtpropertybrowser是一个洛基亚时代的一个产物,其实它就是QtDesigner侧栏那种样子而已.网上大部分的都只适用于Qt4,今天头脑发热想用Qt5编译一下,发觉一大堆错误,因为Qt4有 ...

  5. PHP正则表达式怎么匹配多行

    PHP正则表达式怎么匹配多行 一.总结 1.可以用匹配模式修饰符s来使点匹配所有字符,包括换行符. 二.PHP匹配多行的正则表达式分析 代码如下: <table> <tr>&l ...

  6. Watchdog机制概述

    1. Watchdog初始 Watchdog的中文的“看门狗”,有保护的意思.最早引入Watchdog是在单片机系统中,由于单片机的工作环境容易受到外界磁场的干扰,导致程序“跑飞”,造成整个系统无法正 ...

  7. 【p093】细胞分裂

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] Hanks博士是BT(Bio-Tech,生物技术)领域的知名专家.现在,他正在为一个细胞实验做准备工作 ...

  8. api的管理工具

    一.常用的api管理工具和测试的方法 1.postman 2.Yapi 3.swagger 4.Rap(阿里)

  9. matlab 高级函数 —— colfilt/blockproc (图像)矩阵的分块处理

    colfilt 执行功能与 blockproc/nlfilter 类似,但效率更高. B = colfilt(A,[m n],block_type,fun),block_type:distinct/s ...

  10. LoadFromStr的使用中出现错误“未结束的字符串常量”

    最近遇到个奇怪的问题,就是关于js参数中待换行符时,出现了错误“为结束的字符串常量”. 解决方法是:不直接将该数据以参数形式传递,而是先将其赋值在一个隐藏的文本内,需要调用的函数里只需读取该文本里的内 ...