预览
代码
手机端效果
web端效果
                                 
                             | 
                            
                                 
                             | 
                        
demoListView.cs
demoListView.Designer.cs
模板类 listViewTemplate.cs
模板类 listViewTemplate.Designer.cs
模板类 tableTemplate.cs
模板类 tableTemplate.Designer.cs
模板类 editLayout.cs
模板类 editLayout.Designer.cs
web:demoListView.cs
web:demoListView.Designer.cs
web:模板类 demoListViewTemplate.cs
web:模板类 demoListViewTemplate.Designer.cs
web:模板类 demoListViewTemplate1.cs
web:模板类 demoListViewTemplate1.Designer.cs
web:模板类 demoListViewEditTemplate.cs
web:模板类 demoListViewEditTemplate.Designer.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace Smobiler.Tutorials.Components
{
    partial class demoListView : Smobiler.Core.Controls.MobileForm
    {
        public demoListView() : base()
        {
            //This call is required by the SmobilerForm.
            InitializeComponent();
        }
        private void title1_ImagePress(object sender, EventArgs e)
        {
            this.Close();
        }
        private void demoListView_Load(object sender, EventArgs e)
        {
            PopListGroup pg1 = new PopListGroup();
            pg1.AddListItem("DataBind");
            pg1.AddListItem("删除行");
            pg1.AddListItem("清空");
            pg1.AddListItem("新增行");
            pg1.AddListItem("编辑");
            popList1.Groups.Add(pg1);
            DataTable dt = new DataTable();
            dt.Columns.Add("img");
            dt.Columns.Add("id");
            dt.Columns.Add("name");
            dt.Columns.Add("sexual");
            string[] sex = new string[] { "男", "女" };
            string[] pic = new string[] { "boy.png", "girl.png" };
            for (int i = 0; i < 8; i++)
            {
                dt.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
            }
            //listView2绑定数据
            listView2.TemplateControl = new listViewTemplate();
            listView2.DataSource = dt;
            listView2.DataBind();
            //listView3绑定数据
            listView3.TemplateControl = new listViewTemplate();
            listView3.DataSource = dt;
            listView3.DataBind();
            //listView4 绑定数据
            DataTable dt1 = new DataTable();
            dt1.Columns.Add("id");
            dt1.Columns.Add("cb");
            dt1.Columns.Add("lb1");
            dt1.Columns.Add("lb2");
            dt1.Columns.Add("lb3");
            for (int i = 0; i < 5; i++)
            {
                dt1.Rows.Add(i, false, i + 5, i * 10 + 5, i * 100 + 5);
            }
            listView4.TemplateControl = new tableTemplate();
            listView4.DataSource = dt1;
            listView4.DataBind();
        }
        private void button1_Press(object sender, EventArgs e)
        {
            popList1.ShowDialog();
        }
        private void popList1_Selected(object sender, EventArgs e)
        {
            switch (popList1.Selections[0].Text)
            {
                case "DataBind":
                    DataBind();
                    button1.Text = "数据绑定";
                    break;
                case "删除行":
                    if (listView1.Rows.Count > 0)
                    {
                        int i = listView1.Rows.Count;
                        listView1.Rows.RemoveAt(i - 1);
                        labContent.Text = "gridView1.Cells.Remove ,gridView1.Cells.RemoveAt删除行。";
                    }
                    button1.Text = "删除行";
                    break;
                case "清空":
                    listView1.Rows.Clear();
                    button1.Text = "清空";
                    break;
                case "新增行":
                    gridTable = new DataTable();
                    gridTable.Columns.Add("img");
                    gridTable.Columns.Add("id");
                    gridTable.Columns.Add("name");
                    gridTable.Columns.Add("sexual");
                    string[] sex = new string[] { "男", "女" };
                    string[] pic = new string[] { "boy.png", "girl.png" };
                    for (int i = 9; i < 12; i++)
                    {
                        gridTable.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
                    }
                    listView1.NewRow(gridTable, "");
                    labContent.Text = "gridView1.NewCell 新增行。";
                    button1.Text = "新增行";
                    break;
                case "编辑":
                    button1.Text = "点击行项进行编辑";
                    break;
            }
        }
        DataTable gridTable;
        private void DataBind()
        {
            gridTable = new DataTable();
            gridTable.Columns.Add("img");
            gridTable.Columns.Add("id");
            gridTable.Columns.Add("name");
            gridTable.Columns.Add("sexual");
            string[] sex = new string[] { "男", "女" };
            string[] pic= new string[] { "boy.png", "girl.png" };
            for (int i = 0; i < 8; i++)
            {
                gridTable.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
            }
            if (gridTable.Rows.Count > 0)
            {
                listView1.DataSource = gridTable;
                listView1.DataBind();
            }
        }
        int n = 5;
        private void listView3_ReachEnd(object sender, EventArgs e)
        {
            if (n < 30)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("img");
                dt.Columns.Add("id");
                dt.Columns.Add("name");
                dt.Columns.Add("sexual");
                string[] sex = new string[] { "男", "女" };
                string[] pic = new string[] { "boy.png", "girl.png" };
                for (int i = n; i < n + 5; i++)
                {
                    dt.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
                }
                listView3.NewRow(dt, "");
                n += 5;
            }
        }
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox1.Checked)
            {
                foreach (ListViewRow lr in listView4.Rows)
                {
                    ((CheckBox)(lr.Control.Controls.Find("checkBox1", true))).Checked = true;
                }
                DataTable dt = listView4.DataSource as DataTable;
                int i = 0, j = 0, k = 0;
                foreach (DataRow dr in dt.Rows)
                {
                    i += Convert.ToInt32(dr[2]);
                    j += Convert.ToInt32(dr[3]);
                    k += Convert.ToInt32(dr[4]);
                }
                allLab1.Text = i.ToString();
                allLab2.Text = j.ToString();
                allLab3.Text = k.ToString();
            }
            else
            {
                foreach (ListViewRow lr in listView4.Rows)
                {
                    ((CheckBox)(lr.Control.Controls.Find("checkBox1", true))).Checked = false;
                }
                allLab1.Text = allLab2.Text = allLab3.Text = "0";
            }
        }
        public void countAll(CheckBox ck, string lb1, string lb2, string lb3)
        {
            if (ck.Checked)
            {
                allLab1.Text = (Convert.ToInt32(allLab1.Text) + Convert.ToInt32(lb1)).ToString();
                allLab2.Text = (Convert.ToInt32(allLab2.Text) + Convert.ToInt32(lb2)).ToString();
                allLab3.Text = (Convert.ToInt32(allLab3.Text) + Convert.ToInt32(lb3)).ToString();
            }
            else
            {
                allLab1.Text = (Convert.ToInt32(allLab1.Text) - Convert.ToInt32(lb1)).ToString();
                allLab2.Text = (Convert.ToInt32(allLab2.Text) - Convert.ToInt32(lb2)).ToString();
                allLab3.Text = (Convert.ToInt32(allLab3.Text) - Convert.ToInt32(lb3)).ToString();
            }
        }
    }
}
                using System;
using Smobiler.Core;
namespace Smobiler.Tutorials.Components
{
    partial class demoListView : Smobiler.Core.Controls.MobileForm
    {
        #region "SmobilerForm generated code "
        //SmobilerForm overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerForm
        //It can be modified using the SmobilerForm.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.title1 = new Smobiler.Core.Controls.Title();
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.panel2 = new Smobiler.Core.Controls.Panel();
            this.labContent = new Smobiler.Core.Controls.Label();
            this.labTitle = new Smobiler.Core.Controls.Label();
            this.button1 = new Smobiler.Core.Controls.Button();
            this.panel3 = new Smobiler.Core.Controls.Panel();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.label2 = new Smobiler.Core.Controls.Label();
            this.label3 = new Smobiler.Core.Controls.Label();
            this.label4 = new Smobiler.Core.Controls.Label();
            this.panel4 = new Smobiler.Core.Controls.Panel();
            this.label6 = new Smobiler.Core.Controls.Label();
            this.listView1 = new Smobiler.Core.Controls.ListView();
            this.listView2 = new Smobiler.Core.Controls.ListView();
            this.listView3 = new Smobiler.Core.Controls.ListView();
            this.panel5 = new Smobiler.Core.Controls.Panel();
            this.checkBox1 = new Smobiler.Core.Controls.CheckBox();
            this.label7 = new Smobiler.Core.Controls.Label();
            this.label8 = new Smobiler.Core.Controls.Label();
            this.label9 = new Smobiler.Core.Controls.Label();
            this.listView4 = new Smobiler.Core.Controls.ListView();
            this.panel6 = new Smobiler.Core.Controls.Panel();
            this.label13 = new Smobiler.Core.Controls.Label();
            this.allLab1 = new Smobiler.Core.Controls.Label();
            this.allLab2 = new Smobiler.Core.Controls.Label();
            this.allLab3 = new Smobiler.Core.Controls.Label();
            this.popList1 = new Smobiler.Core.Controls.PopList();
            // 
            // title1
            // 
            this.title1.ImageType = Smobiler.Core.Controls.ImageEx.ImageStyle.FontIcon;
            this.title1.Name = "title1";
            this.title1.ResourceID = "angle-left";
            this.title1.Size = new System.Drawing.Size(300, 30);
            this.title1.Text = "ListView";
            this.title1.ImagePress += new System.EventHandler(this.title1_ImagePress);
            // 
            // panel1
            // 
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.panel2,
            this.panel3,
            this.label3,
            this.label4,
            this.panel4,
            this.listView1,
            this.listView2,
            this.listView3,
            this.panel5,
            this.listView4,
            this.panel6});
            this.panel1.Flex = 1;
            this.panel1.Name = "panel1";
            this.panel1.Scrollable = true;
            this.panel1.Size = new System.Drawing.Size(300, 100);
            // 
            // panel2
            // 
            this.panel2.BackColor = System.Drawing.Color.White;
            this.panel2.Border = new Smobiler.Core.Controls.Border(1F);
            this.panel2.BorderColor = System.Drawing.Color.Silver;
            this.panel2.BorderRadius = 5;
            this.panel2.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.labContent,
            this.labTitle,
            this.button1});
            this.panel2.Location = new System.Drawing.Point(5, 10);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(290, 173);
            // 
            // labContent
            // 
            this.labContent.BackColor = System.Drawing.Color.WhiteSmoke;
            this.labContent.FontSize = 15F;
            this.labContent.Location = new System.Drawing.Point(0, 26);
            this.labContent.Name = "labContent";
            this.labContent.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.labContent.Size = new System.Drawing.Size(290, 86);
            this.labContent.Text = "可进行数据绑定,添加数据集,删除数据集,清除数据集,设置数据集的操作\r\nGridView,ListView都没有点击事件,可以使用其模板页中控件的事件作为点击事件" +
    "\r\n";
            this.labContent.VerticalAlignment = Smobiler.Core.Controls.VerticalAlignment.Top;
            // 
            // labTitle
            // 
            this.labTitle.BackColor = System.Drawing.Color.WhiteSmoke;
            this.labTitle.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
            this.labTitle.BorderColor = System.Drawing.Color.DarkSeaGreen;
            this.labTitle.FontSize = 16F;
            this.labTitle.Name = "labTitle";
            this.labTitle.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.labTitle.Size = new System.Drawing.Size(290, 26);
            this.labTitle.Text = "表格显示控件";
            // 
            // button1
            // 
            this.button1.BackColor = System.Drawing.Color.Moccasin;
            this.button1.Location = new System.Drawing.Point(39, 124);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(212, 30);
            this.button1.Text = "控件介绍";
            this.button1.Press += new System.EventHandler(this.button1_Press);
            // 
            // panel3
            // 
            this.panel3.BackColor = System.Drawing.Color.White;
            this.panel3.Border = new Smobiler.Core.Controls.Border(1F);
            this.panel3.BorderColor = System.Drawing.Color.Silver;
            this.panel3.BorderRadius = 5;
            this.panel3.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.label1,
            this.label2});
            this.panel3.Location = new System.Drawing.Point(5, 413);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(290, 126);
            // 
            // label1
            // 
            this.label1.BackColor = System.Drawing.Color.WhiteSmoke;
            this.label1.FontSize = 15F;
            this.label1.Location = new System.Drawing.Point(0, 26);
            this.label1.Name = "label1";
            this.label1.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.label1.Size = new System.Drawing.Size(290, 100);
            this.label1.Text = "方法1:通过设置PageSize实现分页\r\n方法2:在ListView的ReachEnd通过NewRowl方法实现分页 (RaiseReachEnd属性设置tru" +
    "e时,可在listview滑动到底部时触发ReachEnd事件)";
            // 
            // label2
            // 
            this.label2.BackColor = System.Drawing.Color.WhiteSmoke;
            this.label2.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
            this.label2.BorderColor = System.Drawing.Color.DarkSeaGreen;
            this.label2.FontSize = 16F;
            this.label2.Name = "label2";
            this.label2.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.label2.Size = new System.Drawing.Size(290, 26);
            this.label2.Text = "实现分页";
            // 
            // label3
            // 
            this.label3.BackColor = System.Drawing.Color.WhiteSmoke;
            this.label3.Location = new System.Drawing.Point(5, 549);
            this.label3.Name = "label3";
            this.label3.Padding = new Smobiler.Core.Controls.Padding(5F, 0F, 0F, 0F);
            this.label3.Size = new System.Drawing.Size(290, 26);
            this.label3.Text = "方法1";
            // 
            // label4
            // 
            this.label4.BackColor = System.Drawing.Color.WhiteSmoke;
            this.label4.Location = new System.Drawing.Point(5, 769);
            this.label4.Name = "label4";
            this.label4.Padding = new Smobiler.Core.Controls.Padding(5F, 0F, 0F, 0F);
            this.label4.Size = new System.Drawing.Size(290, 26);
            this.label4.Text = "方法2";
            // 
            // panel4
            // 
            this.panel4.BackColor = System.Drawing.Color.White;
            this.panel4.Border = new Smobiler.Core.Controls.Border(1F);
            this.panel4.BorderColor = System.Drawing.Color.Silver;
            this.panel4.BorderRadius = 5;
            this.panel4.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.label6});
            this.panel4.Location = new System.Drawing.Point(5, 989);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(290, 26);
            // 
            // label6
            // 
            this.label6.BackColor = System.Drawing.Color.WhiteSmoke;
            this.label6.BorderColor = System.Drawing.Color.DarkSeaGreen;
            this.label6.FontSize = 16F;
            this.label6.Name = "label6";
            this.label6.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.label6.Size = new System.Drawing.Size(290, 26);
            this.label6.Text = "实现表格\r\n";
            this.label6.VerticalAlignment = Smobiler.Core.Controls.VerticalAlignment.Top;
            // 
            // listView1
            // 
            this.listView1.BackColor = System.Drawing.Color.White;
            this.listView1.Location = new System.Drawing.Point(5, 193);
            this.listView1.Name = "listView1";
            this.listView1.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView1.Size = new System.Drawing.Size(290, 210);
            this.listView1.TemplateControlName = "listViewTemplate";
            // 
            // listView2
            // 
            this.listView2.BackColor = System.Drawing.Color.White;
            this.listView2.Location = new System.Drawing.Point(5, 585);
            this.listView2.Name = "listView2";
            this.listView2.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView2.Size = new System.Drawing.Size(290, 174);
            // 
            // listView3
            // 
            this.listView3.BackColor = System.Drawing.Color.White;
            this.listView3.Location = new System.Drawing.Point(5, 805);
            this.listView3.Name = "listView3";
            this.listView3.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView3.RaiseReachEnd = true;
            this.listView3.Size = new System.Drawing.Size(290, 174);
            this.listView3.ReachEnd += new System.EventHandler(this.listView3_ReachEnd);
            // 
            // panel5
            // 
            this.panel5.BackColor = System.Drawing.Color.White;
            this.panel5.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.checkBox1,
            this.label7,
            this.label8,
            this.label9});
            this.panel5.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel5.Flex = 1;
            this.panel5.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.panel5.Location = new System.Drawing.Point(5, 1025);
            this.panel5.Name = "panel5";
            this.panel5.Size = new System.Drawing.Size(290, 30);
            // 
            // checkBox1
            // 
            this.checkBox1.DataMember = "id";
            this.checkBox1.DisplayMember = "cb";
            this.checkBox1.Margin = new Smobiler.Core.Controls.Margin(10F, 0F, 10F, 0F);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(22, 30);
            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
            // 
            // label7
            // 
            this.label7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label7.Bold = true;
            this.label7.DisplayMember = "lb1";
            this.label7.Flex = 1;
            this.label7.ForeColor = System.Drawing.Color.White;
            this.label7.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(100, 0);
            this.label7.Text = "label1";
            // 
            // label8
            // 
            this.label8.Bold = true;
            this.label8.DisplayMember = "lb2";
            this.label8.Flex = 1;
            this.label8.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(100, 0);
            this.label8.Text = "label2";
            // 
            // label9
            // 
            this.label9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label9.Bold = true;
            this.label9.DisplayMember = "lb3";
            this.label9.Flex = 1;
            this.label9.ForeColor = System.Drawing.Color.White;
            this.label9.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(100, 0);
            this.label9.Text = "label3";
            // 
            // listView4
            // 
            this.listView4.BackColor = System.Drawing.Color.White;
            this.listView4.Location = new System.Drawing.Point(5, 1055);
            this.listView4.Name = "listView4";
            this.listView4.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView4.Size = new System.Drawing.Size(290, 150);
            // 
            // panel6
            // 
            this.panel6.BackColor = System.Drawing.Color.White;
            this.panel6.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.label13,
            this.allLab1,
            this.allLab2,
            this.allLab3});
            this.panel6.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel6.Flex = 1;
            this.panel6.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.panel6.Location = new System.Drawing.Point(5, 1205);
            this.panel6.Name = "panel6";
            this.panel6.Size = new System.Drawing.Size(290, 30);
            // 
            // label13
            // 
            this.label13.Bold = true;
            this.label13.Margin = new Smobiler.Core.Controls.Margin(10F, 0F, 10F, 0F);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(22, 30);
            this.label13.Text = "All";
            // 
            // allLab1
            // 
            this.allLab1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.allLab1.Bold = true;
            this.allLab1.DisplayMember = "lb1";
            this.allLab1.Flex = 1;
            this.allLab1.ForeColor = System.Drawing.Color.White;
            this.allLab1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.allLab1.Name = "allLab1";
            this.allLab1.Size = new System.Drawing.Size(100, 0);
            this.allLab1.Text = "0";
            // 
            // allLab2
            // 
            this.allLab2.Bold = true;
            this.allLab2.DisplayMember = "lb2";
            this.allLab2.Flex = 1;
            this.allLab2.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.allLab2.Name = "allLab2";
            this.allLab2.Size = new System.Drawing.Size(100, 0);
            this.allLab2.Text = "0";
            // 
            // allLab3
            // 
            this.allLab3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.allLab3.Bold = true;
            this.allLab3.DisplayMember = "lb3";
            this.allLab3.Flex = 1;
            this.allLab3.ForeColor = System.Drawing.Color.White;
            this.allLab3.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.allLab3.Name = "allLab3";
            this.allLab3.Size = new System.Drawing.Size(100, 0);
            this.allLab3.Text = "0";
            // 
            // popList1
            // 
            this.popList1.Name = "popList1";
            this.popList1.Selected += new System.EventHandler(this.popList1_Selected);
            // 
            // demoListView
            // 
            this.Components.AddRange(new Smobiler.Core.Controls.MobileComponent[] {
            this.popList1});
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.title1,
            this.panel1});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Load += new System.EventHandler(this.demoListView_Load);
            this.Name = "demoListView";
        }
        #endregion
        private Core.Controls.Title title1;
        private Core.Controls.Panel panel1;
        private Core.Controls.Panel panel2;
        private Core.Controls.Label labContent;
        private Core.Controls.Label labTitle;
        private Core.Controls.Button button1;
        private Core.Controls.Panel panel3;
        private Core.Controls.Label label1;
        private Core.Controls.Label label2;
        private Core.Controls.Label label3;
        private Core.Controls.Label label4;
        private Core.Controls.Panel panel4;
        private Core.Controls.Label label6;
        private Core.Controls.ListView listView1;
        private Core.Controls.ListView listView2;
        private Core.Controls.ListView listView3;
        private Core.Controls.PopList popList1;
        private Core.Controls.Panel panel5;
        private Core.Controls.CheckBox checkBox1;
        private Core.Controls.Label label7;
        private Core.Controls.Label label8;
        private Core.Controls.Label label9;
        private Core.Controls.ListView listView4;
        private Core.Controls.Panel panel6;
        private Core.Controls.Label label13;
        private Core.Controls.Label allLab1;
        private Core.Controls.Label allLab2;
        private Core.Controls.Label allLab3;
    }
}
                using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace Smobiler.Tutorials.Components
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱,true添加,false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class listViewTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        public listViewTemplate() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        private void panel1_Press(object sender, EventArgs e)
        {
            editLayout lp = new editLayout(label1.BindDataValue.ToString(), label1.Text, label2.Text, image1.ResourceID);
            this.Form.ShowDialog(lp, (obj, args) =>
            {
                if (lp.ShowResult == ShowResult.Yes)
                {
                    label1.Text = lp.text1;
                    label2.Text = lp.text2;
                }
            });
        }
    }
}
            
                using System;
using Smobiler.Core;
namespace Smobiler.Tutorials.Components
{
    partial class listViewTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        #region "SmobilerUserControl generated code "
        //SmobilerUserControl overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerUserControl
        //It can be modified using the SmobilerUserControl.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.image1 = new Smobiler.Core.Controls.Image();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.label2 = new Smobiler.Core.Controls.Label();
            // 
            // panel1
            // 
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.image1,
            this.label1,
            this.label2});
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(0, 100);
            this.panel1.Touchable = true;
            this.panel1.Press += new System.EventHandler(this.panel1_Press);
            // 
            // image1
            // 
            this.image1.DisplayMember = "img";
            this.image1.Location = new System.Drawing.Point(11, 3);
            this.image1.Name = "image1";
            this.image1.Size = new System.Drawing.Size(29, 30);
            // 
            // label1
            // 
            this.label1.DataMember = "id";
            this.label1.DisplayMember = "name";
            this.label1.Location = new System.Drawing.Point(49, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(135, 35);
            this.label1.Text = "label1";
            // 
            // label2
            // 
            this.label2.DisplayMember = "sexual";
            this.label2.Location = new System.Drawing.Point(184, 0);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(91, 35);
            this.label2.Text = "label1";
            // 
            // listViewTemplate
            // 
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.panel1});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Size = new System.Drawing.Size(290, 35);
            this.Name = "listViewTemplate";
        }
        #endregion
        private Core.Controls.Panel panel1;
        private Core.Controls.Image image1;
        private Core.Controls.Label label1;
        private Core.Controls.Label label2;
    }
}
                using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace Smobiler.Tutorials.Components
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱,true添加,false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class tableTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        public tableTemplate() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            ((demoListView)this.Form).countAll(checkBox1, label1.Text, label2.Text, label3.Text);
        }
    }
}
            
                using System;
using Smobiler.Core;
namespace Smobiler.Tutorials.Components
{
    partial class tableTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        #region "SmobilerUserControl generated code "
        //SmobilerUserControl overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerUserControl
        //It can be modified using the SmobilerUserControl.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.checkBox1 = new Smobiler.Core.Controls.CheckBox();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.label2 = new Smobiler.Core.Controls.Label();
            this.label3 = new Smobiler.Core.Controls.Label();
            // 
            // panel1
            // 
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.checkBox1,
            this.label1,
            this.label2,
            this.label3});
            this.panel1.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel1.Flex = 1;
            this.panel1.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(0, 100);
            // 
            // checkBox1
            // 
            this.checkBox1.DataMember = "id";
            this.checkBox1.DisplayMember = "cb";
            this.checkBox1.Margin = new Smobiler.Core.Controls.Margin(10F, 0F, 10F, 0F);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(22, 30);
            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
            // 
            // label1
            // 
            this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label1.Bold = true;
            this.label1.DisplayMember = "lb1";
            this.label1.Flex = 1;
            this.label1.ForeColor = System.Drawing.Color.White;
            this.label1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(100, 0);
            this.label1.Text = "label1";
            // 
            // label2
            // 
            this.label2.Bold = true;
            this.label2.DisplayMember = "lb2";
            this.label2.Flex = 1;
            this.label2.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(100, 0);
            this.label2.Text = "label2";
            // 
            // label3
            // 
            this.label3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label3.Bold = true;
            this.label3.DisplayMember = "lb3";
            this.label3.Flex = 1;
            this.label3.ForeColor = System.Drawing.Color.White;
            this.label3.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(100, 0);
            this.label3.Text = "label3";
            // 
            // tableTemplate
            // 
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.panel1});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Size = new System.Drawing.Size(290, 30);
            this.Name = "tableTemplate";
        }
        #endregion
        private Core.Controls.Panel panel1;
        private Core.Controls.CheckBox checkBox1;
        private Core.Controls.Label label1;
        private Core.Controls.Label label2;
        private Core.Controls.Label label3;
    }
}
                using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace Smobiler.Tutorials.Components
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱,true添加,false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class editLayout : Smobiler.Core.Controls.MobileUserControl
    {
        public string text1 { get { return textBox1.Text; } }
        public string text2 { get { return textBox2.Text; } }
        public editLayout() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        public editLayout(string id, string name, string sexual, string img) : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
            label2.Text = id;
            textBox1.Text = name;
            textBox2.Text = sexual;
            image1.ResourceID = img;
        }
        private void button1_Press(object sender, EventArgs e)
        {
            this.ShowResult = ShowResult.Cancel;
            this.Close();
        }
        private void button2_Press(object sender, EventArgs e)
        {
            this.ShowResult = ShowResult.Yes;
            this.Close();
        }
    }
}
                using System;
using Smobiler.Core;
namespace Smobiler.Tutorials.Components
{
    partial class editLayout : Smobiler.Core.Controls.MobileUserControl
    {
        #region "SmobilerUserControl generated code "
        //SmobilerUserControl overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerUserControl
        //It can be modified using the SmobilerUserControl.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.title1 = new Smobiler.Core.Controls.Title();
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.image1 = new Smobiler.Core.Controls.Image();
            this.textBox1 = new Smobiler.Core.Controls.TextBox();
            this.textBox2 = new Smobiler.Core.Controls.TextBox();
            this.button1 = new Smobiler.Core.Controls.Button();
            this.button2 = new Smobiler.Core.Controls.Button();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.label2 = new Smobiler.Core.Controls.Label();
            // 
            // title1
            // 
            this.title1.Name = "title1";
            this.title1.Size = new System.Drawing.Size(0, 30);
            this.title1.Text = "编辑";
            // 
            // panel1
            // 
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.image1,
            this.textBox1,
            this.textBox2,
            this.button1,
            this.button2,
            this.label1,
            this.label2});
            this.panel1.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel1.Flex = 1;
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(0, 100);
            this.panel1.Touchable = true;
            // 
            // image1
            // 
            this.image1.Location = new System.Drawing.Point(27, 55);
            this.image1.Name = "image1";
            this.image1.Size = new System.Drawing.Size(81, 79);
            // 
            // textBox1
            // 
            this.textBox1.Border = new Smobiler.Core.Controls.Border(1F);
            this.textBox1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.textBox1.Location = new System.Drawing.Point(142, 81);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(120, 35);
            // 
            // textBox2
            // 
            this.textBox2.Border = new Smobiler.Core.Controls.Border(1F);
            this.textBox2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.textBox2.Location = new System.Drawing.Point(142, 134);
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(120, 35);
            // 
            // button1
            // 
            this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(67)))), ((int)(((byte)(81)))));
            this.button1.Location = new System.Drawing.Point(27, 194);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(100, 30);
            this.button1.Text = "取消";
            this.button1.Press += new System.EventHandler(this.button1_Press);
            // 
            // button2
            // 
            this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.button2.Location = new System.Drawing.Point(174, 194);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(100, 30);
            this.button2.Text = "保存";
            this.button2.Press += new System.EventHandler(this.button2_Press);
            // 
            // label1
            // 
            this.label1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Right;
            this.label1.Location = new System.Drawing.Point(142, 26);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(48, 35);
            this.label1.Text = "id:";
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(190, 26);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(72, 35);
            this.label2.Text = "label2";
            // 
            // editLayout
            // 
            this.BackColor = System.Drawing.Color.White;
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.title1,
            this.panel1});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Size = new System.Drawing.Size(0, 300);
            this.Name = "editLayout";
        }
        #endregion
        private Core.Controls.Title title1;
        private Core.Controls.Panel panel1;
        private Core.Controls.Image image1;
        private Core.Controls.TextBox textBox1;
        private Core.Controls.TextBox textBox2;
        private Core.Controls.Button button1;
        private Core.Controls.Button button2;
        private Core.Controls.Label label1;
        private Core.Controls.Label label2;
    }
}
                using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
using SmobilerTutorialsWeb.UserControls;
namespace SmobilerTutorialsWeb.Components
{
    partial class demoListView : Smobiler.Core.Controls.MobileForm
    {
        public demoListView() : base()
        {
            //This call is required by the SmobilerForm.
            InitializeComponent();
        }
        private void title1_ImagePress(object sender, EventArgs e)
        {
            this.Close();
        }
        private void demoListView_Load(object sender, EventArgs e)
        {
            spinner1.Items = new string[] { "DataBind", "滚动到第5行", "删除行", "清空", "新增行", "编辑" };
            DataTable dt = new DataTable();
            dt.Columns.Add("img");
            dt.Columns.Add("id");
            dt.Columns.Add("name");
            dt.Columns.Add("sexual");
            string[] sex = new string[] { "男", "女" };
            string[] pic = new string[] { "boy.png", "girl.png" };
            for (int i = 0; i < 8; i++)
            {
                dt.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
            }
            //listview2绑定数据
            listView2.TemplateControl = new demoListViewTemplate();
            listView2.DataSource = dt;
            listView2.DataBind();
            //listview3绑定数据
            listView3.TemplateControl = new demoListViewTemplate();
            listView3.DataSource = dt;
            listView3.DataBind();
            //listview4
            DataTable dt1 = new DataTable();
            dt1.Columns.Add("id");
            dt1.Columns.Add("cb");
            dt1.Columns.Add("lb1");
            dt1.Columns.Add("lb2");
            dt1.Columns.Add("lb3");
            for (int i = 0; i <15; i++)
            {
                dt1.Rows.Add(i, false, i + 5, i * 10 + 5, i * 100 + 5);
            }
            listView4.TemplateControl = new demoListViewTemplate1();
            listView4.DataSource = dt1;
            listView4.DataBind();
        }
        private void spinner1_ItemSelected(object sender, SpinnerItemSelectedEventArgs e)
        {
            switch (spinner1.Text)
            {
                case "DataBind":
                    DataBind();
                    labContent.Text = "数据绑定";
                    break;
                case "滚动到第5行":
                    if (listView1.Rows.Count > 5)
                    {
                        listView1.ScrollToIndex(5);
                        labContent.Text = "滚动到第5行";
                    }
                    else
                        Toast("少于5行");
                    break;
                case "删除行":
                    if (listView1.Rows.Count > 0)
                    {
                        int i = listView1.Rows.Count;
                        listView1.Rows.RemoveAt(i - 1);
                        labContent.Text = "listView1.Rows.Remove ,listView1.Rows.RemoveAt删除行。";
                    }
                    break;
                case "清空":
                    listView1.Rows.Clear();
                    labContent.Text = " listView1.Rows.Clear清空数据。";
                    break;
                case "新增行":
                    listTable = new DataTable();
                    listTable.Columns.Add("img");
                    listTable.Columns.Add("id");
                    listTable.Columns.Add("name");
                    listTable.Columns.Add("sexual");
                    string[] sex = new string[] { "男", "女" };
                    string[] pic = new string[] { "boy.png", "girl.png" };
                    for (int i = 9; i < 12; i++)
                    {
                        listTable.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
                    }
                    listView1.NewRow(listTable, "");
                    labContent.Text = "listView1.NewRow 新增行。";
                    break;
                case "编辑":
                    labContent.Text = "点击行项进行编辑。";
                    break;
            }
        }
        DataTable listTable;
        private void DataBind()
        {
            listTable = new DataTable();
            listTable.Columns.Add("img");
            listTable.Columns.Add("id");
            listTable.Columns.Add("name");
            listTable.Columns.Add("sexual");
            string[] sex = new string[] { "男", "女" };
            string[] pic = new string[] { "boy.png", "girl.png" };
            for (int i = 0; i < 8; i++)
            {
                listTable.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
            }
            if (listTable.Rows.Count > 0)
            {
                listView1.DataSource = listTable;
                listView1.DataBind();
            }
        }
        private void listView1_ReachEnd(object sender, EventArgs e)
        {
            Toast("ReachEnd");
        }
        int n = 9;
        private void listView3_ReachEnd(object sender, EventArgs e)
        {
            if (n < 30)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("img");
                dt.Columns.Add("id");
                dt.Columns.Add("name");
                dt.Columns.Add("sexual");
                string[] sex = new string[] { "男", "女" };
                string[] pic = new string[] { "boy.png", "girl.png" };
                for (int i = n; i < n + 5; i++)
                {
                    dt.Rows.Add(pic[i%2], i, "user" + i.ToString(), sex[i % 2]);
                }
                listView3.NewRow(dt, "");
                n += 5;
            }
        }
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
          
            if (checkBox1.Checked)
            {
                foreach (ListViewRow lr in listView4.Rows)
                {
                    ((CheckBox)(lr.Control.Controls.Find("checkBox1", true))).Checked = true;
                }
                DataTable dt = listView4.DataSource as DataTable;
                int i = 0, j = 0, k = 0;
                foreach (DataRow dr in dt.Rows)
                {
                    i += Convert.ToInt32(dr[2]);
                    j += Convert.ToInt32(dr[3]);
                    k += Convert.ToInt32(dr[4]);
                }
                allLab1.Text = i.ToString();
                allLab2.Text = j.ToString();
                allLab3.Text = k.ToString();
           
            }
            else
            {
                foreach (ListViewRow lr in listView4.Rows)
                {
                    ((CheckBox)(lr.Control.Controls.Find("checkBox1", true))).Checked = false;
                }
                allLab1.Text = allLab2.Text = allLab3.Text = "0";
            }
        }
     public void countAll( CheckBox ck,string lb1,string lb2,string lb3 )
        {
            if (ck.Checked)
            {
               allLab1.Text = (Convert.ToInt32(allLab1.Text) + Convert.ToInt32(lb1)).ToString();
                allLab2.Text = (Convert.ToInt32(allLab2.Text) + Convert.ToInt32(lb2)).ToString();
                allLab3.Text = (Convert.ToInt32(allLab3.Text) + Convert.ToInt32(lb3)).ToString();
            }
            else
            {
                allLab1.Text = (Convert.ToInt32(allLab1.Text) - Convert.ToInt32(lb1)).ToString();
                allLab2.Text = (Convert.ToInt32(allLab2.Text) - Convert.ToInt32(lb2)).ToString();
                allLab3.Text = (Convert.ToInt32(allLab3.Text) - Convert.ToInt32(lb3)).ToString();
            }
        }
    }
}
                        
                using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.Components
{
    partial class demoListView : Smobiler.Core.Controls.MobileForm
    {
        #region "SmobilerForm generated code "
        //SmobilerForm overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerForm
        //It can be modified using the SmobilerForm.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.title1 = new Smobiler.Core.Controls.Title();
            this.panel10 = new Smobiler.Core.Controls.Panel();
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.labContent = new Smobiler.Core.Controls.Label();
            this.spinner1 = new Smobiler.Core.Controls.Spinner();
            this.listView1 = new Smobiler.Core.Controls.ListView();
            this.labTitle = new Smobiler.Core.Controls.Label();
            this.panel2 = new Smobiler.Core.Controls.Panel();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.listView2 = new Smobiler.Core.Controls.ListView();
            this.label3 = new Smobiler.Core.Controls.Label();
            this.listView3 = new Smobiler.Core.Controls.ListView();
            this.label2 = new Smobiler.Core.Controls.Label();
            this.label4 = new Smobiler.Core.Controls.Label();
            this.label5 = new Smobiler.Core.Controls.Label();
            this.label6 = new Smobiler.Core.Controls.Label();
            this.panel3 = new Smobiler.Core.Controls.Panel();
            this.label7 = new Smobiler.Core.Controls.Label();
            this.listView4 = new Smobiler.Core.Controls.ListView();
            this.panel4 = new Smobiler.Core.Controls.Panel();
            this.checkBox1 = new Smobiler.Core.Controls.CheckBox();
            this.label8 = new Smobiler.Core.Controls.Label();
            this.label9 = new Smobiler.Core.Controls.Label();
            this.label10 = new Smobiler.Core.Controls.Label();
            this.panel5 = new Smobiler.Core.Controls.Panel();
            this.label11 = new Smobiler.Core.Controls.Label();
            this.allLab1 = new Smobiler.Core.Controls.Label();
            this.allLab2 = new Smobiler.Core.Controls.Label();
            this.allLab3 = new Smobiler.Core.Controls.Label();
            // 
            // title1
            // 
            this.title1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(246)))), ((int)(((byte)(246)))));
            this.title1.ImageType = Smobiler.Core.Controls.ImageEx.ImageStyle.FontIcon;
            this.title1.Name = "title1";
            this.title1.ResourceID = "angle-left";
            this.title1.Size = new System.Drawing.Size(0, 30);
            this.title1.Text = "ListView";
            this.title1.ImagePress += new System.EventHandler(this.title1_ImagePress);
            // 
            // panel10
            // 
            this.panel10.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.panel1,
            this.labTitle,
            this.panel2,
            this.label2,
            this.label4,
            this.label5,
            this.label6,
            this.panel3});
            this.panel10.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel10.Flex = 1;
            this.panel10.Name = "panel10";
            this.panel10.Scrollable = true;
            this.panel10.Size = new System.Drawing.Size(0, 0);
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.Color.White;
            this.panel1.Border = new Smobiler.Core.Controls.Border(1F);
            this.panel1.BorderColor = System.Drawing.Color.Silver;
            this.panel1.BorderRadius = 5;
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.labContent,
            this.spinner1,
            this.listView1});
            this.panel1.Location = new System.Drawing.Point(120, 57);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(427, 454);
            // 
            // labContent
            // 
            this.labContent.BackColor = System.Drawing.Color.White;
            this.labContent.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.labContent.Location = new System.Drawing.Point(0, 92);
            this.labContent.Name = "labContent";
            this.labContent.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.labContent.Size = new System.Drawing.Size(427, 54);
            this.labContent.Text = "点击上方选项,可进行数据绑定,添加行,删除行,清空,根据数据源添加,index事件\r\n";
            // 
            // spinner1
            // 
            this.spinner1.Location = new System.Drawing.Point(114, 27);
            this.spinner1.Name = "spinner1";
            this.spinner1.Size = new System.Drawing.Size(200, 30);
            this.spinner1.ItemSelected += new System.EventHandler(this.spinner1_ItemSelected);
            // 
            // listView1
            // 
            this.listView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
            this.listView1.Location = new System.Drawing.Point(64, 181);
            this.listView1.Name = "listView1";
            this.listView1.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView1.PageSizeTextHeight = 0;
            this.listView1.RaiseReachEnd = true;
            this.listView1.Size = new System.Drawing.Size(300, 218);
            this.listView1.TemplateControlName = "demoListViewTemplate";
            this.listView1.ReachEnd += new System.EventHandler(this.listView1_ReachEnd);
            // 
            // labTitle
            // 
            this.labTitle.BackColor = System.Drawing.Color.White;
            this.labTitle.Bold = true;
            this.labTitle.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
            this.labTitle.BorderColor = System.Drawing.Color.White;
            this.labTitle.FontSize = 16F;
            this.labTitle.Location = new System.Drawing.Point(120, 30);
            this.labTitle.Name = "labTitle";
            this.labTitle.Size = new System.Drawing.Size(427, 26);
            this.labTitle.Text = "分页显示控件";
            // 
            // panel2
            // 
            this.panel2.BackColor = System.Drawing.Color.White;
            this.panel2.Border = new Smobiler.Core.Controls.Border(1F);
            this.panel2.BorderColor = System.Drawing.Color.Silver;
            this.panel2.BorderRadius = 5;
            this.panel2.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.label1,
            this.listView2,
            this.label3,
            this.listView3});
            this.panel2.Location = new System.Drawing.Point(646, 57);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(427, 454);
            // 
            // label1
            // 
            this.label1.BackColor = System.Drawing.Color.White;
            this.label1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label1.Location = new System.Drawing.Point(0, 185);
            this.label1.Name = "label1";
            this.label1.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.label1.Size = new System.Drawing.Size(427, 33);
            this.label1.Text = "方法1:通过设置PageSize实现分页\r\n\r\n";
            // 
            // listView2
            // 
            this.listView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
            this.listView2.Location = new System.Drawing.Point(60, 20);
            this.listView2.Name = "listView2";
            this.listView2.PageSizeLoadText = "加载完成";
            this.listView2.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView2.PageSizeTextHeight = 3;
            this.listView2.Size = new System.Drawing.Size(300, 141);
            this.listView2.TemplateControlName = "demoListViewTemplate";
            // 
            // label3
            // 
            this.label3.BackColor = System.Drawing.Color.White;
            this.label3.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label3.Location = new System.Drawing.Point(0, 409);
            this.label3.Name = "label3";
            this.label3.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.label3.Size = new System.Drawing.Size(427, 45);
            this.label3.Text = "方法2:在ListView的ReachEnd通过NewRow方法实现分页 (RaiseReachEnd属性设置true时,可在listview滑动到底部时触发Re" +
    "achEnd事件)\r\n";
            // 
            // listView3
            // 
            this.listView3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
            this.listView3.Location = new System.Drawing.Point(60, 242);
            this.listView3.Name = "listView3";
            this.listView3.PageSizeLoadText = "加载完成";
            this.listView3.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView3.RaiseReachEnd = true;
            this.listView3.Size = new System.Drawing.Size(300, 141);
            this.listView3.TemplateControlName = "demoListViewTemplate";
            this.listView3.ReachEnd += new System.EventHandler(this.listView3_ReachEnd);
            // 
            // label2
            // 
            this.label2.BackColor = System.Drawing.Color.White;
            this.label2.Bold = true;
            this.label2.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
            this.label2.BorderColor = System.Drawing.Color.White;
            this.label2.FontSize = 16F;
            this.label2.Location = new System.Drawing.Point(646, 30);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(427, 26);
            this.label2.Text = "实现分页";
            // 
            // label4
            // 
            this.label4.BackColor = System.Drawing.Color.White;
            this.label4.Bold = true;
            this.label4.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
            this.label4.BorderColor = System.Drawing.Color.White;
            this.label4.FontSize = 16F;
            this.label4.Location = new System.Drawing.Point(120, 30);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(427, 26);
            this.label4.Text = "表格显示控件";
            // 
            // label5
            // 
            this.label5.BackColor = System.Drawing.Color.White;
            this.label5.Bold = true;
            this.label5.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
            this.label5.BorderColor = System.Drawing.Color.White;
            this.label5.FontSize = 16F;
            this.label5.Location = new System.Drawing.Point(120, 541);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(427, 26);
            this.label5.Text = "ListView实现表格";
            // 
            // label6
            // 
            this.label6.BackColor = System.Drawing.Color.White;
            this.label6.Bold = true;
            this.label6.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
            this.label6.BorderColor = System.Drawing.Color.White;
            this.label6.FontSize = 16F;
            this.label6.Location = new System.Drawing.Point(120, 541);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(427, 26);
            this.label6.Text = "ListView实现表格";
            // 
            // panel3
            // 
            this.panel3.BackColor = System.Drawing.Color.White;
            this.panel3.Border = new Smobiler.Core.Controls.Border(1F);
            this.panel3.BorderColor = System.Drawing.Color.Silver;
            this.panel3.BorderRadius = 5;
            this.panel3.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.label7,
            this.listView4,
            this.panel4,
            this.panel5});
            this.panel3.Location = new System.Drawing.Point(120, 568);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(427, 454);
            // 
            // label7
            // 
            this.label7.BackColor = System.Drawing.Color.White;
            this.label7.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label7.Location = new System.Drawing.Point(0, 360);
            this.label7.Name = "label7";
            this.label7.Padding = new Smobiler.Core.Controls.Padding(5F);
            this.label7.Size = new System.Drawing.Size(427, 54);
            this.label7.Text = "点击上方Checkbox,可以对数据进行合计\r\n\r\n";
            // 
            // listView4
            // 
            this.listView4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
            this.listView4.Location = new System.Drawing.Point(61, 49);
            this.listView4.Name = "listView4";
            this.listView4.PageSizeTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(145)))), ((int)(((byte)(145)))), ((int)(((byte)(145)))));
            this.listView4.PageSizeTextHeight = 0;
            this.listView4.RaiseReachEnd = true;
            this.listView4.Size = new System.Drawing.Size(300, 218);
            this.listView4.ReachEnd += new System.EventHandler(this.listView1_ReachEnd);
            // 
            // panel4
            // 
            this.panel4.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.checkBox1,
            this.label8,
            this.label9,
            this.label10});
            this.panel4.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel4.Flex = 1;
            this.panel4.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.panel4.Location = new System.Drawing.Point(61, 19);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(300, 30);
            // 
            // checkBox1
            // 
            this.checkBox1.DataMember = "id";
            this.checkBox1.DisplayMember = "cb";
            this.checkBox1.Margin = new Smobiler.Core.Controls.Margin(10F, 0F, 10F, 0F);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(22, 30);
            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
            // 
            // label8
            // 
            this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label8.Bold = true;
            this.label8.DisplayMember = "lb1";
            this.label8.Flex = 1;
            this.label8.ForeColor = System.Drawing.Color.White;
            this.label8.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(100, 0);
            this.label8.Text = "label1";
            // 
            // label9
            // 
            this.label9.Bold = true;
            this.label9.DisplayMember = "lb2";
            this.label9.Flex = 1;
            this.label9.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(100, 0);
            this.label9.Text = "label2";
            // 
            // label10
            // 
            this.label10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label10.Bold = true;
            this.label10.DisplayMember = "lb3";
            this.label10.Flex = 1;
            this.label10.ForeColor = System.Drawing.Color.White;
            this.label10.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(100, 0);
            this.label10.Text = "label3";
            // 
            // panel5
            // 
            this.panel5.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.label11,
            this.allLab1,
            this.allLab2,
            this.allLab3});
            this.panel5.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel5.Flex = 1;
            this.panel5.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.panel5.Location = new System.Drawing.Point(61, 267);
            this.panel5.Name = "panel5";
            this.panel5.Size = new System.Drawing.Size(300, 30);
            // 
            // label11
            // 
            this.label11.Bold = true;
            this.label11.Margin = new Smobiler.Core.Controls.Margin(10F, 0F, 10F, 0F);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(22, 0);
            this.label11.Text = "All";
            // 
            // allLab1
            // 
            this.allLab1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.allLab1.Bold = true;
            this.allLab1.DisplayMember = "lb1";
            this.allLab1.Flex = 1;
            this.allLab1.ForeColor = System.Drawing.Color.White;
            this.allLab1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.allLab1.Name = "allLab1";
            this.allLab1.Size = new System.Drawing.Size(100, 0);
            this.allLab1.Text = "0";
            // 
            // allLab2
            // 
            this.allLab2.Bold = true;
            this.allLab2.DisplayMember = "lb2";
            this.allLab2.Flex = 1;
            this.allLab2.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.allLab2.Name = "allLab2";
            this.allLab2.Size = new System.Drawing.Size(100, 0);
            this.allLab2.Text = "0";
            // 
            // allLab3
            // 
            this.allLab3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.allLab3.Bold = true;
            this.allLab3.DisplayMember = "lb3";
            this.allLab3.Flex = 1;
            this.allLab3.ForeColor = System.Drawing.Color.White;
            this.allLab3.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.allLab3.Name = "allLab3";
            this.allLab3.Size = new System.Drawing.Size(100, 0);
            this.allLab3.Text = "0";
            // 
            // demoListView
            // 
            this.BackColor = System.Drawing.Color.White;
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.title1,
            this.panel10});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Size = new System.Drawing.Size(1200, 800);
            this.Load += new System.EventHandler(this.demoListView_Load);
            this.Name = "demoListView";
        }
        #endregion
        private Smobiler.Core.Controls.Title title1;
        private Smobiler.Core.Controls.Panel panel10;
        private Smobiler.Core.Controls.Panel panel1;
        private Smobiler.Core.Controls.Label labContent;
        private Smobiler.Core.Controls.Spinner spinner1;
        private Smobiler.Core.Controls.Label labTitle;
        private Smobiler.Core.Controls.ListView listView1;
        private Smobiler.Core.Controls.Panel panel2;
        private Smobiler.Core.Controls.Label label1;
        private Smobiler.Core.Controls.ListView listView2;
        private Smobiler.Core.Controls.Label label3;
        private Smobiler.Core.Controls.ListView listView3;
        private Smobiler.Core.Controls.Label label2;
        private Smobiler.Core.Controls.Label label4;
        private Smobiler.Core.Controls.Label label5;
        private Smobiler.Core.Controls.Label label6;
        private Smobiler.Core.Controls.Panel panel3;
        private Smobiler.Core.Controls.Label label7;
        private Smobiler.Core.Controls.ListView listView4;
        private Smobiler.Core.Controls.Panel panel4;
        private Smobiler.Core.Controls.CheckBox checkBox1;
        private Smobiler.Core.Controls.Label label8;
        private Smobiler.Core.Controls.Label label9;
        private Smobiler.Core.Controls.Label label10;
        private Smobiler.Core.Controls.Panel panel5;
        private Smobiler.Core.Controls.Label label11;
        private Smobiler.Core.Controls.Label allLab1;
        private Smobiler.Core.Controls.Label allLab2;
        private Smobiler.Core.Controls.Label allLab3;
    }
}
                 
                        
                using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace SmobilerTutorialsWeb.UserControls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱,true添加,false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class demoListViewTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        public demoListViewTemplate() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        private void panel1_Press(object sender, EventArgs e)
        {
            demoListViewEditTemplate lp = new demoListViewEditTemplate(label1.BindDataValue.ToString(), label1.Text, label2.Text, image1.ResourceID);
            this.Form.ShowDialog(lp, (obj, args) =>
            {
                if (lp.ShowResult == ShowResult.Yes)
                {
                    label1.Text = lp.text1;
                    label2.Text = lp.text2;
                }
            });
        }
    }
}
                using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.UserControls
{
    partial class demoListViewTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        #region "SmobilerUserControl generated code "
        //SmobilerUserControl overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerUserControl
        //It can be modified using the SmobilerUserControl.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.image1 = new Smobiler.Core.Controls.Image();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.label2 = new Smobiler.Core.Controls.Label();
            // 
            // panel1
            // 
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.image1,
            this.label1,
            this.label2});
            this.panel1.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel1.Flex = 1;
            this.panel1.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(0, 100);
            this.panel1.Touchable = true;
            this.panel1.Press += new System.EventHandler(this.panel1_Press);
            // 
            // image1
            // 
            this.image1.DisplayMember = "img";
            this.image1.Margin = new Smobiler.Core.Controls.Margin(20F, 10F, 10F, 10F);
            this.image1.Name = "image1";
            this.image1.Size = new System.Drawing.Size(30, 30);
            // 
            // label1
            // 
            this.label1.BackColor = System.Drawing.Color.White;
            this.label1.DataMember = "id";
            this.label1.DisplayMember = "name";
            this.label1.FontSize = 14F;
            this.label1.Margin = new Smobiler.Core.Controls.Margin(10F);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(96, 30);
            this.label1.Text = "label1";
            // 
            // label2
            // 
            this.label2.DisplayMember = "sexual";
            this.label2.FontSize = 14F;
            this.label2.Margin = new Smobiler.Core.Controls.Margin(10F);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(93, 30);
            this.label2.Text = "label2";
            // 
            // demoListViewTemplate
            // 
            this.BackColor = System.Drawing.Color.White;
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.panel1});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Size = new System.Drawing.Size(0, 50);
            this.Name = "demoListViewTemplate";
        }
        #endregion
        private Smobiler.Core.Controls.Panel panel1;
        private Smobiler.Core.Controls.Image image1;
        private Smobiler.Core.Controls.Label label1;
        private Smobiler.Core.Controls.Label label2;
    }
}
                using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
using SmobilerTutorialsWeb.Components;
namespace SmobilerTutorialsWeb.UserControls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱,true添加,false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class demoListViewTemplate1 : Smobiler.Core.Controls.MobileUserControl
    {
        public demoListViewTemplate1() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            ((demoListView)this.Form).countAll(checkBox1, label1.Text, label2.Text, label3.Text);
        }
    }
}
                using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.UserControls
{
    partial class demoListViewTemplate1 : Smobiler.Core.Controls.MobileUserControl
    {
        #region "SmobilerUserControl generated code "
        //SmobilerUserControl overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerUserControl
        //It can be modified using the SmobilerUserControl.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.checkBox1 = new Smobiler.Core.Controls.CheckBox();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.label2 = new Smobiler.Core.Controls.Label();
            this.label3 = new Smobiler.Core.Controls.Label();
            // 
            // panel1
            // 
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.checkBox1,
            this.label1,
            this.label2,
            this.label3});
            this.panel1.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel1.Flex = 1;
            this.panel1.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(0, 100);
            // 
            // checkBox1
            // 
            this.checkBox1.DataMember = "id";
            this.checkBox1.DisplayMember = "cb";
            this.checkBox1.Margin = new Smobiler.Core.Controls.Margin(10F, 0F, 10F, 0F);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(22, 30);
            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
            // 
            // label1
            // 
            this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label1.Bold = true;
            this.label1.DisplayMember = "lb1";
            this.label1.Flex = 1;
            this.label1.ForeColor = System.Drawing.Color.White;
            this.label1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(100, 0);
            this.label1.Text = "label1";
            // 
            // label2
            // 
            this.label2.Bold = true;
            this.label2.DisplayMember = "lb2";
            this.label2.Flex = 1;
            this.label2.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(100, 0);
            this.label2.Text = "label2";
            // 
            // label3
            // 
            this.label3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.label3.Bold = true;
            this.label3.DisplayMember = "lb3";
            this.label3.Flex = 1;
            this.label3.ForeColor = System.Drawing.Color.White;
            this.label3.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(100, 0);
            this.label3.Text = "label3";
            // 
            // demoListViewTemplate1
            // 
            this.BackColor = System.Drawing.Color.White;
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.panel1});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Size = new System.Drawing.Size(0, 30);
            this.Name = "demoListViewTemplate1";
        }
        #endregion
        private Smobiler.Core.Controls.Panel panel1;
        private Smobiler.Core.Controls.CheckBox checkBox1;
        private Smobiler.Core.Controls.Label label1;
        private Smobiler.Core.Controls.Label label2;
        private Smobiler.Core.Controls.Label label3;
    }
}
                using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace SmobilerTutorialsWeb.UserControls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱,true添加,false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class demoListViewEditTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        public string text1 { get { return textBox1.Text; } }
        public string text2 { get { return textBox2.Text; } }
        public demoListViewEditTemplate() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        public demoListViewEditTemplate(string id,string name,string sexual,string img) : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
            label2.Text = id;
            textBox1.Text = name;
            textBox2.Text = sexual;
            image1.ResourceID = img;
        }
        private void panel1_Press(object sender, EventArgs e)
        {
        }
        private void button1_Press(object sender, EventArgs e)
        {
            this.ShowResult = ShowResult.Cancel;
            this.Close();
        }
        private void button2_Press(object sender, EventArgs e)
        {
            this.ShowResult = ShowResult.Yes;
            this.Close();
        }
    }
}
                using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.UserControls
{
    partial class demoListViewEditTemplate : Smobiler.Core.Controls.MobileUserControl
    {
        #region "SmobilerUserControl generated code "
        //SmobilerUserControl overrides dispose to clean up the component list.
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
        //NOTE: The following procedure is required by the SmobilerUserControl
        //It can be modified using the SmobilerUserControl.  
        //Do not modify it using the code editor.
        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {
            this.title1 = new Smobiler.Core.Controls.Title();
            this.panel1 = new Smobiler.Core.Controls.Panel();
            this.image1 = new Smobiler.Core.Controls.Image();
            this.textBox1 = new Smobiler.Core.Controls.TextBox();
            this.textBox2 = new Smobiler.Core.Controls.TextBox();
            this.button1 = new Smobiler.Core.Controls.Button();
            this.button2 = new Smobiler.Core.Controls.Button();
            this.label1 = new Smobiler.Core.Controls.Label();
            this.label2 = new Smobiler.Core.Controls.Label();
            // 
            // title1
            // 
            this.title1.Name = "title1";
            this.title1.Size = new System.Drawing.Size(0, 30);
            this.title1.Text = "编辑";
            // 
            // panel1
            // 
            this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.image1,
            this.textBox1,
            this.textBox2,
            this.button1,
            this.button2,
            this.label1,
            this.label2});
            this.panel1.Direction = Smobiler.Core.Controls.LayoutDirection.Row;
            this.panel1.Flex = 1;
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(0, 100);
            this.panel1.Touchable = true;
            this.panel1.Press += new System.EventHandler(this.panel1_Press);
            // 
            // image1
            // 
            this.image1.Location = new System.Drawing.Point(130, 56);
            this.image1.Name = "image1";
            this.image1.Size = new System.Drawing.Size(81, 79);
            // 
            // textBox1
            // 
            this.textBox1.Border = new Smobiler.Core.Controls.Border(1F);
            this.textBox1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.textBox1.Location = new System.Drawing.Point(249, 76);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(120, 35);
            // 
            // textBox2
            // 
            this.textBox2.Border = new Smobiler.Core.Controls.Border(1F);
            this.textBox2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.textBox2.Location = new System.Drawing.Point(249, 129);
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(120, 35);
            // 
            // button1
            // 
            this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(67)))), ((int)(((byte)(81)))));
            this.button1.Location = new System.Drawing.Point(134, 189);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(100, 30);
            this.button1.Text = "取消";
            this.button1.Press += new System.EventHandler(this.button1_Press);
            // 
            // button2
            // 
            this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
            this.button2.Location = new System.Drawing.Point(281, 189);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(100, 30);
            this.button2.Text = "保存";
            this.button2.Press += new System.EventHandler(this.button2_Press);
            // 
            // label1
            // 
            this.label1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Right;
            this.label1.Location = new System.Drawing.Point(249, 21);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(48, 35);
            this.label1.Text = "id:";
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(297, 21);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(72, 35);
            this.label2.Text = "label2";
            // 
            // demoListViewEditTemplate
            // 
            this.BackColor = System.Drawing.Color.White;
            this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
            this.title1,
            this.panel1});
            this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
            this.Size = new System.Drawing.Size(500, 300);
            this.Name = "demoListViewEditTemplate";
        }
        #endregion
        private Smobiler.Core.Controls.Title title1;
        private Smobiler.Core.Controls.Panel panel1;
        private Smobiler.Core.Controls.Image image1;
        private Smobiler.Core.Controls.TextBox textBox1;
        private Smobiler.Core.Controls.TextBox textBox2;
        private Smobiler.Core.Controls.Button button1;
        private Smobiler.Core.Controls.Button button2;
        private Smobiler.Core.Controls.Label label1;
        private Smobiler.Core.Controls.Label label2;
    }
}