/// <summary> /// Reimplementation of <see cref="ITree.GetBlankExpansion"/> /// </summary> protected new BlankExpansionData GetBlankExpansion(int row, int column, ColumnPermutation columnPermutation) { // UNDONE: MSBUG GetBlankExpansion is returning a blank cell for the top node in a complex subitem. This // causes the Down arrow to skip any expanded subitems, which is obviously not good. This does not appear to // happen in all cases, and may be related to the SubItemCellStyle. BlankExpansionData retVal = base.GetBlankExpansion(row, column, columnPermutation); int topRow; if (retVal.Height > 1 && row == (topRow = retVal.TopRow)) { // If the next cell down does not return the same anchor, then the // initial information is incorrect and we really have a single cell. if (base.GetBlankExpansion(topRow + 1, column, columnPermutation).Anchor != retVal.Anchor) { return(BlankExpansionDataConstructor(topRow, retVal.LeftColumn, retVal.TopRow, retVal.RightColumn, retVal.AnchorColumn)); } } return(retVal); }
/// <summary> /// Compare two BlankExpansionData structures /// </summary> /// <param name="operand1">Left operand</param> /// <param name="operand2">Right operand</param> /// <returns>true if operands are equal</returns> public static bool Compare(BlankExpansionData operand1, BlankExpansionData operand2) { return operand1.myLeftColumn == operand2.myLeftColumn && operand1.myTopRow == operand2.myTopRow && operand1.myRightColumn == operand2.myRightColumn && operand1.myBottomRow == operand2.myBottomRow && operand1.myAnchorColumn == operand2.myAnchorColumn; }
/// <summary> /// Compare two BlankExpansionData structures /// </summary> /// <param name="operand1">Left operand</param> /// <param name="operand2">Right operand</param> /// <returns>true if operands are equal</returns> public static bool Compare(BlankExpansionData operand1, BlankExpansionData operand2) { return(operand1.myLeftColumn == operand2.myLeftColumn && operand1.myTopRow == operand2.myTopRow && operand1.myRightColumn == operand2.myRightColumn && operand1.myBottomRow == operand2.myBottomRow && operand1.myAnchorColumn == operand2.myAnchorColumn); }