17 instantiations of WeakReference
mscorlib (1)
system\diagnostics\eventing\eventsource.cs (1)
5800s_etwSessions.Add(new WeakReference<EtwSession>(etwSession));
PresentationCore (2)
Core\CSharp\System\Windows\Media\Imaging\BitmapSource.cs (1)
1860_bitmapSource = new WeakReference<BitmapSource>(bitmapSource);
Core\CSharp\System\Windows\UIElement.cs (1)
4760_positionAndSizeOfSetController.SetValue(this, new WeakReference<UIElement>(value));
PresentationFramework (11)
src\Framework\System\Windows\Controls\ContextMenu.cs (1)
612_weakRefToPreviousFocus = new WeakReference<IInputElement>(Keyboard.FocusedElement);
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (2)
12165_wrIC = new WeakReference<ItemsControl>(itemsControl); 12403new WeakReference<ItemsControl>(target),
src\Framework\System\Windows\Data\Binding.cs (1)
537SetValue(Feature.ObjectSource, new WeakReference<object>(value));
src\Framework\System\Windows\Data\BindingExpressionBase.cs (2)
1813root.SetValue(Feature.BindingGroup, new WeakReference<BindingGroup>(bg)); 2958static readonly WeakReference<BindingGroup> NullBindingGroupReference = new WeakReference<BindingGroup>(null);
src\Framework\System\Windows\Data\BindingGroup.cs (3)
597_inheritanceContext = (inheritanceContext == null) ? NullInheritanceContext : new WeakReference<DependencyObject>(inheritanceContext); 635_inheritanceContext = (inheritanceContext == null) ? NullInheritanceContext : new WeakReference<DependencyObject>(inheritanceContext); 1573static WeakReference<DependencyObject> NullInheritanceContext = new WeakReference<DependencyObject>(null);
src\Framework\System\windows\Documents\TextEditor.cs (1)
1761This._immCompositionForDetach = new WeakReference<ImmComposition>(This._immComposition);
src\Framework\System\Windows\Documents\WinRTSpellerInterop.cs (1)
109_dispatcher = new WeakReference<Dispatcher>(Dispatcher.CurrentDispatcher);
System (1)
net\System\Net\_AutoWebProxyScriptEngine.cs (1)
239}, new WeakReference<AutoWebProxyScriptEngine>(this),
System.Windows.Forms (2)
winforms\Managed\System\WinForms\Control.cs (1)
16226private readonly WeakReference<ToolStripControlHost> toolStripControlHostReference = new WeakReference<ToolStripControlHost>(null);
winforms\Managed\System\WinForms\ToolStripManager.cs (1)
747private readonly WeakReference<IKeyboardToolTip> lastFocusedTool = new WeakReference<IKeyboardToolTip>(null);
32 references to WeakReference
mscorlib (4)
system\diagnostics\eventing\eventsource.cs (4)
5775foreach (var wrEtwSession in s_etwSessions) 5797s_etwSessions = new List<WeakReference<EtwSession>>(); 5859private static List<WeakReference<EtwSession>> s_etwSessions = new List<WeakReference<EtwSession>>();
PresentationCore (4)
Core\CSharp\System\Windows\Media\Imaging\BitmapSource.cs (1)
1852private WeakReference<BitmapSource> _bitmapSource;
Core\CSharp\System\Windows\UIElement.cs (3)
4737private static readonly UncommonField<WeakReference<UIElement>> _positionAndSizeOfSetController = new UncommonField<WeakReference<UIElement>>(); 4750WeakReference<UIElement> wRef = _positionAndSizeOfSetController.GetValue(this);
PresentationFramework (20)
src\Framework\System\Windows\Controls\ContextMenu.cs (1)
709private WeakReference<IInputElement> _weakRefToPreviousFocus; // Keep the previously focused element before CM to open
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (6)
12156private WeakReference<ItemsControl> _wrIC; 12341private static List<Tuple<WeakReference<ItemsControl>,TraceList>> s_TargetToTraceListMap 12342= new List<Tuple<WeakReference<ItemsControl>,TraceList>>(); 12354WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1; 12402new Tuple<WeakReference<ItemsControl>,TraceList>( 12427WeakReference<ItemsControl> wr = s_TargetToTraceListMap[i].Item1;
src\Framework\System\Windows\Data\Binding.cs (2)
520WeakReference<object> wr = (WeakReference<object>)GetValue(Feature.ObjectSource, null);
src\Framework\System\Windows\Data\BindingExpressionBase.cs (6)
215WeakReference<BindingGroup> wr = (WeakReference<BindingGroup>)root.GetValue(Feature.BindingGroup, null); 1667WeakReference<BindingGroup> oldBindingGroupWR = (WeakReference<BindingGroup>)root.GetValue(Feature.BindingGroup, null); 1695if ((WeakReference<BindingGroup>)GetValue(Feature.BindingGroup, null) != null) 2958static readonly WeakReference<BindingGroup> NullBindingGroupReference = new WeakReference<BindingGroup>(null);
src\Framework\System\Windows\Data\BindingGroup.cs (2)
1573static WeakReference<DependencyObject> NullInheritanceContext = new WeakReference<DependencyObject>(null); 1574WeakReference<DependencyObject> _inheritanceContext = NullInheritanceContext;
src\Framework\System\windows\Documents\TextEditor.cs (1)
2108private WeakReference<ImmComposition> _immCompositionForDetach;
src\Framework\System\Windows\Documents\WinRTSpellerInterop.cs (2)
800/// stored in the <see cref="WeakReference{T}"/> <see cref="_dispatcher"/> 945private readonly WeakReference<Dispatcher> _dispatcher;
System (2)
net\System\Net\_AutoWebProxyScriptEngine.cs (2)
233var wr = (WeakReference<AutoWebProxyScriptEngine>)s;
System.Windows.Forms (2)
winforms\Managed\System\WinForms\Control.cs (1)
16226private readonly WeakReference<ToolStripControlHost> toolStripControlHostReference = new WeakReference<ToolStripControlHost>(null);
winforms\Managed\System\WinForms\ToolStripManager.cs (1)
747private readonly WeakReference<IKeyboardToolTip> lastFocusedTool = new WeakReference<IKeyboardToolTip>(null);