5 implementations of GetHdc
System.Drawing.Common (1)
Special\NotSupported.cs (1)
629
public System.IntPtr
GetHdc
() { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Windows.Forms (2)
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
161
IntPtr IDeviceContext.
GetHdc
() => Graphics?.GetHdc() ?? IntPtr.Zero;
System\Windows\Forms\Rendering\PaintEventArgs.cs (1)
134
IntPtr IDeviceContext.
GetHdc
() => Graphics?.GetHdc() ?? IntPtr.Zero;
System.Windows.Forms.Primitives.TestUtilities (1)
HdcDeviceContextAdapter.cs (1)
18
public IntPtr
GetHdc
() => (IntPtr)_hdc;
System.Windows.Forms.Tests (1)
System\Windows\Forms\TextRendererTests.cs (1)
663
public IntPtr
GetHdc
() => IntPtr.Zero;
24 references to GetHdc
System.Windows.Forms (2)
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
162
HDC IHdcContext.GetHdc() => (HDC)((IDeviceContext)this).
GetHdc
();
System\Windows\Forms\Rendering\PaintEventArgs.cs (1)
135
HDC IHdcContext.GetHdc() => (HDC)((IDeviceContext)this).
GetHdc
();
System.Windows.Forms.Primitives (1)
System\Windows\Forms\DeviceContextExtensions.IDeviceContextAdapter.cs (1)
14
public HDC GetHdc() => (HDC)_deviceContext.
GetHdc
();
System.Windows.Forms.Tests (21)
System\Windows\Forms\TextRendererTests.cs (21)
315
.Setup(c => c.
GetHdc
())
324
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Once());
328
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(2));
332
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(3));
336
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(4));
340
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(5));
344
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(6));
348
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(7));
352
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(8));
356
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(9));
360
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(10));
364
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(11));
368
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(12));
372
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(13));
376
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(14));
380
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(15));
384
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(16));
540
.Setup(c => c.
GetHdc
())
549
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Once());
553
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(2));
557
mockDeviceContext.Verify(c => c.
GetHdc
(), Times.Exactly(3));