protected override void OnIsItemsHostChanged(bool oldIsItemsHost, bool newIsItemsHost) { base.OnIsItemsHostChanged(oldIsItemsHost, newIsItemsHost); var rowPresenter = AyTableViewUtils.FindParent <AyTableViewCellsPresenter>(this); if (rowPresenter != null) { rowPresenter.CellsPanel = this; ParentTableView = rowPresenter.ParentTableView; this.Style = ParentTableView.CellsPanelStyle; } }
internal int GetCellIndexAtLocation(Point loc) { var uie = InputHitTest(loc) as FrameworkElement; if (uie != null) { var rowPresenter = AyTableViewUtils.GetAncestorByType <AyTableViewCellsPresenter>(uie); if (rowPresenter != null) { var cell = AyTableViewUtils.FindParent <AyTableViewCell>(uie); if (cell != null) { return(rowPresenter.ItemContainerGenerator.IndexFromContainer(cell)); } } } return(-1); }