System\Windows\Automation\Peers\TextElementAutomationPeer.cs (8)
40return TextContainerHelper.GetAutomationPeersFromRange(textElement.ContentStart, textElement.ContentEnd, null);
56Geometry geometry = textView.GetTightBoundingGeometryFromTextPositions(textElement.ContentStart, textElement.ContentEnd);
97if (textView == null || !textView.IsValid || (!textView.Contains(textElement.ContentStart) && !textView.Contains(textElement.ContentEnd)))
117TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward);
121Rect rectElement = CalculateVisibleRect(textView, textElement, textElement.ContentStart, endPosition);
151if (textView == null || !textView.IsValid || (!textView.Contains(textElement.ContentStart) && !textView.Contains(textElement.ContentEnd)))
156if (CalculateVisibleRect(textView, textElement, textElement.ContentStart, textElement.ContentEnd) == Rect.Empty)
211return TextContainerHelper.GetAutomationPeersFromRange(start, end, textElement.ContentStart);
System\Windows\Documents\TextRangeEdit.cs (11)
34newElement.TextContainer.SetValues(newElement.ContentStart, element.GetLocalValueEnumerator());
550element.Reposition(element.ContentStart, newElement.ElementStart);
642bool needToSplitListItem = TextPointerBase.GetImmediateListItem(paragraph.ContentStart) != null;
754start = startParagraphOrBlockUIContainer.ContentStart;
805TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward;
1310nextPosition = ((Inline)nextPosition.GetAdjacentElement(LogicalDirection.Forward)).ContentStart;
1906MergeFormattingInlines(run.ContentStart);
2179ClearPropertyValueFromSpansAndRuns(inline.ContentStart, inline.ContentEnd, formattingProperty);
2209ClearPropertyValueFromSpansAndRuns(span.ContentStart, span.ContentEnd, formattingProperty);
2227SetStructuralInlineProperty(end.Paragraph.ContentStart, end, formattingProperty, value);
2240SetStructuralInlineProperty(paragraph.ContentStart, paragraph.ContentEnd, formattingProperty, value);
System\Windows\Documents\TextRangeEditLists.cs (15)
111previousBlock.Reposition(previousBlock.ContentStart, secondParagraphOrBlockUIContainer.ElementEnd);
131firstParagraphOrBlockUIContainer.Reposition(firstParagraphOrBlockUIContainer.ContentStart, secondParagraphOrBlockUIContainer.ElementEnd);
154precedingListItem.Reposition(precedingListItem.ContentStart, followingListItem.ElementEnd);
223precedingList.Reposition(precedingList.ContentStart, followingList.ElementEnd);
354leadingListItem.Reposition(leadingListItem.ContentStart, lastListItem.ElementEnd);
377if (listItem.ContentStart.CompareTo(listItem.ContentEnd) == 0)
379TextRangeEditTables.EnsureInsertionPosition(listItem.ContentStart);
423leadingListItem.Reposition(leadingListItem.ContentStart, indentedList.ElementEnd);
433lastListItem.Reposition(lastListItem.ContentStart, nestedListOfLastItem.ElementStart);
513if (outerListItem.ContentStart.CompareTo(firstListItem.ElementStart) == 0)
521outerListItem.Reposition(outerListItem.ContentStart, firstListItem.ElementStart);
536lastListItem.Reposition(lastListItem.ContentStart, outerListItemEnd);
563if (listItem.ContentStart.CompareTo(listItem.ContentEnd) == 0)
565TextRangeEditTables.EnsureInsertionPosition(listItem.ContentStart);
715if (!UnindentListItems(new TextRange(endListItem.List.ContentStart, GetPositionAfterList(endListItem.List))))
System\Windows\Documents\TextRangeEditTables.cs (42)
380anchorRow != null ? anchorRow.ContentStart : anchorPosition,
387movingRow != null ? movingRow.ContentStart : movingPosition,
459movingPosition = anchorCell.ContentStart.GetInsertionPosition();
532movingPosition = movingCell.ContentStart.GetInsertionPosition();
544movingPosition = anchorCell.Table.ContentStart;
568row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward);
600row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward);
830position = tableRowGroup.ContentStart;
839position = tableRow.ContentStart;
848position = tableCell.ContentStart;
857position = listItem.ContentStart;
910insertionPosition = implicitRun.ContentStart.GetFrozenPointer(position.LogicalDirection); // return a position with the same orientation inside a Run
925insertionPosition = implicitRun.ContentStart.GetFrozenPointer(position.LogicalDirection); // return a position with the same orientation inside a Run
1026TextRange rowsSegment = new TextRange(startRow.ContentStart, endRow.ContentEnd);
1044TextRange rowsSegment = new TextRange(startRow.ContentStart, startRow.Table.ContentEnd);
1057TextRange rowsSegment = new TextRange(endRow.Table.ContentStart, endRow.ContentEnd);
1141cell.ContentStart.TextContainer.SetValue(cell.ContentStart, TableCell.RowSpanProperty, cell.RowSpan + (rowCount > 0 ? rowCount : -rowCount));
1209return rowCount > 0 ? new TextRange(firstInsertedRow.ContentStart, lastInsertedRow.ContentEnd) : new TextRange(lastInsertedRow.ContentStart, firstInsertedRow.ContentEnd);
1324spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - deletedRowsCount);
1337newCell.ContentStart.TextContainer.SetValue(newCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - (nextRow.Index - spannedCell.Row.Index));
1408cellInsertAfter.ContentStart.TextContainer.SetValue(cellInsertAfter.ContentStart, TableCell.ColumnSpanProperty, cellInsertAfter.ColumnSpan + 1);
1519cellDelete.ContentStart.TextContainer.SetValue(cellDelete.ContentStart, TableCell.ColumnSpanProperty, cellDelete.ColumnSpan - 1);
1769IParentUndoUnit columnResizeUndoUnit = new ColumnResizeUndoUnit(table.ContentStart, columnIndex, _columnWidths, dx);
1925startCell.ContentStart.TextContainer.SetValue(startCell.ContentStart, TableCell.ColumnSpanProperty, startCell.ColumnSpan - 1);
1939return new TextRange(startCell.ContentStart, startCell.ContentStart);
1992TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward);
2451firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.RowSpanProperty, rowSpan);
2453firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.ColumnSpanProperty, columnSpan);
2454result = new TextRange(firstCell.ContentStart, firstCell.ContentStart);
2484spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, rowSpan);