Beispiel #1
0
 /// <summary>
 ///     Check whether a position of a grid is empty. It does not check if the position would be
 ///     off grid and may throw an exception.
 /// </summary>
 /// <param name="grid">The grid, positions will be checked against.</param>
 /// <param name="row">The index of the row to check whether its occupied.</param>
 /// <param name="column">The index of the column to check whether its occupied.</param>
 /// <returns><code>false</code> when the position is occupied - <code>true</code> otherwise. </returns>
 private static bool IsEmptyFast(WPFGrid grid, int row, int column)
 {
     return(!grid.GetChildAt(row, column).Any());
 }