System\Windows\Automation\Peers\TextElementAutomationPeer.cs (8)
39return TextContainerHelper.GetAutomationPeersFromRange(textElement.ContentStart, textElement.ContentEnd, null);
55Geometry geometry = textView.GetTightBoundingGeometryFromTextPositions(textElement.ContentStart, textElement.ContentEnd);
96if (textView == null || !textView.IsValid || (!textView.Contains(textElement.ContentStart) && !textView.Contains(textElement.ContentEnd)))
116TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward);
120Rect rectElement = CalculateVisibleRect(textView, textElement, textElement.ContentStart, endPosition);
150if (textView == null || !textView.IsValid || (!textView.Contains(textElement.ContentStart) && !textView.Contains(textElement.ContentEnd)))
155if (CalculateVisibleRect(textView, textElement, textElement.ContentStart, textElement.ContentEnd) == Rect.Empty)
210return TextContainerHelper.GetAutomationPeersFromRange(start, end, textElement.ContentStart);
System\Windows\Documents\TextRangeEdit.cs (11)
33newElement.TextContainer.SetValues(newElement.ContentStart, element.GetLocalValueEnumerator());
549element.Reposition(element.ContentStart, newElement.ElementStart);
641bool needToSplitListItem = TextPointerBase.GetImmediateListItem(paragraph.ContentStart) != null;
753start = startParagraphOrBlockUIContainer.ContentStart;
804TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward;
1309nextPosition = ((Inline)nextPosition.GetAdjacentElement(LogicalDirection.Forward)).ContentStart;
1905MergeFormattingInlines(run.ContentStart);
2178ClearPropertyValueFromSpansAndRuns(inline.ContentStart, inline.ContentEnd, formattingProperty);
2208ClearPropertyValueFromSpansAndRuns(span.ContentStart, span.ContentEnd, formattingProperty);
2226SetStructuralInlineProperty(end.Paragraph.ContentStart, end, formattingProperty, value);
2239SetStructuralInlineProperty(paragraph.ContentStart, paragraph.ContentEnd, formattingProperty, value);
System\Windows\Documents\TextRangeEditLists.cs (15)
110previousBlock.Reposition(previousBlock.ContentStart, secondParagraphOrBlockUIContainer.ElementEnd);
130firstParagraphOrBlockUIContainer.Reposition(firstParagraphOrBlockUIContainer.ContentStart, secondParagraphOrBlockUIContainer.ElementEnd);
153precedingListItem.Reposition(precedingListItem.ContentStart, followingListItem.ElementEnd);
222precedingList.Reposition(precedingList.ContentStart, followingList.ElementEnd);
353leadingListItem.Reposition(leadingListItem.ContentStart, lastListItem.ElementEnd);
376if (listItem.ContentStart.CompareTo(listItem.ContentEnd) == 0)
378TextRangeEditTables.EnsureInsertionPosition(listItem.ContentStart);
422leadingListItem.Reposition(leadingListItem.ContentStart, indentedList.ElementEnd);
432lastListItem.Reposition(lastListItem.ContentStart, nestedListOfLastItem.ElementStart);
512if (outerListItem.ContentStart.CompareTo(firstListItem.ElementStart) == 0)
520outerListItem.Reposition(outerListItem.ContentStart, firstListItem.ElementStart);
535lastListItem.Reposition(lastListItem.ContentStart, outerListItemEnd);
562if (listItem.ContentStart.CompareTo(listItem.ContentEnd) == 0)
564TextRangeEditTables.EnsureInsertionPosition(listItem.ContentStart);
714if (!UnindentListItems(new TextRange(endListItem.List.ContentStart, GetPositionAfterList(endListItem.List))))
System\Windows\Documents\TextRangeEditTables.cs (42)
379anchorRow != null ? anchorRow.ContentStart : anchorPosition,
386movingRow != null ? movingRow.ContentStart : movingPosition,
458movingPosition = anchorCell.ContentStart.GetInsertionPosition();
531movingPosition = movingCell.ContentStart.GetInsertionPosition();
543movingPosition = anchorCell.Table.ContentStart;
567row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward);
599row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward);
829position = tableRowGroup.ContentStart;
838position = tableRow.ContentStart;
847position = tableCell.ContentStart;
856position = listItem.ContentStart;
909insertionPosition = implicitRun.ContentStart.GetFrozenPointer(position.LogicalDirection); // return a position with the same orientation inside a Run
924insertionPosition = implicitRun.ContentStart.GetFrozenPointer(position.LogicalDirection); // return a position with the same orientation inside a Run
1025TextRange rowsSegment = new TextRange(startRow.ContentStart, endRow.ContentEnd);
1043TextRange rowsSegment = new TextRange(startRow.ContentStart, startRow.Table.ContentEnd);
1056TextRange rowsSegment = new TextRange(endRow.Table.ContentStart, endRow.ContentEnd);
1140cell.ContentStart.TextContainer.SetValue(cell.ContentStart, TableCell.RowSpanProperty, cell.RowSpan + (rowCount > 0 ? rowCount : -rowCount));
1208return rowCount > 0 ? new TextRange(firstInsertedRow.ContentStart, lastInsertedRow.ContentEnd) : new TextRange(lastInsertedRow.ContentStart, firstInsertedRow.ContentEnd);
1323spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - deletedRowsCount);
1336newCell.ContentStart.TextContainer.SetValue(newCell.ContentStart, TableCell.RowSpanProperty, spannedCell.RowSpan - (nextRow.Index - spannedCell.Row.Index));
1407cellInsertAfter.ContentStart.TextContainer.SetValue(cellInsertAfter.ContentStart, TableCell.ColumnSpanProperty, cellInsertAfter.ColumnSpan + 1);
1518cellDelete.ContentStart.TextContainer.SetValue(cellDelete.ContentStart, TableCell.ColumnSpanProperty, cellDelete.ColumnSpan - 1);
1768IParentUndoUnit columnResizeUndoUnit = new ColumnResizeUndoUnit(table.ContentStart, columnIndex, _columnWidths, dx);
1924startCell.ContentStart.TextContainer.SetValue(startCell.ContentStart, TableCell.ColumnSpanProperty, startCell.ColumnSpan - 1);
1938return new TextRange(startCell.ContentStart, startCell.ContentStart);
1991TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward);
2450firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.RowSpanProperty, rowSpan);
2452firstCell.ContentStart.TextContainer.SetValue(firstCell.ContentStart, TableCell.ColumnSpanProperty, columnSpan);
2453result = new TextRange(firstCell.ContentStart, firstCell.ContentStart);
2483spannedCell.ContentStart.TextContainer.SetValue(spannedCell.ContentStart, TableCell.RowSpanProperty, rowSpan);