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