235 references to FocusNavigationDirection
PresentationCore (4)
Core\CSharp\MS\Internal\UIElementHelper.cs (1)
48
internal static DependencyObject PredictFocus(DependencyObject o,
FocusNavigationDirection
direction)
Core\CSharp\System\Windows\ContentElement.cs (1)
527
public virtual DependencyObject PredictFocus(
FocusNavigationDirection
direction)
Core\CSharp\System\Windows\UIElement.cs (1)
2677
public virtual DependencyObject PredictFocus(
FocusNavigationDirection
direction)
Core\CSharp\System\Windows\UIElement3D.cs (1)
637
public virtual DependencyObject PredictFocus(
FocusNavigationDirection
direction)
PresentationFramework (218)
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (3)
624
forward ?
FocusNavigationDirection
.First :
FocusNavigationDirection
.Last);
1252
return Browser.TabOut(request.FocusNavigationDirection ==
FocusNavigationDirection
.Next);
src\Framework\MS\Internal\Controls\WebBrowserSite.cs (4)
267
FocusNavigationDirection
direction =
269
FocusNavigationDirection
.Previous :
FocusNavigationDirection
.Next;
285
Host.MoveFocus(new TraversalRequest((
FocusNavigationDirection
)direction));
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (1)
366
FocusNavigationDirection
direction = KeyboardNavigation.KeyToTraversalDirection(e.Key);
src\Framework\System\Windows\Controls\ComboBox.cs (6)
1361
NavigateByLine(HighlightedInfo,
FocusNavigationDirection
.Up, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
1381
NavigateByLine(HighlightedInfo,
FocusNavigationDirection
.Down, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
1450
NavigateByLine(HighlightedInfo,
FocusNavigationDirection
.Right, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
1473
NavigateByLine(HighlightedInfo,
FocusNavigationDirection
.Left, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
1494
NavigateByPage(HighlightedInfo,
FocusNavigationDirection
.Up, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
1502
NavigateByPage(HighlightedInfo,
FocusNavigationDirection
.Down, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
src\Framework\System\Windows\Controls\DataGrid.cs (19)
5554
private static
FocusNavigationDirection
KeyToTraversalDirection(Key key)
5559
return
FocusNavigationDirection
.Left;
5562
return
FocusNavigationDirection
.Right;
5565
return
FocusNavigationDirection
.Up;
5569
return
FocusNavigationDirection
.Down;
5727
MoveFocus(new TraversalRequest(e.Key == Key.Left ?
FocusNavigationDirection
.Left :
FocusNavigationDirection
.Right));
5773
MoveFocus(new TraversalRequest(e.Key == Key.Left ?
FocusNavigationDirection
.Left :
FocusNavigationDirection
.Right));
5807
MoveFocus(new TraversalRequest(
FocusNavigationDirection
.Up));
5842
MoveFocus(new TraversalRequest(
FocusNavigationDirection
.Down));
5889
(e.Key == Key.Up ?
FocusNavigationDirection
.Up :
FocusNavigationDirection
.Down),
5933
FocusNavigationDirection
direction = previous ?
FocusNavigationDirection
.Previous :
FocusNavigationDirection
.Next;
6182
FocusNavigationDirection
direction = e.Key == Key.PageUp ?
FocusNavigationDirection
.Up :
FocusNavigationDirection
.Down;
src\Framework\System\Windows\Controls\DatePicker.cs (2)
912
this._calendar.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
927
this.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
src\Framework\System\Windows\Controls\GroupBox.cs (1)
51
MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
src\Framework\System\Windows\Controls\ItemsControl.cs (64)
1873
internal bool NavigateByLine(
FocusNavigationDirection
direction, ItemNavigateArgs itemNavigateArgs)
1890
FocusNavigationDirection
direction,
1923
FocusNavigationDirection
direction,
1931
FocusNavigationDirection
direction,
1963
FocusNavigationDirection
direction,
2088
case
FocusNavigationDirection
.Down:
2101
case
FocusNavigationDirection
.Up:
2124
|| (direction ==
FocusNavigationDirection
.Down &&
2127
|| (direction ==
FocusNavigationDirection
.Up &&
2133
if (direction ==
FocusNavigationDirection
.Up)
2139
else if (direction ==
FocusNavigationDirection
.Down)
2190
FocusNavigationDirection
direction,
2223
internal bool NavigateByPage(
FocusNavigationDirection
direction, ItemNavigateArgs itemNavigateArgs)
2230
FocusNavigationDirection
direction,
2239
FocusNavigationDirection
direction,
2271
FocusNavigationDirection
direction,
2308
case
FocusNavigationDirection
.Up:
2321
case
FocusNavigationDirection
.Down:
2411
FocusNavigationDirection
.Up,
2477
FocusNavigationDirection
.Down,
2597
FocusNavigationDirection
direction = isHorizontal ?
FocusNavigationDirection
.Right :
FocusNavigationDirection
.Down;
2631
private void AdjustOffsetToAlignWithEdge(FrameworkElement element,
FocusNavigationDirection
direction)
2644
if (direction ==
FocusNavigationDirection
.Down)
2656
else if (direction ==
FocusNavigationDirection
.Up)
2674
private void MakeVisible(int index,
FocusNavigationDirection
direction, bool alwaysAtTopOfViewport, out FrameworkElement container)
2700
private void MakeVisible(ItemInfo info,
FocusNavigationDirection
direction, out FrameworkElement container)
2716
internal void MakeVisible(FrameworkElement container,
FocusNavigationDirection
direction, bool alwaysAtTopOfViewport)
2746
GetFirstItemOnCurrentPage(container,
FocusNavigationDirection
.Up, out firstElement);
2768
GetFirstItemOnCurrentPage(container,
FocusNavigationDirection
.Up, out firstElement);
2774
private bool NavigateToFirstItemOnCurrentPage(object startingItem,
FocusNavigationDirection
direction, ItemNavigateArgs itemNavigateArgs, bool shouldFocus, out FrameworkElement container)
2791
FocusNavigationDirection
direction,
2794
Debug.Assert(direction ==
FocusNavigationDirection
.Up || direction ==
FocusNavigationDirection
.Down, "Can only get the first item on a page using North or South");
2808
if (direction ==
FocusNavigationDirection
.Up)
2822
if (direction ==
FocusNavigationDirection
.Up)
2846
if (direction ==
FocusNavigationDirection
.Up)
2848
direction =
FocusNavigationDirection
.Left;
2850
else if (direction ==
FocusNavigationDirection
.Down)
2852
direction =
FocusNavigationDirection
.Right;
2929
private bool IsOnCurrentPage(object item,
FocusNavigationDirection
axis)
2941
private bool IsOnCurrentPage(FrameworkElement element,
FocusNavigationDirection
axis)
2953
private bool IsOnCurrentPage(FrameworkElement viewPort, FrameworkElement element,
FocusNavigationDirection
axis, bool fullyVisible)
2960
FocusNavigationDirection
axis,
2969
FocusNavigationDirection
axis,
2996
FocusNavigationDirection
axis,
3017
bool northSouth = (axis ==
FocusNavigationDirection
.Up || axis ==
FocusNavigationDirection
.Down);
3018
bool eastWest = (axis ==
FocusNavigationDirection
.Left || axis ==
FocusNavigationDirection
.Right);
3100
private bool IsInDirectionForLineNavigation(Rect fromRect, Rect toRect,
FocusNavigationDirection
direction, bool isHorizontal)
3102
Debug.Assert(direction ==
FocusNavigationDirection
.Up ||
3103
direction ==
FocusNavigationDirection
.Down);
3105
if (direction ==
FocusNavigationDirection
.Down)
3118
else if (direction ==
FocusNavigationDirection
.Up)
3311
NavigateByLine(startingInfo,
FocusNavigationDirection
.Up, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers));
3316
NavigateByLine(startingInfo,
FocusNavigationDirection
.Down, new ItemNavigateArgs(Mouse.PrimaryDevice, Keyboard.Modifiers));
3325
FocusNavigationDirection
direction =
FocusNavigationDirection
.Left;
3328
direction =
FocusNavigationDirection
.Right;
3335
FocusNavigationDirection
direction =
FocusNavigationDirection
.Right;
3338
direction =
FocusNavigationDirection
.Left;
src\Framework\System\Windows\Controls\ListBox.cs (2)
481
NavigateByPage(
FocusNavigationDirection
.Up, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
485
NavigateByPage(
FocusNavigationDirection
.Down, new ItemNavigateArgs(e.Device, Keyboard.Modifiers));
src\Framework\System\Windows\Controls\Primitives\CalendarItem.cs (3)
476
focusTarget.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
679
b.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
771
b.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
src\Framework\System\Windows\Controls\ScrollViewer.cs (1)
979
FocusNavigationDirection
direction = KeyboardNavigation.KeyToTraversalDirection(e.Key);
src\Framework\System\Windows\Controls\TabItem.cs (2)
318
bool success = selectedContentPresenter.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
353
bool success = selectedContentPresenter.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.First));
src\Framework\System\Windows\Controls\ToolBar.cs (2)
290
ToolBarOverflowPanel.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.Next));
678
MoveFocus(new TraversalRequest(
FocusNavigationDirection
.Last));
src\Framework\System\Windows\Controls\TreeView.cs (3)
582
if (MoveFocus(new TraversalRequest(
FocusNavigationDirection
.Previous)))
721
(e.Key == Key.PageUp ?
FocusNavigationDirection
.Up :
FocusNavigationDirection
.Down),
src\Framework\System\Windows\Controls\TreeViewItem.cs (4)
681
FocusNavigationDirection
direction = (up ?
FocusNavigationDirection
.Up :
FocusNavigationDirection
.Down);
709
private bool AllowHandleKeyEvent(
FocusNavigationDirection
direction)
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (16)
427
isHorizontal ?
FocusNavigationDirection
.Right :
FocusNavigationDirection
.Down,
549
FocusNavigationDirection
.Right,
675
FocusNavigationDirection
.Down,
785
isHorizontal ?
FocusNavigationDirection
.Right :
FocusNavigationDirection
.Down,
884
isHorizontal ?
FocusNavigationDirection
.Right :
FocusNavigationDirection
.Down,
907
isHorizontal ?
FocusNavigationDirection
.Right :
FocusNavigationDirection
.Down,
1095
FocusNavigationDirection
direction,
1109
FocusNavigationDirection
direction,
1181
double startPosition = (direction ==
FocusNavigationDirection
.Down)
1256
if (direction ==
FocusNavigationDirection
.Down)
1287
if (direction ==
FocusNavigationDirection
.Down)
1313
if (direction ==
FocusNavigationDirection
.Down)
src\Framework\System\Windows\FrameworkContentElement.cs (1)
1031
public sealed override DependencyObject PredictFocus(
FocusNavigationDirection
direction)
src\Framework\System\Windows\FrameworkElement.cs (1)
5330
public sealed override DependencyObject PredictFocus(
FocusNavigationDirection
direction)
src\Framework\System\Windows\Input\KeyboardNavigation.cs (83)
1049
case
FocusNavigationDirection
.Next:
1054
case
FocusNavigationDirection
.Previous:
1059
case
FocusNavigationDirection
.First:
1064
case
FocusNavigationDirection
.Last:
1069
case
FocusNavigationDirection
.Left:
1070
case
FocusNavigationDirection
.Right:
1071
case
FocusNavigationDirection
.Up:
1072
case
FocusNavigationDirection
.Down:
1082
if (request.Wrapped || request.FocusNavigationDirection ==
FocusNavigationDirection
.First || request.FocusNavigationDirection ==
FocusNavigationDirection
.Last)
1094
else if (shouldCycle && (request.FocusNavigationDirection ==
FocusNavigationDirection
.Next || request.FocusNavigationDirection ==
FocusNavigationDirection
.Previous))
1099
return Navigate(visualRoot, new TraversalRequest(request.FocusNavigationDirection ==
FocusNavigationDirection
.Next ?
FocusNavigationDirection
.First :
FocusNavigationDirection
.Last));
1121
if (request.FocusNavigationDirection ==
FocusNavigationDirection
.First || request.FocusNavigationDirection ==
FocusNavigationDirection
.Next)
1123
traversed = inputSink.TabInto(new TraversalRequest(
FocusNavigationDirection
.First));
1125
else if (request.FocusNavigationDirection ==
FocusNavigationDirection
.Last || request.FocusNavigationDirection ==
FocusNavigationDirection
.Previous)
1127
traversed = inputSink.TabInto(new TraversalRequest(
FocusNavigationDirection
.Last));
1208
if (request.FocusNavigationDirection ==
FocusNavigationDirection
.Left ||
1209
request.FocusNavigationDirection ==
FocusNavigationDirection
.Right ||
1210
request.FocusNavigationDirection ==
FocusNavigationDirection
.Up ||
1211
request.FocusNavigationDirection ==
FocusNavigationDirection
.Down)
1350
internal static
FocusNavigationDirection
KeyToTraversalDirection(Key key)
1355
return
FocusNavigationDirection
.Left;
1358
return
FocusNavigationDirection
.Right;
1361
return
FocusNavigationDirection
.Up;
1364
return
FocusNavigationDirection
.Down;
1370
internal DependencyObject PredictFocusedElement(DependencyObject sourceElement,
FocusNavigationDirection
direction)
1375
internal DependencyObject PredictFocusedElement(DependencyObject sourceElement,
FocusNavigationDirection
direction, bool treeViewNavigation)
1381
FocusNavigationDirection
direction,
1398
FocusNavigationDirection
direction,
1422
FocusNavigationDirection
direction,
1493
FocusNavigationDirection
.Previous :
FocusNavigationDirection
.Next), modifiers, fromProcessInput);
1497
success = Navigate(sourceElement, new TraversalRequest(
FocusNavigationDirection
.Right), modifiers);
1501
success = Navigate(sourceElement, new TraversalRequest(
FocusNavigationDirection
.Left), modifiers);
1505
success = Navigate(sourceElement, new TraversalRequest(
FocusNavigationDirection
.Up), modifiers);
1509
success = Navigate(sourceElement, new TraversalRequest(
FocusNavigationDirection
.Down), modifiers);
2628
private double GetPerpDistance(Rect sourceRect, Rect targetRect,
FocusNavigationDirection
direction)
2632
case
FocusNavigationDirection
.Right :
2635
case
FocusNavigationDirection
.Left :
2638
case
FocusNavigationDirection
.Up :
2641
case
FocusNavigationDirection
.Down :
2645
throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(
FocusNavigationDirection
));
2652
private double GetDistance(Rect sourceRect, Rect targetRect,
FocusNavigationDirection
direction)
2658
case
FocusNavigationDirection
.Right :
2665
case
FocusNavigationDirection
.Left :
2672
case
FocusNavigationDirection
.Up :
2679
case
FocusNavigationDirection
.Down :
2687
throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(
FocusNavigationDirection
));
2694
private bool IsInDirection(Rect fromRect, Rect toRect,
FocusNavigationDirection
direction)
2698
case
FocusNavigationDirection
.Right:
2700
case
FocusNavigationDirection
.Left:
2702
case
FocusNavigationDirection
.Up :
2704
case
FocusNavigationDirection
.Down :
2707
throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(
FocusNavigationDirection
));
2748
private bool IsInRange(DependencyObject sourceElement, DependencyObject targetElement, Rect sourceRect, Rect targetRect,
FocusNavigationDirection
direction, double startRange, double endRange)
2752
case
FocusNavigationDirection
.Right :
2753
case
FocusNavigationDirection
.Left :
2766
if (direction ==
FocusNavigationDirection
.Right)
2774
case
FocusNavigationDirection
.Up :
2775
case
FocusNavigationDirection
.Down :
2788
if (direction ==
FocusNavigationDirection
.Down)
2796
throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(
FocusNavigationDirection
));
2802
private DependencyObject GetNextInDirection(DependencyObject sourceElement,
FocusNavigationDirection
direction)
2807
private DependencyObject GetNextInDirection(DependencyObject sourceElement,
FocusNavigationDirection
direction, bool treeViewNavigation)
2813
FocusNavigationDirection
direction,
2928
FocusNavigationDirection
direction,
2984
FocusNavigationDirection
direction,
3014
bool horizontalDirection = direction ==
FocusNavigationDirection
.Right || direction ==
FocusNavigationDirection
.Left;
3086
FocusNavigationDirection
direction,
3139
case
FocusNavigationDirection
.Up:
3142
case
FocusNavigationDirection
.Down:
3145
case
FocusNavigationDirection
.Left:
3148
case
FocusNavigationDirection
.Right:
3160
case
FocusNavigationDirection
.Up:
3161
case
FocusNavigationDirection
.Down:
3164
case
FocusNavigationDirection
.Left:
3165
case
FocusNavigationDirection
.Right:
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (1)
1179
focusedElement.MoveFocus(new TraversalRequest(
FocusNavigationDirection
.Next));
WindowsBase (12)
Base\System\Windows\Input\TraversalRequest.cs (12)
15
public TraversalRequest(
FocusNavigationDirection
focusNavigationDirection)
17
if (focusNavigationDirection !=
FocusNavigationDirection
.Next &&
18
focusNavigationDirection !=
FocusNavigationDirection
.Previous &&
19
focusNavigationDirection !=
FocusNavigationDirection
.First &&
20
focusNavigationDirection !=
FocusNavigationDirection
.Last &&
21
focusNavigationDirection !=
FocusNavigationDirection
.Left &&
22
focusNavigationDirection !=
FocusNavigationDirection
.Right &&
23
focusNavigationDirection !=
FocusNavigationDirection
.Up &&
24
focusNavigationDirection !=
FocusNavigationDirection
.Down)
26
throw new System.ComponentModel.InvalidEnumArgumentException("focusNavigationDirection", (int)focusNavigationDirection, typeof(
FocusNavigationDirection
));
44
public
FocusNavigationDirection
FocusNavigationDirection { get { return _focusNavigationDirection; } }
47
private
FocusNavigationDirection
_focusNavigationDirection;