166 references to OriginalSource
Microsoft.VisualStudio.LanguageServices (4)
DocumentOutline\DocumentOutlineView.xaml.cs (2)
287
&& e.
OriginalSource
is TreeViewItem { DataContext: DocumentSymbolDataViewModel symbolModel } item
316
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)
307
if (ProcessKeyForSender(e.
OriginalSource
, text, false /* existsElsewhere */,e.UserInitiated) != ProcessKeyResult.NoMatch)
332
if (ProcessKeyForSender(e.
OriginalSource
, text, false /* existsElsewhere */,e.UserInitiated) != ProcessKeyResult.NoMatch)
System\Windows\Input\Command\CommandBinding.cs (1)
167
Source = e.
OriginalSource
System\Windows\Input\Command\CommandDevice.cs (1)
95
IInputElement commandTarget = e.StagingItem.Input.
OriginalSource
as IInputElement;
System\Windows\RoutedEventArgs.cs (2)
26
/// <see cref="RoutedEventArgs.
OriginalSource
"/> <para/>
54
/// <see cref="
OriginalSource
"/> also defaults to null
System\Windows\UIElement.cs (1)
2329
args.Source = args.
OriginalSource
;
PresentationFramework (70)
System\Windows\Controls\Calendar.cs (1)
1233
if (!e.Handled && e.
OriginalSource
== c)
System\Windows\Controls\ComboBox.cs (7)
1078
if (e.
OriginalSource
== comboBox)
1083
else if (e.
OriginalSource
== comboBox.EditableTextBoxSite)
1317
if (IsEditable && e.
OriginalSource
== EditableTextBoxSite)
1688
if (e.
OriginalSource
== comboBox)
1699
if (MenuBase.IsDescendant(comboBox, e.
OriginalSource
as DependencyObject))
1732
if (Mouse.Captured == comboBox && e.
OriginalSource
== comboBox)
1745
Visual originalSource = e.
OriginalSource
as Visual;
System\Windows\Controls\Control.cs (2)
576
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
583
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
System\Windows\Controls\DataGrid.cs (5)
2298
UIElement source = e.
OriginalSource
as UIElement;
5441
bool shouldProcess = (e.
OriginalSource
== this);
5444
ItemsControl itemsControl = ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject);
5592
bool navigateFromCellContainer = e.
OriginalSource
== currentCellContainer;
6374
UIElement sourceElement = e.
OriginalSource
as UIElement;
System\Windows\Controls\DataGridCell.cs (2)
558
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
571
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
System\Windows\Controls\DatePicker.cs (2)
844
if (e.
OriginalSource
== picker)
849
else if (e.
OriginalSource
== picker._textBox)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1018
if (e.
OriginalSource
== ScrollViewer)
System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
1098
if (_headerSV != null && _mainSV == e.
OriginalSource
)
1107
if (_mainSV != null && _headerSV == e.
OriginalSource
)
System\Windows\Controls\ItemsControl.cs (3)
1680
(e.
OriginalSource
== this || ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject) == this))
3206
UIElement focusedElement = e.
OriginalSource
as UIElement;
System\Windows\Controls\ListBox.cs (3)
409
ListBoxItem source = e.
OriginalSource
as ListBoxItem;
507
if (e.
OriginalSource
is GridViewColumnHeader gridViewColumnHeader && gridViewColumnHeader.Column != null)
555
if (e.
OriginalSource
== this && Mouse.Captured == this)
System\Windows\Controls\Menu.cs (1)
283
FrameworkElement element = e.
OriginalSource
as FrameworkElement;
System\Windows\Controls\MenuItem.cs (3)
1055
if (sender != e.
OriginalSource
)
1058
MenuItem source = e.
OriginalSource
as MenuItem;
1567
if (e.
OriginalSource
== menuItem && menuItem.IsSubmenuOpen)
System\Windows\Controls\PopupControlService.cs (1)
959
IInputElement source = e.
OriginalSource
as IInputElement;
System\Windows\Controls\Primitives\ButtonBase.cs (4)
535
if ((e.
OriginalSource
== this) && (ClickMode != ClickMode.Hover) && !IsSpaceKeyDown)
617
if ((!IsMouseCaptured) && (e.
OriginalSource
== this))
634
if (e.
OriginalSource
== this)
722
if (e.
OriginalSource
== this)
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
112
if (!PresentationSource.UnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
System\Windows\Controls\Primitives\MenuBase.cs (4)
339
MenuItem newSelectedMenuItem = e.
OriginalSource
as MenuItem;
546
if (e.
OriginalSource
== menu)
557
if (MenuBase.IsDescendant(menu, e.
OriginalSource
as DependencyObject))
584
MenuItem menuItemSource = e.
OriginalSource
as MenuItem;
System\Windows\Controls\Primitives\Popup.cs (2)
1106
if (_popupRoot != null && e.
OriginalSource
== _popupRoot)
1225
bool reestablishCapture = e.
OriginalSource
!= root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero;
System\Windows\Controls\Primitives\Selector.cs (2)
1897
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, true, e);
1902
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, false, e);
System\Windows\Controls\ScrollViewer.cs (2)
934
if (e.
OriginalSource
== this)
1657
if (!PresentationSource.UnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
System\Windows\Controls\Slider.cs (3)
838
Thumb thumb = e.
OriginalSource
as Thumb;
869
Thumb thumb = e.
OriginalSource
as Thumb;
918
Thumb thumb = e.
OriginalSource
as Thumb;
System\Windows\Controls\StickyNote.cs (1)
1240
Visual source = args.
OriginalSource
as Visual;
System\Windows\Controls\ToolBar.cs (1)
709
ButtonBase bb = args.
OriginalSource
as ButtonBase;
System\Windows\Controls\ToolBarTray.cs (1)
514
Thumb thumb = e.
OriginalSource
as Thumb;
System\windows\Documents\TextEditorMouse.cs (1)
673
ScrollViewer scrollViewer = e.
OriginalSource
as ScrollViewer;
System\windows\Documents\TextEditorTyping.cs (5)
262
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
294
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
340
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
369
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
1276
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
System\Windows\FrameworkContentElement.cs (2)
1045
if (sender == e.
OriginalSource
)
1058
if (sender == e.
OriginalSource
)
System\Windows\FrameworkElement.cs (3)
5339
if (e.
OriginalSource
== sender)
5365
if (sender == e.
OriginalSource
)
5379
if (sender == e.
OriginalSource
)
System\Windows\Input\KeyboardNavigation.cs (1)
1195
DependencyObject sourceElement = keyEventArgs.
OriginalSource
as DependencyObject;
System\Windows\Navigation\NavigationService.cs (1)
115
DependencyObject dobj = e.
OriginalSource
as DependencyObject;
System\Windows\Window.cs (3)
7056
if (!PresentationSource.UnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
7065
_currentPanningTarget.Target != e.
OriginalSource
)
7078
UpdatePanningFeedback(manipulation.Translation, e.
OriginalSource
);
System.Windows.Controls.Ribbon (85)
Microsoft\Windows\Controls\KeyTipService.cs (1)
758
DependencyObject globalScope = GetGlobalScopeForElement(keyArgs.
OriginalSource
as DependencyObject);
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (16)
1814
if (!RibbonHelper.IsAncestorOf(_itemsPresenterPopup.TryGetChild(), e.
OriginalSource
as DependencyObject) &&
1815
!RibbonHelper.IsAncestorOf(_tabHeaderItemsControl, e.
OriginalSource
as DependencyObject))
1858
TreeHelper.IsVisualAncestorOf(this, e.
OriginalSource
as DependencyObject))
2410
ContextMenuOriginalSource = e.
OriginalSource
as UIElement;
2452
DependencyObject obj = args.
OriginalSource
as DependencyObject;
2467
UIElement originalSource = args.
OriginalSource
as UIElement;
2500
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2515
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2529
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2544
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2558
DependencyObject obj = args.
OriginalSource
as DependencyObject;
2568
UIElement originalSource = args.
OriginalSource
as UIElement;
2587
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2603
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2617
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
2633
DependencyObject originalSource = args.
OriginalSource
as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (4)
381
if (e.
OriginalSource
== this)
447
DependencyObject element = e.
OriginalSource
as DependencyObject;
488
DependencyObject element = e.
OriginalSource
as DependencyObject;
516
DependencyObject element = e.
OriginalSource
as DependencyObject;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
217
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (2)
215
if (e.
OriginalSource
== this)
229
else if (e.
OriginalSource
== HeaderButton)
Microsoft\Windows\Controls\Ribbon\RibbonButton.cs (2)
577
if (e.
OriginalSource
== this)
590
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonCheckBox.cs (2)
584
if (e.
OriginalSource
== this)
597
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (7)
176
if (e.
OriginalSource
== this)
181
else if (e.
OriginalSource
== EditableTextBoxSite)
1211
if (e.
OriginalSource
== this ||
1212
e.
OriginalSource
== PartToggleButton)
1258
Visual originalSource = e.
OriginalSource
as Visual;
1558
if (e.
OriginalSource
== this)
1566
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonFilterMenuButton.cs (1)
136
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (2)
2742
e.Handled = menuItem.HandleLeftKeyDown(e.
OriginalSource
as DependencyObject);
2784
RibbonHelper.IsAncestorOf(filterPane, e.
OriginalSource
as DependencyObject))
Microsoft\Windows\Controls\Ribbon\RibbonGalleryItem.cs (6)
421
if (e.
OriginalSource
== this)
430
if (e.
OriginalSource
== this)
454
if (e.
OriginalSource
== this)
480
if (e.
OriginalSource
== this && RibbonGallery != null && RibbonGallery.ShouldGalleryItemsAcquireFocus)
788
if (e.
OriginalSource
== this)
803
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (3)
1645
if (e.
OriginalSource
== this)
1682
placementTarget = RibbonHelper.GetContainingUIElement(e.
OriginalSource
as DependencyObject);
1760
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (3)
1044
if (e.
OriginalSource
== targetCapture)
1079
else if (RibbonHelper.IsAncestorOf(targetCapture, e.
OriginalSource
as DependencyObject))
1165
if (!cancelPredicate(e.
OriginalSource
as DependencyObject))
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (11)
734
if (e.
OriginalSource
== _partToggleButton ||
735
e.
OriginalSource
== this)
754
if (e.
OriginalSource
== this ||
755
e.
OriginalSource
== _partToggleButton)
790
int focusedIndex = ItemContainerGenerator.IndexFromContainer(e.
OriginalSource
as DependencyObject);
892
FrameworkElement selectionItem = e.
OriginalSource
as FrameworkElement;
1402
FrameworkElement source = e.
OriginalSource
as FrameworkElement;
1518
if (e.
OriginalSource
!= this &&
1520
!TreeHelper.IsVisualAncestorOf(this, e.
OriginalSource
as DependencyObject))
1669
if (e.
OriginalSource
== this)
1682
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (7)
833
int focusedIndex = ItemContainerGenerator.IndexFromContainer(e.
OriginalSource
as DependencyObject);
878
handled = HandleLeftKeyDown(e.
OriginalSource
as DependencyObject);
1009
if (e.
OriginalSource
== this)
1503
if (sender != e.
OriginalSource
)
1506
FrameworkElement selectionItem = e.
OriginalSource
as FrameworkElement;
1809
if (e.
OriginalSource
== this)
1825
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonQuickAccessToolBar.cs (2)
655
if (e.
OriginalSource
== _overflowButton)
675
if (e.
OriginalSource
== _overflowButton)
Microsoft\Windows\Controls\Ribbon\RibbonRadioButton.cs (2)
600
if (e.
OriginalSource
== this)
613
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonSplitButton.cs (2)
544
if (e.
OriginalSource
== this)
551
else if (e.
OriginalSource
== _headerButton)
Microsoft\Windows\Controls\Ribbon\RibbonSplitMenuItem.cs (4)
253
if (e.
OriginalSource
== _partArrowButton)
377
if (e.
OriginalSource
== this)
391
else if (e.
OriginalSource
== HeaderButton)
402
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
875
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (2)
639
if (e.
OriginalSource
== this)
707
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonTextBox.cs (2)
689
if (e.
OriginalSource
== this)
702
if (e.
OriginalSource
== this)
Microsoft\Windows\Controls\Ribbon\RibbonToggleButton.cs (2)
619
if (e.
OriginalSource
== this)
632
if (e.
OriginalSource
== this)