Ejemplo n.º 1
0
        private void SelectedCellChangedHandler(object sender, CellSelectManager.SelectedCellChangedEventArgs e)
        {
            UpdateScrollView(e);

            (string, string)cellPosition = e.ChangedCell.CellPosition.GetStringCoords();
            SelectedCell = $"{cellPosition.Item1}{cellPosition.Item2}";
        }
Ejemplo n.º 2
0
        private void UpdateScrollView(CellSelectManager.SelectedCellChangedEventArgs e)
        {
            Rect cellRect;

            if (!TryCalculateRelativeCellRect(e.ChangedCell, out cellRect))
            {
                return;
            }

            var gridRect     = new Rect(0, 0, this.ActualWidth, this.ActualHeight);
            var intersection = Rect.Intersect(gridRect, cellRect);

            if (intersection == cellRect)
            {
                return;
            }

            ScrollToCell(cellRect);
        }