示例#1
0
        public SelectionRangePoint CreateCopy()
        {
            var copy = new SelectionRangePoint();

            copy.m_globalIndex   = this.m_globalIndex;
            copy.m_localIndex    = this.m_localIndex;
            copy.Item            = this.Item;
            copy.ColumnIndex     = this.ColumnIndex;
            copy.DataGridContext = this.DataGridContext;

            return(copy);
        }
示例#2
0
        public static SelectionRangePoint TryCreateFromCurrent(DataGridContext dataGridContext)
        {
            if (dataGridContext == null)
            {
                return(null);
            }

            var column      = dataGridContext.CurrentColumn;
            int columnIndex = (column != null) ? column.VisiblePosition : -1;

            var oldPosition = SelectionRangePoint.TryCreateRangePoint(
                dataGridContext, dataGridContext.CurrentItem,
                dataGridContext.CurrentItemIndex, columnIndex);

            return(oldPosition);
        }