85 references to FocusedElement
PresentationCore (29)
MS\Internal\Automation\ElementProxy.cs (1)
357AutomationPeer focusedPeer = AutomationPeer.AutomationPeerFromInputElement(Keyboard.FocusedElement);
MS\Internal\Interop\TipTsfHelper.cs (1)
81if (Keyboard.FocusedElement == focusedObject)
System\Windows\ContentElement.cs (1)
480return (Keyboard.FocusedElement == this);
System\Windows\Input\Command\CommandDevice.cs (2)
40return Keyboard.FocusedElement; 289return Keyboard.FocusedElement;
System\Windows\Input\Command\RoutedCommand.cs (5)
93Execute(parameter, FilterInputElement(Keyboard.FocusedElement)); 104return CanExecuteImpl(parameter, FilterInputElement(Keyboard.FocusedElement), false, out unused); 139target = FilterInputElement(Keyboard.FocusedElement); 175target = FilterInputElement(Keyboard.FocusedElement); 375target = FilterInputElement(Keyboard.FocusedElement);
System\Windows\Input\DefaultTextStore.cs (2)
150_composition = new DefaultTextStoreTextComposition(InputManager.Current, Keyboard.FocusedElement, result, TextCompositionAutoComplete.On); 180_composition = new DefaultTextStoreTextComposition(InputManager.Current, Keyboard.FocusedElement, "", TextCompositionAutoComplete.Off);
System\Windows\Input\FocusManager.cs (2)
231DependencyObject oldFocus = Keyboard.FocusedElement as DependencyObject; 233DependencyObject newFocus = Keyboard.FocusedElement as DependencyObject;
System\Windows\Input\InputMethod.cs (8)
550IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 587hwnd = HwndFromInputElement(Keyboard.FocusedElement); 783IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 834hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1041IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1115IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1307if (inputElement == Keyboard.FocusedElement) 1341hwnd = HwndFromInputElement(Keyboard.FocusedElement);
System\Windows\Input\TextServicesManager.cs (2)
139DependencyObject element = Keyboard.FocusedElement as DependencyObject; 175DependencyObject element = Keyboard.FocusedElement as DependencyObject;
System\Windows\InterOp\HwndKeyboardInputProvider.cs (2)
353DependencyObject focusedDO = Keyboard.FocusedElement as DependencyObject; 502restoreFocusDO = (DependencyObject)Keyboard.FocusedElement;
System\Windows\InterOp\HwndSource.cs (1)
2082DependencyObject focusObject = Keyboard.FocusedElement as DependencyObject;
System\Windows\UIElement.cs (1)
2593return (Keyboard.FocusedElement == this);
System\Windows\UIElement3D.cs (1)
574return (Keyboard.FocusedElement == this);
PresentationFramework (42)
MS\Internal\Documents\DocumentViewerHelper.cs (1)
342DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
System\Windows\Controls\Button.cs (3)
97b.UpdateIsDefaulted(Keyboard.FocusedElement); 115b.UpdateIsDefaulted(Keyboard.FocusedElement); 199UpdateIsDefaulted(Keyboard.FocusedElement);
System\Windows\Controls\ComboBox.cs (1)
1141DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
System\Windows\Controls\ContextMenu.cs (2)
606if (Keyboard.FocusedElement != null) 608_weakRefToPreviousFocus = new WeakReference<IInputElement>(Keyboard.FocusedElement);
System\Windows\Controls\DataGrid.cs (8)
5588UIElement startElement = Keyboard.FocusedElement as UIElement; 5589ContentElement startContentElement = (startElement == null) ? Keyboard.FocusedElement as ContentElement : null; 5878FrameworkElement startingElement = Keyboard.FocusedElement as FrameworkElement; 5922UIElement startElement = Keyboard.FocusedElement as UIElement; 5923ContentElement startContentElement = (startElement == null) ? Keyboard.FocusedElement as ContentElement : null; 5936if (wasEditing && previous && Keyboard.FocusedElement == currentCellContainer) 6031DataGridCell newCell = Keyboard.FocusedElement as DataGridCell; 6182startingElement = Keyboard.FocusedElement as FrameworkElement;
System\Windows\Controls\FlowDocumentReader.cs (2)
933focusedElement = Keyboard.FocusedElement as DependencyObject; 990DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
System\Windows\Controls\ItemsControl.cs (2)
1872DependencyObject startingElement = Keyboard.FocusedElement as DependencyObject; 2222return NavigateByPage(FocusedInfo, Keyboard.FocusedElement as FrameworkElement, direction, itemNavigateArgs);
System\Windows\Controls\MenuItem.cs (2)
2377object previousFocus = Keyboard.FocusedElement; 2379object currentFocus = Keyboard.FocusedElement;
System\Windows\Controls\PopupControlService.cs (1)
276DependencyObject owner = FindToolTipOwner(Keyboard.FocusedElement, ToolTipService.TriggerAction.KeyboardShortcut);
System\Windows\Controls\Primitives\Selector.cs (1)
1326DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
System\Windows\Controls\Primitives\TextBoxBase.cs (1)
2181if (Keyboard.FocusedElement == textBox)
System\Windows\Controls\ScrollViewer.cs (1)
954DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
System\Windows\Controls\StickyNote.cs (1)
566ContextMenu menu = Keyboard.FocusedElement as ContextMenu;
System\Windows\Controls\TabItem.cs (5)
302if (e.OldFocus != Keyboard.FocusedElement) 335if (e.OldFocus != Keyboard.FocusedElement) 361if (Keyboard.FocusedElement is DependencyObject focusedElement) 364if (thisFocusScope != null && Keyboard.FocusedElement is DependencyObject currentFocus) 487TabItem currentFocus = Keyboard.FocusedElement as TabItem;
System\Windows\Controls\TreeView.cs (2)
705IInputElement originalFocusedElement = Keyboard.FocusedElement; 760DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
System\Windows\Controls\TreeViewItem.cs (2)
684IInputElement originalFocus = Keyboard.FocusedElement; 715DependencyObject currentFocus = Keyboard.FocusedElement as DependencyObject;
System\windows\Documents\TextEditorMouse.cs (2)
200if (This.UiScope != Keyboard.FocusedElement) 651return This.UiScope == Keyboard.FocusedElement &&
System\Windows\Documents\TextStore.cs (1)
1206if (Keyboard.FocusedElement == UiScope)
System\Windows\FrameworkElement.cs (3)
5348IInputElement oldFocus = Keyboard.FocusedElement; 5351if (Keyboard.FocusedElement == activeElement || Keyboard.FocusedElement != oldFocus)
System\Windows\Input\KeyboardNavigation.cs (1)
840Current.ShowFocusVisual(Keyboard.FocusedElement as DependencyObject);
System.Windows.Controls.Ribbon (14)
Microsoft\Windows\Controls\KeyTipService.cs (2)
949object oldFocusedElement = Keyboard.FocusedElement; 962object newFocusedElement = Keyboard.FocusedElement;
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (4)
2000RibbonGroup ribbonGroup = TreeHelper.FindVisualAncestor<RibbonGroup>(Keyboard.FocusedElement as DependencyObject); 2074RibbonControl ribbonControl = TreeHelper.FindVisualAncestor<RibbonControl>(Keyboard.FocusedElement as DependencyObject); 2106!TreeHelper.IsVisualAncestorOf(targetControl, Keyboard.FocusedElement as DependencyObject)) 2245DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (2)
1198DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject; 1446RibbonGalleryItem focusedGalleryItem = Keyboard.FocusedElement as RibbonGalleryItem;
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (1)
2674DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (2)
482UIElement uie = Keyboard.FocusedElement as UIElement; 487ContentElement ce = Keyboard.FocusedElement as ContentElement;
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (1)
807DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
378DependencyObject focusedElement = Keyboard.FocusedElement as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (1)
535if (!((bool)e.NewValue) && Keyboard.FocusedElement == d)