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)
294
if (ProcessKeyForSender(e.
OriginalSource
, text, existsElsewhere: false,e.UserInitiated) != ProcessKeyResult.NoMatch)
319
if (ProcessKeyForSender(e.
OriginalSource
, text, existsElsewhere: false,e.UserInitiated) != ProcessKeyResult.NoMatch)
System\Windows\Input\Command\CommandBinding.cs (1)
158
Source = e.
OriginalSource
System\Windows\Input\Command\CommandDevice.cs (1)
87
IInputElement commandTarget = e.StagingItem.Input.
OriginalSource
as IInputElement;
System\Windows\RoutedEventArgs.cs (2)
19
/// <see cref="RoutedEventArgs.
OriginalSource
"/> <para/>
47
/// <see cref="
OriginalSource
"/> also defaults to null
System\Windows\UIElement.cs (1)
2315
args.Source = args.
OriginalSource
;
PresentationFramework (70)
System\Windows\Controls\Calendar.cs (1)
1220
if (!e.Handled && e.
OriginalSource
== c)
System\Windows\Controls\ComboBox.cs (7)
1063
if (e.
OriginalSource
== comboBox)
1068
else if (e.
OriginalSource
== comboBox.EditableTextBoxSite)
1304
if (IsEditable && e.
OriginalSource
== EditableTextBoxSite)
1675
if (e.
OriginalSource
== comboBox)
1686
if (MenuBase.IsDescendant(comboBox, e.
OriginalSource
as DependencyObject))
1719
if (Mouse.Captured == comboBox && e.
OriginalSource
== comboBox)
1732
Visual originalSource = e.
OriginalSource
as Visual;
System\Windows\Controls\Control.cs (2)
566
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
573
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
System\Windows\Controls\DataGrid.cs (5)
2286
UIElement source = e.
OriginalSource
as UIElement;
5399
bool shouldProcess = (e.
OriginalSource
== this);
5402
ItemsControl itemsControl = ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject);
5550
bool navigateFromCellContainer = e.
OriginalSource
== currentCellContainer;
6329
UIElement sourceElement = e.
OriginalSource
as UIElement;
System\Windows\Controls\DataGridCell.cs (2)
547
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
560
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
System\Windows\Controls\DatePicker.cs (2)
839
if (e.
OriginalSource
== picker)
844
else if (e.
OriginalSource
== picker._textBox)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1012
if (e.
OriginalSource
== ScrollViewer)
System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
1093
if (_headerSV != null && _mainSV == e.
OriginalSource
)
1102
if (_mainSV != null && _headerSV == e.
OriginalSource
)
System\Windows\Controls\ItemsControl.cs (3)
1646
(e.
OriginalSource
== this || ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject) == this))
3166
UIElement focusedElement = e.
OriginalSource
as UIElement;
System\Windows\Controls\ListBox.cs (3)
401
ListBoxItem source = e.
OriginalSource
as ListBoxItem;
499
if (e.
OriginalSource
is GridViewColumnHeader gridViewColumnHeader && gridViewColumnHeader.Column != null)
547
if (e.
OriginalSource
== this && Mouse.Captured == this)
System\Windows\Controls\Menu.cs (1)
272
FrameworkElement element = e.
OriginalSource
as FrameworkElement;
System\Windows\Controls\MenuItem.cs (3)
1041
if (sender != e.
OriginalSource
)
1044
MenuItem source = e.
OriginalSource
as MenuItem;
1552
if (e.
OriginalSource
== menuItem && menuItem.IsSubmenuOpen)
System\Windows\Controls\PopupControlService.cs (1)
955
IInputElement source = e.
OriginalSource
as IInputElement;
System\Windows\Controls\Primitives\ButtonBase.cs (4)
523
if ((e.
OriginalSource
== this) && (ClickMode != ClickMode.Hover) && !IsSpaceKeyDown)
605
if ((!IsMouseCaptured) && (e.
OriginalSource
== this))
622
if (e.
OriginalSource
== this)
710
if (e.
OriginalSource
== this)
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
107
if (!PresentationSource.IsUnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
System\Windows\Controls\Primitives\MenuBase.cs (4)
329
MenuItem newSelectedMenuItem = e.
OriginalSource
as MenuItem;
536
if (e.
OriginalSource
== menu)
547
if (MenuBase.IsDescendant(menu, e.
OriginalSource
as DependencyObject))
574
MenuItem menuItemSource = e.
OriginalSource
as MenuItem;
System\Windows\Controls\Primitives\Popup.cs (2)
1112
if (_popupRoot != null && e.
OriginalSource
== _popupRoot)
1228
bool reestablishCapture = e.
OriginalSource
!= root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero;
System\Windows\Controls\Primitives\Selector.cs (2)
1885
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, true, e);
1890
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, false, e);
System\Windows\Controls\ScrollViewer.cs (2)
925
if (e.
OriginalSource
== this)
1647
if (!PresentationSource.IsUnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
System\Windows\Controls\Slider.cs (3)
808
Thumb thumb = e.
OriginalSource
as Thumb;
841
Thumb thumb = e.
OriginalSource
as Thumb;
890
Thumb thumb = e.
OriginalSource
as Thumb;
System\Windows\Controls\StickyNote.cs (1)
1201
Visual source = args.
OriginalSource
as Visual;
System\Windows\Controls\ToolBar.cs (1)
693
ButtonBase bb = args.
OriginalSource
as ButtonBase;
System\Windows\Controls\ToolBarTray.cs (1)
505
Thumb thumb = e.
OriginalSource
as Thumb;
System\windows\Documents\TextEditorMouse.cs (1)
655
ScrollViewer scrollViewer = e.
OriginalSource
as ScrollViewer;
System\windows\Documents\TextEditorTyping.cs (5)
249
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
281
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
327
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
356
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
1257
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
System\Windows\FrameworkContentElement.cs (2)
1022
if (sender == e.
OriginalSource
)
1035
if (sender == e.
OriginalSource
)
System\Windows\FrameworkElement.cs (3)
5326
if (e.
OriginalSource
== sender)
5352
if (sender == e.
OriginalSource
)
5366
if (sender == e.
OriginalSource
)
System\Windows\Input\KeyboardNavigation.cs (1)
1186
DependencyObject sourceElement = keyEventArgs.
OriginalSource
as DependencyObject;
System\Windows\Navigation\NavigationService.cs (1)
100
DependencyObject dobj = e.
OriginalSource
as DependencyObject;
System\Windows\Window.cs (3)
7021
if (!PresentationSource.IsUnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
7030
_currentPanningTarget.Target != e.
OriginalSource
)
7043
UpdatePanningFeedback(manipulation.Translation, e.
OriginalSource
);
System.Windows.Controls.Ribbon (85)
Microsoft\Windows\Controls\KeyTipService.cs (1)
752
DependencyObject globalScope = GetGlobalScopeForElement(keyArgs.
OriginalSource
as DependencyObject);
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (16)
1785
if (!RibbonHelper.IsAncestorOf(_itemsPresenterPopup.TryGetChild(), e.
OriginalSource
as DependencyObject) &&
1786
!RibbonHelper.IsAncestorOf(_tabHeaderItemsControl, e.
OriginalSource
as DependencyObject))
1829
TreeHelper.IsVisualAncestorOf(this, e.
OriginalSource
as DependencyObject))
2381
ContextMenuOriginalSource = e.
OriginalSource
as UIElement;
2423
DependencyObject obj = args.
OriginalSource
as DependencyObject;
2438
UIElement originalSource = args.
OriginalSource
as UIElement;
2471
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2486
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2500
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2515
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2529
DependencyObject obj = args.
OriginalSource
as DependencyObject;
2539
UIElement originalSource = args.
OriginalSource
as UIElement;
2558
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2574
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2588
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2604
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (4)
378
if (e.
OriginalSource
== this)
444
DependencyObject element = e.
OriginalSource
as DependencyObject;
485
DependencyObject element = e.
OriginalSource
as DependencyObject;
513
DependencyObject element = e.
OriginalSource
as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
213
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (2)
211
if (e.
OriginalSource
== this)
225
else if (e.
OriginalSource
== HeaderButton)
Microsoft\Windows\Controls\Ribbon\RibbonButton.cs (2)
573
if (e.
OriginalSource
== this)
586
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonCheckBox.cs (2)
581
if (e.
OriginalSource
== this)
594
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (7)
172
if (e.
OriginalSource
== this)
177
else if (e.
OriginalSource
== EditableTextBoxSite)
1208
if (e.
OriginalSource
== this ||
1209
e.
OriginalSource
== PartToggleButton)
1255
Visual originalSource = e.
OriginalSource
as Visual;
1555
if (e.
OriginalSource
== this)
1563
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonFilterMenuButton.cs (1)
133
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (2)
2740
e.Handled = menuItem.HandleLeftKeyDown(e.
OriginalSource
as DependencyObject);
2782
RibbonHelper.IsAncestorOf(filterPane, e.
OriginalSource
as DependencyObject))
Microsoft\Windows\Controls\Ribbon\RibbonGalleryItem.cs (6)
418
if (e.
OriginalSource
== this)
427
if (e.
OriginalSource
== this)
451
if (e.
OriginalSource
== this)
477
if (e.
OriginalSource
== this && RibbonGallery != null && RibbonGallery.ShouldGalleryItemsAcquireFocus)
785
if (e.
OriginalSource
== this)
800
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (3)
1632
if (e.
OriginalSource
== this)
1669
placementTarget = RibbonHelper.GetContainingUIElement(e.
OriginalSource
as DependencyObject);
1747
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (3)
1036
if (e.
OriginalSource
== targetCapture)
1071
else if (RibbonHelper.IsAncestorOf(targetCapture, e.
OriginalSource
as DependencyObject))
1154
if (!cancelPredicate(e.
OriginalSource
as DependencyObject))
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (11)
730
if (e.
OriginalSource
== _partToggleButton ||
731
e.
OriginalSource
== this)
750
if (e.
OriginalSource
== this ||
751
e.
OriginalSource
== _partToggleButton)
786
int focusedIndex = ItemContainerGenerator.IndexFromContainer(e.
OriginalSource
as DependencyObject);
888
FrameworkElement selectionItem = e.
OriginalSource
as FrameworkElement;
1392
FrameworkElement source = e.
OriginalSource
as FrameworkElement;
1505
if (e.
OriginalSource
!= this &&
1507
!TreeHelper.IsVisualAncestorOf(this, e.
OriginalSource
as DependencyObject))
1656
if (e.
OriginalSource
== this)
1669
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (7)
826
int focusedIndex = ItemContainerGenerator.IndexFromContainer(e.
OriginalSource
as DependencyObject);
871
handled = HandleLeftKeyDown(e.
OriginalSource
as DependencyObject);
1002
if (e.
OriginalSource
== this)
1487
if (sender != e.
OriginalSource
)
1490
FrameworkElement selectionItem = e.
OriginalSource
as FrameworkElement;
1792
if (e.
OriginalSource
== this)
1808
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (2)
637
if (e.
OriginalSource
== _overflowButton)
657
if (e.
OriginalSource
== _overflowButton)
Microsoft\Windows\Controls\Ribbon\RibbonRadioButton.cs (2)
597
if (e.
OriginalSource
== this)
610
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonSplitButton.cs (2)
532
if (e.
OriginalSource
== this)
539
else if (e.
OriginalSource
== _headerButton)
Microsoft\Windows\Controls\Ribbon\RibbonSplitMenuItem.cs (4)
246
if (e.
OriginalSource
== _partArrowButton)
371
if (e.
OriginalSource
== this)
385
else if (e.
OriginalSource
== HeaderButton)
396
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
842
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (2)
633
if (e.
OriginalSource
== this)
701
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTextBox.cs (2)
686
if (e.
OriginalSource
== this)
699
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonToggleButton.cs (2)
616
if (e.
OriginalSource
== this)
629
if (e.
OriginalSource
== this)