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