38 references to DPI_AWARENESS_CONTEXT
System.Windows.Forms.Primitives (38)
System\Windows\Forms\Internals\ScaleHelper.cs (20)
109
DPI_AWARENESS_CONTEXT
dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal();
110
return dpiAwareness.IsEquivalent(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
373
DPI_AWARENESS_CONTEXT
dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal();
375
if (dpiAwareness.IsEquivalent(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE))
380
if (dpiAwareness.IsEquivalent(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_UNAWARE))
385
if (dpiAwareness.IsEquivalent(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2))
390
if (dpiAwareness.IsEquivalent(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE))
395
if (dpiAwareness.IsEquivalent(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED))
434
DPI_AWARENESS_CONTEXT
dpiAwareness = highDpiMode switch
436
HighDpiMode.SystemAware =>
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE,
437
HighDpiMode.PerMonitor =>
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE,
440
PInvoke.IsValidDpiAwarenessContext(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)
441
?
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
442
:
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE,
445
PInvoke.IsValidDpiAwarenessContext(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)
446
?
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED
447
:
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_UNAWARE,
448
_ =>
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_UNAWARE,
498
DPI_AWARENESS_CONTEXT
awareness,
507
using (EnterDpiAwarenessScope(
DPI_AWARENESS_CONTEXT
.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE))
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (7)
13
/// Class that creates a temporary <see cref="
DPI_AWARENESS_CONTEXT
"/> scope.
20
private readonly
DPI_AWARENESS_CONTEXT
_originalDpiAwarenessContext;
23
/// Sets <see cref="
DPI_AWARENESS_CONTEXT
"/> for the thread.
25
/// <param name="context"><see cref="
DPI_AWARENESS_CONTEXT
"/> to be set on the thread.</param>
27
public DpiAwarenessScope(
DPI_AWARENESS_CONTEXT
context, DPI_HOSTING_BEHAVIOR behavior)
37
if (context.IsEquivalent(
DPI_AWARENESS_CONTEXT
.UNSPECIFIED_DPI_AWARENESS_CONTEXT))
71
/// Reset thread's <see cref="
DPI_AWARENESS_CONTEXT
"/> and <see cref="DPI_HOSTING_BEHAVIOR"/>.
Windows\Win32\PInvoke.GetThreadDpiAwarenessContext.cs (3)
13
/// Otherwise, <see cref="
DPI_AWARENESS_CONTEXT
.UNSPECIFIED_DPI_AWARENESS_CONTEXT"/>.
15
public static
DPI_AWARENESS_CONTEXT
GetThreadDpiAwarenessContextInternal()
23
return
DPI_AWARENESS_CONTEXT
.UNSPECIFIED_DPI_AWARENESS_CONTEXT;
Windows\Win32\PInvoke.SetThreadDpiAwarenessContext.cs (5)
13
/// Otherwise, <see cref="
DPI_AWARENESS_CONTEXT
.UNSPECIFIED_DPI_AWARENESS_CONTEXT"/>.
15
public static
DPI_AWARENESS_CONTEXT
SetThreadDpiAwarenessContextInternal(
DPI_AWARENESS_CONTEXT
dpiContext)
19
if (dpiContext ==
DPI_AWARENESS_CONTEXT
.UNSPECIFIED_DPI_AWARENESS_CONTEXT)
28
return
DPI_AWARENESS_CONTEXT
.UNSPECIFIED_DPI_AWARENESS_CONTEXT;
Windows\Win32\UI\HiDpi\DPI_AWARENESS_CONTEXT.cs (3)
8
internal static
DPI_AWARENESS_CONTEXT
UNSPECIFIED_DPI_AWARENESS_CONTEXT { get; } = (
DPI_AWARENESS_CONTEXT
)0;
17
public bool IsEquivalent(
DPI_AWARENESS_CONTEXT
dpiContext)