166 references to OriginalSource
Microsoft.VisualStudio.LanguageServices (4)
DocumentOutline\DocumentOutlineView.xaml.cs (2)
288
&& e.
OriginalSource
is TreeViewItem { DataContext: DocumentSymbolDataViewModel symbolModel } item
321
if (e.
OriginalSource
is TreeViewItem item)
InheritanceMargin\MarginGlyph\InheritanceMarginContextMenu.xaml.cs (1)
50
if (e.
OriginalSource
is MenuItem { DataContext: TargetMenuItemViewModel viewModel })
InheritanceMargin\MarginGlyph\InheritanceMarginGlyph.cs (1)
176
if (e.
OriginalSource
is ContextMenu { DataContext: InheritanceMarginGlyphViewModel inheritanceMarginViewModel }
PresentationCore (7)
System\Windows\Input\AccessKeyManager.cs (2)
295
if (ProcessKeyForSender(e.
OriginalSource
, text, false /* existsElsewhere */,e.UserInitiated) != ProcessKeyResult.NoMatch)
320
if (ProcessKeyForSender(e.
OriginalSource
, text, false /* existsElsewhere */,e.UserInitiated) != ProcessKeyResult.NoMatch)
System\Windows\Input\Command\CommandBinding.cs (1)
159
Source = e.
OriginalSource
System\Windows\Input\Command\CommandDevice.cs (1)
88
IInputElement commandTarget = e.StagingItem.Input.
OriginalSource
as IInputElement;
System\Windows\RoutedEventArgs.cs (2)
20
/// <see cref="RoutedEventArgs.
OriginalSource
"/> <para/>
48
/// <see cref="
OriginalSource
"/> also defaults to null
System\Windows\UIElement.cs (1)
2316
args.Source = args.
OriginalSource
;
PresentationFramework (70)
System\Windows\Controls\Calendar.cs (1)
1221
if (!e.Handled && e.
OriginalSource
== c)
System\Windows\Controls\ComboBox.cs (7)
1064
if (e.
OriginalSource
== comboBox)
1069
else if (e.
OriginalSource
== comboBox.EditableTextBoxSite)
1305
if (IsEditable && e.
OriginalSource
== EditableTextBoxSite)
1676
if (e.
OriginalSource
== comboBox)
1687
if (MenuBase.IsDescendant(comboBox, e.
OriginalSource
as DependencyObject))
1720
if (Mouse.Captured == comboBox && e.
OriginalSource
== comboBox)
1733
Visual originalSource = e.
OriginalSource
as Visual;
System\Windows\Controls\Control.cs (2)
567
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
574
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
System\Windows\Controls\DataGrid.cs (5)
2287
UIElement source = e.
OriginalSource
as UIElement;
5400
bool shouldProcess = (e.
OriginalSource
== this);
5403
ItemsControl itemsControl = ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject);
5551
bool navigateFromCellContainer = e.
OriginalSource
== currentCellContainer;
6330
UIElement sourceElement = e.
OriginalSource
as UIElement;
System\Windows\Controls\DataGridCell.cs (2)
548
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
561
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
System\Windows\Controls\DatePicker.cs (2)
840
if (e.
OriginalSource
== picker)
845
else if (e.
OriginalSource
== picker._textBox)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1013
if (e.
OriginalSource
== ScrollViewer)
System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
1094
if (_headerSV != null && _mainSV == e.
OriginalSource
)
1103
if (_mainSV != null && _headerSV == e.
OriginalSource
)
System\Windows\Controls\ItemsControl.cs (3)
1647
(e.
OriginalSource
== this || ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject) == this))
3167
UIElement focusedElement = e.
OriginalSource
as UIElement;
System\Windows\Controls\ListBox.cs (3)
402
ListBoxItem source = e.
OriginalSource
as ListBoxItem;
500
if (e.
OriginalSource
is GridViewColumnHeader gridViewColumnHeader && gridViewColumnHeader.Column != null)
548
if (e.
OriginalSource
== this && Mouse.Captured == this)
System\Windows\Controls\Menu.cs (1)
273
FrameworkElement element = e.
OriginalSource
as FrameworkElement;
System\Windows\Controls\MenuItem.cs (3)
1042
if (sender != e.
OriginalSource
)
1045
MenuItem source = e.
OriginalSource
as MenuItem;
1553
if (e.
OriginalSource
== menuItem && menuItem.IsSubmenuOpen)
System\Windows\Controls\PopupControlService.cs (1)
956
IInputElement source = e.
OriginalSource
as IInputElement;
System\Windows\Controls\Primitives\ButtonBase.cs (4)
524
if ((e.
OriginalSource
== this) && (ClickMode != ClickMode.Hover) && !IsSpaceKeyDown)
606
if ((!IsMouseCaptured) && (e.
OriginalSource
== this))
623
if (e.
OriginalSource
== this)
711
if (e.
OriginalSource
== this)
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
108
if (!PresentationSource.IsUnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
System\Windows\Controls\Primitives\MenuBase.cs (4)
330
MenuItem newSelectedMenuItem = e.
OriginalSource
as MenuItem;
537
if (e.
OriginalSource
== menu)
548
if (MenuBase.IsDescendant(menu, e.
OriginalSource
as DependencyObject))
575
MenuItem menuItemSource = e.
OriginalSource
as MenuItem;
System\Windows\Controls\Primitives\Popup.cs (2)
1113
if (_popupRoot != null && e.
OriginalSource
== _popupRoot)
1229
bool reestablishCapture = e.
OriginalSource
!= root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero;
System\Windows\Controls\Primitives\Selector.cs (2)
1886
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, true, e);
1891
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, false, e);
System\Windows\Controls\ScrollViewer.cs (2)
926
if (e.
OriginalSource
== this)
1648
if (!PresentationSource.IsUnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
System\Windows\Controls\Slider.cs (3)
809
Thumb thumb = e.
OriginalSource
as Thumb;
842
Thumb thumb = e.
OriginalSource
as Thumb;
891
Thumb thumb = e.
OriginalSource
as Thumb;
System\Windows\Controls\StickyNote.cs (1)
1202
Visual source = args.
OriginalSource
as Visual;
System\Windows\Controls\ToolBar.cs (1)
694
ButtonBase bb = args.
OriginalSource
as ButtonBase;
System\Windows\Controls\ToolBarTray.cs (1)
506
Thumb thumb = e.
OriginalSource
as Thumb;
System\windows\Documents\TextEditorMouse.cs (1)
656
ScrollViewer scrollViewer = e.
OriginalSource
as ScrollViewer;
System\windows\Documents\TextEditorTyping.cs (5)
250
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
282
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
328
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
357
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
1258
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
System\Windows\FrameworkContentElement.cs (2)
1023
if (sender == e.
OriginalSource
)
1036
if (sender == e.
OriginalSource
)
System\Windows\FrameworkElement.cs (3)
5327
if (e.
OriginalSource
== sender)
5353
if (sender == e.
OriginalSource
)
5367
if (sender == e.
OriginalSource
)
System\Windows\Input\KeyboardNavigation.cs (1)
1188
DependencyObject sourceElement = keyEventArgs.
OriginalSource
as DependencyObject;
System\Windows\Navigation\NavigationService.cs (1)
101
DependencyObject dobj = e.
OriginalSource
as DependencyObject;
System\Windows\Window.cs (3)
7022
if (!PresentationSource.IsUnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
7031
_currentPanningTarget.Target != e.
OriginalSource
)
7044
UpdatePanningFeedback(manipulation.Translation, e.
OriginalSource
);
System.Windows.Controls.Ribbon (85)
Microsoft\Windows\Controls\KeyTipService.cs (1)
753
DependencyObject globalScope = GetGlobalScopeForElement(keyArgs.
OriginalSource
as DependencyObject);
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (16)
1786
if (!RibbonHelper.IsAncestorOf(_itemsPresenterPopup.TryGetChild(), e.
OriginalSource
as DependencyObject) &&
1787
!RibbonHelper.IsAncestorOf(_tabHeaderItemsControl, e.
OriginalSource
as DependencyObject))
1830
TreeHelper.IsVisualAncestorOf(this, e.
OriginalSource
as DependencyObject))
2382
ContextMenuOriginalSource = e.
OriginalSource
as UIElement;
2424
DependencyObject obj = args.
OriginalSource
as DependencyObject;
2439
UIElement originalSource = args.
OriginalSource
as UIElement;
2472
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2487
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2501
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2516
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2530
DependencyObject obj = args.
OriginalSource
as DependencyObject;
2540
UIElement originalSource = args.
OriginalSource
as UIElement;
2559
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2575
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2589
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2605
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (4)
379
if (e.
OriginalSource
== this)
445
DependencyObject element = e.
OriginalSource
as DependencyObject;
486
DependencyObject element = e.
OriginalSource
as DependencyObject;
514
DependencyObject element = e.
OriginalSource
as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
214
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (2)
212
if (e.
OriginalSource
== this)
226
else if (e.
OriginalSource
== HeaderButton)
Microsoft\Windows\Controls\Ribbon\RibbonButton.cs (2)
574
if (e.
OriginalSource
== this)
587
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonCheckBox.cs (2)
582
if (e.
OriginalSource
== this)
595
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (7)
173
if (e.
OriginalSource
== this)
178
else if (e.
OriginalSource
== EditableTextBoxSite)
1209
if (e.
OriginalSource
== this ||
1210
e.
OriginalSource
== PartToggleButton)
1256
Visual originalSource = e.
OriginalSource
as Visual;
1556
if (e.
OriginalSource
== this)
1564
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonFilterMenuButton.cs (1)
134
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (2)
2741
e.Handled = menuItem.HandleLeftKeyDown(e.
OriginalSource
as DependencyObject);
2783
RibbonHelper.IsAncestorOf(filterPane, e.
OriginalSource
as DependencyObject))
Microsoft\Windows\Controls\Ribbon\RibbonGalleryItem.cs (6)
419
if (e.
OriginalSource
== this)
428
if (e.
OriginalSource
== this)
452
if (e.
OriginalSource
== this)
478
if (e.
OriginalSource
== this && RibbonGallery != null && RibbonGallery.ShouldGalleryItemsAcquireFocus)
786
if (e.
OriginalSource
== this)
801
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (3)
1633
if (e.
OriginalSource
== this)
1670
placementTarget = RibbonHelper.GetContainingUIElement(e.
OriginalSource
as DependencyObject);
1748
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (3)
1037
if (e.
OriginalSource
== targetCapture)
1072
else if (RibbonHelper.IsAncestorOf(targetCapture, e.
OriginalSource
as DependencyObject))
1155
if (!cancelPredicate(e.
OriginalSource
as DependencyObject))
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (11)
731
if (e.
OriginalSource
== _partToggleButton ||
732
e.
OriginalSource
== this)
751
if (e.
OriginalSource
== this ||
752
e.
OriginalSource
== _partToggleButton)
787
int focusedIndex = ItemContainerGenerator.IndexFromContainer(e.
OriginalSource
as DependencyObject);
889
FrameworkElement selectionItem = e.
OriginalSource
as FrameworkElement;
1393
FrameworkElement source = e.
OriginalSource
as FrameworkElement;
1506
if (e.
OriginalSource
!= this &&
1508
!TreeHelper.IsVisualAncestorOf(this, e.
OriginalSource
as DependencyObject))
1657
if (e.
OriginalSource
== this)
1670
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (7)
827
int focusedIndex = ItemContainerGenerator.IndexFromContainer(e.
OriginalSource
as DependencyObject);
872
handled = HandleLeftKeyDown(e.
OriginalSource
as DependencyObject);
1003
if (e.
OriginalSource
== this)
1488
if (sender != e.
OriginalSource
)
1491
FrameworkElement selectionItem = e.
OriginalSource
as FrameworkElement;
1794
if (e.
OriginalSource
== this)
1810
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (2)
638
if (e.
OriginalSource
== _overflowButton)
658
if (e.
OriginalSource
== _overflowButton)
Microsoft\Windows\Controls\Ribbon\RibbonRadioButton.cs (2)
598
if (e.
OriginalSource
== this)
611
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonSplitButton.cs (2)
533
if (e.
OriginalSource
== this)
540
else if (e.
OriginalSource
== _headerButton)
Microsoft\Windows\Controls\Ribbon\RibbonSplitMenuItem.cs (4)
247
if (e.
OriginalSource
== _partArrowButton)
373
if (e.
OriginalSource
== this)
387
else if (e.
OriginalSource
== HeaderButton)
398
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
843
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (2)
634
if (e.
OriginalSource
== this)
702
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTextBox.cs (2)
687
if (e.
OriginalSource
== this)
700
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonToggleButton.cs (2)
617
if (e.
OriginalSource
== this)
630
if (e.
OriginalSource
== this)