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