用户
 找回密码
 立即注册
xuyily 发表于 2019-6-18 21:05
当前滑动行要是有个selected属性也好。。。这样遍历listview的时候就知道哪个当前行了。。 ...

private void swipeView1_ActionNotification(object sender, SwipeViewActionNotificationEventArgs e)
        {

            ListView ob = (ListView)this.Owner;
            ListViewRow listViewRow = ((SwipeView)sender).Parent.Tag as ListViewRow;
            int rowindex = ob.Rows.IndexOf(listViewRow);
            foreach (ListViewRow row in ob.Rows)
            {
                if (rowindex != ob.Rows.IndexOf(row))
                {
                    SwipeView swipe = (SwipeView)row.Control.Controls.Find("swipeView1");
                    swipe.Close();
                }
            }
        }
使用道具 举报 回复 支持 反对
发新帖
您需要登录后才可以回帖 登录 | 立即注册