79 references to FocusedElement
PresentationCore (28)
Core\CSharp\MS\Internal\Automation\ElementProxy.cs (1)
367AutomationPeer focusedPeer = AutomationPeer.AutomationPeerFromInputElement(Keyboard.FocusedElement);
Core\CSharp\System\Windows\ContentElement.cs (1)
486return (Keyboard.FocusedElement == this);
Core\CSharp\System\Windows\Input\Command\CommandDevice.cs (2)
46return Keyboard.FocusedElement; 311return Keyboard.FocusedElement;
Core\CSharp\System\Windows\Input\Command\RoutedCommand.cs (5)
100Execute(parameter, FilterInputElement(Keyboard.FocusedElement)); 116return CanExecuteImpl(parameter, FilterInputElement(Keyboard.FocusedElement), false, out unused); 156target = FilterInputElement(Keyboard.FocusedElement); 201target = FilterInputElement(Keyboard.FocusedElement); 432target = FilterInputElement(Keyboard.FocusedElement);
Core\CSharp\System\Windows\Input\DefaultTextStore.cs (2)
176_composition = new DefaultTextStoreTextComposition(InputManager.Current, Keyboard.FocusedElement, result, TextCompositionAutoComplete.On); 207_composition = new DefaultTextStoreTextComposition(InputManager.Current, Keyboard.FocusedElement, "", TextCompositionAutoComplete.Off);
Core\CSharp\System\Windows\Input\FocusManager.cs (2)
251DependencyObject oldFocus = Keyboard.FocusedElement as DependencyObject; 253DependencyObject newFocus = Keyboard.FocusedElement as DependencyObject;
Core\CSharp\System\Windows\Input\InputMethod.cs (8)
598IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 636hwnd = HwndFromInputElement(Keyboard.FocusedElement); 867IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 919hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1131IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1206IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1405if (inputElement == Keyboard.FocusedElement) 1445hwnd = HwndFromInputElement(Keyboard.FocusedElement);
Core\CSharp\System\Windows\Input\TextServicesManager.cs (2)
152DependencyObject element = Keyboard.FocusedElement as DependencyObject; 192DependencyObject element = Keyboard.FocusedElement as DependencyObject;
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (2)
406DependencyObject focusedDO = Keyboard.FocusedElement as DependencyObject; 561restoreFocusDO = (DependencyObject)Keyboard.FocusedElement;
Core\CSharp\System\Windows\Interop\HwndSource.cs (1)
2397DependencyObject focusObject = Keyboard.FocusedElement as DependencyObject;
Core\CSharp\System\Windows\UIElement.cs (1)
2622return (Keyboard.FocusedElement == this);
Core\CSharp\System\Windows\UIElement3D.cs (1)
582return (Keyboard.FocusedElement == this);
PresentationFramework (42)
src\Framework\MS\Internal\AppModel\ApplicationProxyInternal.cs (2)
167TextBoxBase textBoxBase = Keyboard.FocusedElement as TextBoxBase; 173PasswordBox passwordBox = Keyboard.FocusedElement as PasswordBox;
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (1)
362DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
src\Framework\System\Windows\Controls\Button.cs (3)
93b.UpdateIsDefaulted(Keyboard.FocusedElement); 111b.UpdateIsDefaulted(Keyboard.FocusedElement); 195UpdateIsDefaulted(Keyboard.FocusedElement);
src\Framework\System\Windows\Controls\ComboBox.cs (1)
1143DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
src\Framework\System\Windows\Controls\ContextMenu.cs (2)
610if (Keyboard.FocusedElement != null) 612_weakRefToPreviousFocus = new WeakReference<IInputElement>(Keyboard.FocusedElement);
src\Framework\System\Windows\Controls\DataGrid.cs (8)
5593UIElement startElement = Keyboard.FocusedElement as UIElement; 5594ContentElement startContentElement = (startElement == null) ? Keyboard.FocusedElement as ContentElement : null; 5883FrameworkElement startingElement = Keyboard.FocusedElement as FrameworkElement; 5927UIElement startElement = Keyboard.FocusedElement as UIElement; 5928ContentElement startContentElement = (startElement == null) ? Keyboard.FocusedElement as ContentElement : null; 5941if (wasEditing && previous && Keyboard.FocusedElement == currentCellContainer) 6036DataGridCell newCell = Keyboard.FocusedElement as DataGridCell; 6187startingElement = Keyboard.FocusedElement as FrameworkElement;
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (2)
939focusedElement = Keyboard.FocusedElement as DependencyObject; 996DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
src\Framework\System\Windows\Controls\ItemsControl.cs (2)
1875DependencyObject startingElement = Keyboard.FocusedElement as DependencyObject; 2225return NavigateByPage(FocusedInfo, Keyboard.FocusedElement as FrameworkElement, direction, itemNavigateArgs);
src\Framework\System\Windows\Controls\MenuItem.cs (2)
2437object previousFocus = Keyboard.FocusedElement; 2439object currentFocus = Keyboard.FocusedElement;
src\Framework\System\Windows\Controls\PopupControlService.cs (1)
240IInputElement focusedElement = Keyboard.FocusedElement;
src\Framework\System\Windows\Controls\Primitives\Selector.cs (1)
1344DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
src\Framework\System\Windows\Controls\Primitives\TextBoxBase.cs (1)
2217if (Keyboard.FocusedElement == textBox)
src\Framework\System\Windows\Controls\ScrollViewer.cs (1)
981DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
src\Framework\System\Windows\Controls\StickyNote.cs (1)
576ContextMenu menu = Keyboard.FocusedElement as ContextMenu;
src\Framework\System\Windows\Controls\TabItem.cs (3)
303if (e.OldFocus != Keyboard.FocusedElement) 336if (e.OldFocus != Keyboard.FocusedElement) 473TabItem currentFocus = Keyboard.FocusedElement as TabItem;
src\Framework\System\Windows\Controls\TreeView.cs (2)
707IInputElement originalFocusedElement = Keyboard.FocusedElement; 762DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
src\Framework\System\Windows\Controls\TreeViewItem.cs (2)
685IInputElement originalFocus = Keyboard.FocusedElement; 716DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
src\Framework\System\windows\Documents\TextEditorMouse.cs (2)
202if (This.UiScope != Keyboard.FocusedElement) 652return This.UiScope == Keyboard.FocusedElement &&
src\Framework\System\Windows\Documents\TextStore.cs (1)
1074if (Keyboard.FocusedElement == UiScope)
src\Framework\System\Windows\FrameworkElement.cs (3)
5346IInputElement oldFocus = Keyboard.FocusedElement; 5349if (Keyboard.FocusedElement == activeElement || Keyboard.FocusedElement != oldFocus)
src\Framework\System\Windows\Input\KeyboardNavigation.cs (1)
893Current.ShowFocusVisual(Keyboard.FocusedElement as DependencyObject);
System.Activities.Presentation (9)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CategoryList.cs (1)
764Keyboard.FocusedElement,
System.Activities.Presentation\System\Activities\Presentation\CutCopyPasteHelper.cs (1)
526pasteContainer = Keyboard.FocusedElement as ICompositeView;
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (1)
1540var currentFocus = (UIElement)Keyboard.FocusedElement;
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (2)
1175UIElement focusedElement = Keyboard.FocusedElement as UIElement; 1192WorkflowViewElement focusedElement = Keyboard.FocusedElement as WorkflowViewElement;
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (2)
596WorkflowViewElement focusedElement = Keyboard.FocusedElement as WorkflowViewElement; 994DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (2)
609shouldSetFocus = Keyboard.FocusedElement != this; 629shouldSetFocus = Keyboard.FocusedElement != this;