44 references to GetAdjacentElement
PresentationFramework (44)
src\Framework\MS\Internal\Documents\HostedElements.cs (2)
199Debug.Assert(_currentPosition.GetAdjacentElement(LogicalDirection.Forward) is IInputElement); 200currentElement = (IInputElement)_currentPosition.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (1)
988DependencyObject embeddedObject = searchPosition.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\System\Windows\Controls\TextBlock.cs (1)
3661DependencyObject embeddedObject = position.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\System\Windows\Documents\BlockUIContainer.cs (1)
76return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
src\Framework\System\Windows\Documents\Hyperlink.cs (1)
113Hyperlink hyperlink = navigator.GetAdjacentElement(LogicalDirection.Forward) as Hyperlink;
src\Framework\System\Windows\Documents\InlineUIContainer.cs (1)
107return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
src\Framework\System\Windows\Documents\List.cs (2)
260listItem = block.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as ListItem; 288block = block == lastBlock ? null : (Block)listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\System\Windows\Documents\RangeContentEnumerator.cs (1)
134_currentCache = _navigator.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\System\Windows\Documents\TextContainer.cs (1)
3438TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement;
src\Framework\System\Windows\Documents\TextPointer.cs (2)
1633TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 2431return GetAdjacentElement(direction);
src\Framework\System\Windows\Documents\TextRangeEdit.cs (15)
284(firstInline = position.GetAdjacentElement(LogicalDirection.Backward) as Inline) != null && 285(secondInline = position.GetAdjacentElement(LogicalDirection.Forward) as Inline) != null) 979firstChild = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 980lastChild = (Inline)end.GetAdjacentElement(LogicalDirection.Backward); 1303TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1305previousPosition = ((Inline)previousPosition.GetAdjacentElement(LogicalDirection.Backward)).ContentEnd; 1312TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1314nextPosition = ((Inline)nextPosition.GetAdjacentElement(LogicalDirection.Forward)).ContentStart; 2057Span parent = (Span)end.GetAdjacentElement(LogicalDirection.Backward); 2088(run = pointer.GetAdjacentElement(LogicalDirection.Forward) as Run) != null) 2153run = (Run)start.GetAdjacentElement(LogicalDirection.Forward); 2166DependencyObject forwardElement = start.GetAdjacentElement(LogicalDirection.Forward); 2167DependencyObject backwardElement = end.GetAdjacentElement(LogicalDirection.Backward); 2172Inline inline = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 2193start.GetAdjacentElement(LogicalDirection.Backward) == commonAncestor)
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (8)
104TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 149? positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Forward) as ListItem : null; 152ListItem precedingListItem = positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Backward) as ListItem; 219List precedingList = mergePosition.GetAdjacentElement(LogicalDirection.Backward) as List; 220List followingList = mergePosition.GetAdjacentElement(LogicalDirection.Forward) as List; 312Block nextBlock = block == lastBlock ? null : block.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as Block; 376ListItem nextListItem = listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as ListItem; 562ListItem nextListItem = listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as ListItem;
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (1)
1090cell = (TableCell)cellEnd.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (5)
1256TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1546Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), "The first pasted fragment item is expected to be a " + itemType.Name); 1547Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), "The last pasted fragment item is expected to be a " + itemType.Name); 1553Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), "An element preceding a pasted fragment is expected to be a " + itemType.Name); 1555Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), "An element following a pasted fragment is expected to be a " + itemType.Name);
src\Framework\System\Windows\Documents\TextSchema.cs (1)
899TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward);
src\Framework\System\Windows\Documents\TextStore.cs (1)
333TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward);