118 references to OriginalSource
PresentationCore (7)
Core\CSharp\System\Windows\Input\AccessKeyManager.cs (2)
352
if (ProcessKeyForSender(e.
OriginalSource
, text, false /* existsElsewhere */,e.UserInitiated) != ProcessKeyResult.NoMatch)
382
if (ProcessKeyForSender(e.
OriginalSource
, text, false /* existsElsewhere */,e.UserInitiated) != ProcessKeyResult.NoMatch)
Core\CSharp\System\Windows\Input\Command\CommandBinding.cs (1)
183
canExecuteArgs.Source = e.
OriginalSource
;
Core\CSharp\System\Windows\Input\Command\CommandDevice.cs (1)
117
IInputElement commandTarget = e.StagingItem.Input.
OriginalSource
as IInputElement;
Core\CSharp\System\Windows\RoutedEventArgs.cs (2)
24
/// <see cref="RoutedEventArgs.
OriginalSource
"/> <para/>
52
/// <see cref="
OriginalSource
"/> also defaults to null
Core\CSharp\System\Windows\UIElement.cs (1)
2357
args.Source = args.
OriginalSource
;
PresentationFramework (69)
src\Framework\System\Windows\Controls\Calendar.cs (1)
1234
if (!e.Handled && e.
OriginalSource
== c)
src\Framework\System\Windows\Controls\ComboBox.cs (7)
1080
if (e.
OriginalSource
== comboBox)
1085
else if (e.
OriginalSource
== comboBox.EditableTextBoxSite)
1319
if (IsEditable && e.
OriginalSource
== EditableTextBoxSite)
1691
if (e.
OriginalSource
== comboBox)
1702
if (MenuBase.IsDescendant(comboBox, e.
OriginalSource
as DependencyObject))
1735
if (Mouse.Captured == comboBox && e.
OriginalSource
== comboBox)
1748
Visual originalSource = e.
OriginalSource
as Visual;
src\Framework\System\Windows\Controls\Control.cs (2)
577
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
584
doubleClick.Source = e.
OriginalSource
; // Set OriginalSource because initially is null
src\Framework\System\Windows\Controls\DataGrid.cs (5)
2303
UIElement source = e.
OriginalSource
as UIElement;
5446
bool shouldProcess = (e.
OriginalSource
== this);
5449
ItemsControl itemsControl = ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject);
5597
bool navigateFromCellContainer = e.
OriginalSource
== currentCellContainer;
6379
UIElement sourceElement = e.
OriginalSource
as UIElement;
src\Framework\System\Windows\Controls\DataGridCell.cs (2)
553
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
566
DataGridCell cell = DataGridHelper.FindVisualParent<DataGridCell>(e.
OriginalSource
as UIElement);
src\Framework\System\Windows\Controls\DatePicker.cs (2)
833
if (e.
OriginalSource
== picker)
838
else if (e.
OriginalSource
== picker._textBox)
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1026
if (e.
OriginalSource
== ScrollViewer)
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
1101
if (_headerSV != null && _mainSV == e.
OriginalSource
)
1110
if (_mainSV != null && _headerSV == e.
OriginalSource
)
src\Framework\System\Windows\Controls\ItemsControl.cs (3)
1683
(e.
OriginalSource
== this || ItemsControlFromItemContainer(e.
OriginalSource
as DependencyObject) == this))
3137
UIElement focusedElement = e.
OriginalSource
as UIElement;
src\Framework\System\Windows\Controls\ListBox.cs (2)
407
ListBoxItem source = e.
OriginalSource
as ListBoxItem;
510
if (e.
OriginalSource
== this && Mouse.Captured == this)
src\Framework\System\Windows\Controls\Menu.cs (1)
304
FrameworkElement element = e.
OriginalSource
as FrameworkElement;
src\Framework\System\Windows\Controls\MenuItem.cs (3)
1041
if (sender != e.
OriginalSource
)
1044
MenuItem source = e.
OriginalSource
as MenuItem;
1603
if (e.
OriginalSource
== menuItem && menuItem.IsSubmenuOpen)
src\Framework\System\Windows\Controls\PopupControlService.cs (1)
830
IInputElement source = e.
OriginalSource
as IInputElement;
src\Framework\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)
src\Framework\System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (1)
112
if (!PresentationSource.UnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
src\Framework\System\Windows\Controls\Primitives\MenuBase.cs (4)
341
MenuItem newSelectedMenuItem = e.
OriginalSource
as MenuItem;
550
if (e.
OriginalSource
== menu)
561
if (MenuBase.IsDescendant(menu, e.
OriginalSource
as DependencyObject))
588
MenuItem menuItemSource = e.
OriginalSource
as MenuItem;
src\Framework\System\Windows\Controls\Primitives\Popup.cs (2)
1111
if (_popupRoot.Value != null && e.
OriginalSource
== _popupRoot.Value)
1230
bool reestablishCapture = e.
OriginalSource
!= root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero;
src\Framework\System\Windows\Controls\Primitives\Selector.cs (2)
1917
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, true, e);
1922
((Selector)sender).NotifyIsSelectedChanged(e.
OriginalSource
as FrameworkElement, false, e);
src\Framework\System\Windows\Controls\ScrollViewer.cs (2)
961
if (e.
OriginalSource
== this)
1703
if (!PresentationSource.UnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
src\Framework\System\Windows\Controls\Slider.cs (3)
841
Thumb thumb = e.
OriginalSource
as Thumb;
872
Thumb thumb = e.
OriginalSource
as Thumb;
922
Thumb thumb = e.
OriginalSource
as Thumb;
src\Framework\System\Windows\Controls\StickyNote.cs (1)
1250
Visual source = args.
OriginalSource
as Visual;
src\Framework\System\Windows\Controls\ToolBar.cs (1)
719
ButtonBase bb = args.
OriginalSource
as ButtonBase;
src\Framework\System\Windows\Controls\ToolBarTray.cs (1)
525
Thumb thumb = e.
OriginalSource
as Thumb;
src\Framework\System\windows\Documents\TextEditorMouse.cs (1)
674
ScrollViewer scrollViewer = e.
OriginalSource
as ScrollViewer;
src\Framework\System\windows\Documents\TextEditorTyping.cs (5)
266
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
298
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
345
if (This == null || !This._IsEnabled || (This.IsReadOnly && !This.IsReadOnlyCaretVisible) || !This._IsSourceInScope(e.
OriginalSource
))
374
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
1293
if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.
OriginalSource
))
src\Framework\System\Windows\FrameworkContentElement.cs (2)
1054
if (sender == e.
OriginalSource
)
1067
if (sender == e.
OriginalSource
)
src\Framework\System\Windows\FrameworkElement.cs (3)
5337
if (e.
OriginalSource
== sender)
5363
if (sender == e.
OriginalSource
)
5377
if (sender == e.
OriginalSource
)
src\Framework\System\Windows\Input\KeyboardNavigation.cs (1)
1279
DependencyObject sourceElement = keyEventArgs.
OriginalSource
as DependencyObject;
src\Framework\System\Windows\Navigation\NavigationService.cs (1)
126
DependencyObject dobj = e.
OriginalSource
as DependencyObject;
src\Framework\System\Windows\Window.cs (3)
7380
if (!PresentationSource.UnderSamePresentationSource(e.
OriginalSource
as DependencyObject, this))
7389
_currentPanningTarget.Target != e.
OriginalSource
)
7402
UpdatePanningFeedback(manipulation.Translation, e.
OriginalSource
);
System.Activities.Core.Presentation (8)
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (1)
2042
UIElement destElement = VisualTreeUtils.FindVisualAncestor<VirtualizedContainerService.VirtualizingContainer>(e.
OriginalSource
as DependencyObject);
System\Activities\Core\Presentation\ReorderableListEditor.xaml.cs (1)
56
ListBoxItem item = VisualTreeUtils.FindVisualAncestor<ListBoxItem>(e.
OriginalSource
as DependencyObject);
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (1)
1739
VirtualizedContainerService.VirtualizingContainer destElement = VisualTreeUtils.FindVisualAncestor<VirtualizedContainerService.VirtualizingContainer>(e.
OriginalSource
as DependencyObject);
System\Activities\Core\Presentation\SwitchDesigner.xaml.cs (1)
350
if (sender == e.
OriginalSource
&& (e.Key == Key.Space || e.Key == Key.Enter))
System\Activities\Core\Presentation\TryCatchDesigner.xaml.cs (4)
452
if (sender == e.
OriginalSource
&& (e.Key == Key.Space || e.Key == Key.Enter))
463
if (sender == e.
OriginalSource
&& (e.Key == Key.Space || e.Key == Key.Enter))
473
if (sender == e.
OriginalSource
&& (e.Key == Key.Space || e.Key == Key.Enter))
484
if (sender == e.
OriginalSource
&& (e.Key == Key.Space || e.Key == Key.Enter))
System.Activities.Presentation (34)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\CategoryList.cs (2)
551
Select(e.
OriginalSource
as DependencyObject);
569
Select(e.
OriginalSource
as DependencyObject);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\EditModeSwitchButtonKeyboardFix.cs (1)
120
EditModeSwitchButton button = e.
OriginalSource
as EditModeSwitchButton;
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\Controls\WorkaroundPopup.cs (2)
68
if (e.
OriginalSource
== this.Child)
94
if (e.
OriginalSource
== this.Child && this.Child.InputHitTest(e.GetPosition(this.Child)) == null)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyValueDialogHost.cs (2)
62
DataTemplate dialogEditorTemplate = GetDialogEditorTemplate(GetParentProperty(e.
OriginalSource
));
86
PropertyEntry parentProperty = GetParentProperty(e.
OriginalSource
);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyValueEditorCommandHandler.cs (1)
204
DependencyObject source = e.
OriginalSource
as DependencyObject;
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\PropertySelection.cs (1)
255
DependencyObject target = e.
OriginalSource
as DependencyObject;
System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxControl.cs (1)
255
e.
OriginalSource
== this.searchBox &&
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (5)
590
var cell = VisualTreeUtils.FindVisualAncestor<DataGridCell>((DependencyObject)args.
OriginalSource
);
603
var cell = VisualTreeUtils.FindVisualAncestor<DataGridCell>((DependencyObject)args.
OriginalSource
);
620
editor.ShowDialog(propertyEntry.PropertyValue, (IInputElement)args.
OriginalSource
);
922
if (null != e && null != e.
OriginalSource
&& e.
OriginalSource
.GetType() == typeof(DataGridCell))
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (4)
380
DependencyObject source = e.
OriginalSource
as DependencyObject;
399
if (!CommandMenuMode.Equals(CommandMenuMode.NoCommandMenu, GetCommandMenuMode((DependencyObject)e.
OriginalSource
)))
775
WorkflowViewElement sourceElement = e.
OriginalSource
as WorkflowViewElement;
998
TextBox textBox = e.
OriginalSource
as TextBox;
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (7)
653
DateTime.Now.ToLocalTime(), (null == this.FocusedViewElement ? "<null>" : this.FocusedViewElement.GetType().Name), e.
OriginalSource
));
709
if (!e.Handled && Keyboard.Modifiers == ModifierKeys.None && e.
OriginalSource
is WorkflowViewElement)
714
this.navigateToChildFunction((WorkflowViewElement)e.
OriginalSource
, true);
718
this.navigateToParentFunction((WorkflowViewElement)e.
OriginalSource
, true);
832
if (e.
OriginalSource
== this.scrollViewer || e.
OriginalSource
== this.scrollableContent || e.
OriginalSource
== this.scrollViewer.Content)
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (3)
758
if (e.
OriginalSource
is WorkflowViewElement)
760
dropTarget = (WorkflowViewElement)e.
OriginalSource
;
764
dropTarget = VisualTreeUtils.FindFocusableParent<WorkflowViewElement>((UIElement)e.
OriginalSource
);
System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (5)
547
DateTime.Now.ToLocalTime(), this.GetType().Name, selection.SelectionCount, becomesSelection, e.
OriginalSource
));
551
if (!object.Equals(this, e.
OriginalSource
))
553
this.lastActivationElement = e.
OriginalSource
as UIElement;
642
DateTime.Now.ToLocalTime(), this.GetType().Name, shouldSetFocus, this.IsMouseCaptured, e.
OriginalSource
));
709
this.lastActivationElement = e.
OriginalSource
as UIElement;