예제 #1
0
            public override void DidReorderItemFromIndexPath(TKListView listView, NSIndexPath originalIndexPath, NSIndexPath targetIndexPath)
            {
                TKListViewCell cell = listView.CellForItem(originalIndexPath);

                cell.BackgroundView.BackgroundColor = UIColor.White;
                this.owner.dataSource.DidReorderItemFromTo(listView, originalIndexPath, targetIndexPath);
            }
예제 #2
0
            public override void DidHighlightItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
            {
                Console.WriteLine("Did highlight item at row {0}", this.owner.dataSource.Items [indexPath.Row]);
                TKListViewCell cell = listView.CellForItem(indexPath);

                if (!cell.Selected && listView.SelectionBehavior == TKListViewSelectionBehavior.LongPress)
                {
                    cell.SelectedBackgroundView.Hidden = true;
                }
            }
예제 #3
0
            // >> listview-respond-cs
            public override void DidSelectItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
            {
                this.owner.label.Text = string.Format("Selected: {0}", this.owner.dataSource.Items[indexPath.Row]);
                Console.WriteLine("Did select item at row {0}", this.owner.dataSource.Items [indexPath.Row]);
                TKListViewCell cell = listView.CellForItem(indexPath);

                if (cell != null)
                {
                    cell.SelectedBackgroundView.Hidden = false;
                }
            }
예제 #4
0
            public override void WillReorderItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
            {
                TKListViewCell cell = listView.CellForItem(indexPath);

                cell.BackgroundView.BackgroundColor = UIColor.Yellow;
            }
예제 #5
0
 public override void WillReorderItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
 {
     TKListViewCell cell = listView.CellForItem(indexPath);
     cell.BackgroundView.BackgroundColor = UIColor.Yellow;
 }
예제 #6
0
 public override void DidReorderItemFromIndexPath(TKListView listView, NSIndexPath originalIndexPath, NSIndexPath targetIndexPath)
 {
     TKListViewCell cell = listView.CellForItem(originalIndexPath);
     cell.BackgroundView.BackgroundColor = UIColor.White;
     this.owner.dataSource.DidReorderItemFromTo (listView, originalIndexPath, targetIndexPath);
 }
예제 #7
0
 public override void DidSelectItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
 {
     this.owner.label.Text = string.Format("Selected: {0}", this.owner.dataSource.Items[indexPath.Row]);
     Console.WriteLine ("Did select item at row {0}", this.owner.dataSource.Items [indexPath.Row]);
     TKListViewCell cell = listView.CellForItem (indexPath);
     if (cell != null) {
         cell.SelectedBackgroundView.Hidden = false;
     }
 }
예제 #8
0
 public override void DidHighlightItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
 {
     Console.WriteLine ("Did highlight item at row {0}", this.owner.dataSource.Items [indexPath.Row]);
     TKListViewCell cell = listView.CellForItem (indexPath);
     if (!cell.Selected && listView.SelectionBehavior == TKListViewSelectionBehavior.LongPress)
     {
         cell.SelectedBackgroundView.Hidden = true;
     }
 }