44 references to GetAdjacentElement
PresentationFramework (44)
MS\Internal\Documents\HostedElements.cs (2)
187Debug.Assert(_currentPosition.GetAdjacentElement(LogicalDirection.Forward) is IInputElement); 188currentElement = (IInputElement)_currentPosition.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\PtsHost\FlowDocumentPage.cs (1)
958DependencyObject embeddedObject = searchPosition.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Controls\TextBlock.cs (1)
3662DependencyObject embeddedObject = position.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Documents\BlockUIContainer.cs (1)
72return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
System\Windows\Documents\Hyperlink.cs (1)
105Hyperlink hyperlink = navigator.GetAdjacentElement(LogicalDirection.Forward) as Hyperlink;
System\Windows\Documents\InlineUIContainer.cs (1)
105return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
System\Windows\Documents\List.cs (2)
250listItem = block.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as ListItem; 278block = block == lastBlock ? null : (Block)listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Documents\RangeContentEnumerator.cs (1)
122_currentCache = _navigator.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Documents\TextContainer.cs (1)
3417TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
System\Windows\Documents\TextPointer.cs (2)
1614TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 2406return GetAdjacentElement(direction);
System\Windows\Documents\TextRangeEdit.cs (15)
280(firstInline = position.GetAdjacentElement(LogicalDirection.Backward) as Inline) != null && 281(secondInline = position.GetAdjacentElement(LogicalDirection.Forward) as Inline) != null) 975firstChild = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 976lastChild = (Inline)end.GetAdjacentElement(LogicalDirection.Backward); 1299TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1301previousPosition = ((Inline)previousPosition.GetAdjacentElement(LogicalDirection.Backward)).ContentEnd; 1308TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1310nextPosition = ((Inline)nextPosition.GetAdjacentElement(LogicalDirection.Forward)).ContentStart; 2053Span parent = (Span)end.GetAdjacentElement(LogicalDirection.Backward); 2084(run = pointer.GetAdjacentElement(LogicalDirection.Forward) as Run) != null) 2149run = (Run)start.GetAdjacentElement(LogicalDirection.Forward); 2162DependencyObject forwardElement = start.GetAdjacentElement(LogicalDirection.Forward); 2163DependencyObject backwardElement = end.GetAdjacentElement(LogicalDirection.Backward); 2168Inline inline = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 2189start.GetAdjacentElement(LogicalDirection.Backward) == commonAncestor)
System\Windows\Documents\TextRangeEditLists.cs (8)
100TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 145? positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Forward) as ListItem : null; 148ListItem precedingListItem = positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Backward) as ListItem; 215List precedingList = mergePosition.GetAdjacentElement(LogicalDirection.Backward) as List; 216List followingList = mergePosition.GetAdjacentElement(LogicalDirection.Forward) as List; 308Block nextBlock = block == lastBlock ? null : block.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as Block; 372ListItem nextListItem = listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as ListItem; 558ListItem nextListItem = listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as ListItem;
System\Windows\Documents\TextRangeEditTables.cs (1)
1085cell = (TableCell)cellEnd.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Documents\TextRangeSerialization.cs (5)
1226TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1516Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1518Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1525Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1528Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()),
System\Windows\Documents\TextSchema.cs (1)
896TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Documents\TextStore.cs (1)
429TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward);