Exemplo n.º 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);
            }
Exemplo n.º 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;
                }
            }
Exemplo n.º 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;
                }
            }
Exemplo n.º 4
0
            public override void WillReorderItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
            {
                TKListViewCell cell = listView.CellForItem(indexPath);

                cell.BackgroundView.BackgroundColor = UIColor.Yellow;
            }
Exemplo n.º 5
0
 public override void WillReorderItemAtIndexPath(TKListView listView, NSIndexPath indexPath)
 {
     TKListViewCell cell = listView.CellForItem(indexPath);
     cell.BackgroundView.BackgroundColor = UIColor.Yellow;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
     }
 }