Exemplo n.º 1
0
        private void RenderTransformCursor(GridLocation finalLocation)
        {
            GridLocation delta = GridLocation.Substraction(GetActiveCell( ), finalLocation);

            GridLocation spanstart;
            GridLocation spannumber;

            if (finalLocation.Row < GetActiveCell( ).Row)
            {
                spanstart.Row = finalLocation.Row;
            }
            else
            {
                spanstart.Row = GetActiveCell( ).Row;
            }
            if (finalLocation.Column < GetActiveCell( ).Column)
            {
                spanstart.Column = finalLocation.Column;
            }
            else
            {
                spanstart.Column = GetActiveCell( ).Column;
            }

            spannumber.Row    = Math.Abs(delta.Row) + 1;
            spannumber.Column = Math.Abs(delta.Column) + 1;

            Grid.SetColumn(Frame, spanstart.Column);
            Grid.SetRow(Frame, spanstart.Row);

            Grid.SetColumnSpan(Frame, spannumber.Column);
            Grid.SetRowSpan(Frame, spannumber.Row);

            Frame.Focus( );
        }