38 references to DPI_AWARENESS_CONTEXT
System.Windows.Forms.Primitives (38)
System\Windows\Forms\Internals\ScaleHelper.cs (20)
109DPI_AWARENESS_CONTEXT dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal(); 110return dpiAwareness.IsEquivalent(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); 373DPI_AWARENESS_CONTEXT dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal(); 375if (dpiAwareness.IsEquivalent(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE)) 380if (dpiAwareness.IsEquivalent(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_UNAWARE)) 385if (dpiAwareness.IsEquivalent(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)) 390if (dpiAwareness.IsEquivalent(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE)) 395if (dpiAwareness.IsEquivalent(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)) 434DPI_AWARENESS_CONTEXT dpiAwareness = highDpiMode switch 436HighDpiMode.SystemAware => DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE, 437HighDpiMode.PerMonitor => DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE, 440PInvoke.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, 445PInvoke.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, 498DPI_AWARENESS_CONTEXT awareness, 507using (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. 20private 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> 27public DpiAwarenessScope(DPI_AWARENESS_CONTEXT context, DPI_HOSTING_BEHAVIOR behavior) 37if (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"/>. 15public static DPI_AWARENESS_CONTEXT GetThreadDpiAwarenessContextInternal() 23return DPI_AWARENESS_CONTEXT.UNSPECIFIED_DPI_AWARENESS_CONTEXT;
Windows\Win32\PInvoke.SetThreadDpiAwarenessContext.cs (5)
13/// Otherwise, <see cref="DPI_AWARENESS_CONTEXT.UNSPECIFIED_DPI_AWARENESS_CONTEXT"/>. 15public static DPI_AWARENESS_CONTEXT SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT dpiContext) 19if (dpiContext == DPI_AWARENESS_CONTEXT.UNSPECIFIED_DPI_AWARENESS_CONTEXT) 28return DPI_AWARENESS_CONTEXT.UNSPECIFIED_DPI_AWARENESS_CONTEXT;
Windows\Win32\UI\HiDpi\DPI_AWARENESS_CONTEXT.cs (3)
8internal static DPI_AWARENESS_CONTEXT UNSPECIFIED_DPI_AWARENESS_CONTEXT { get; } = (DPI_AWARENESS_CONTEXT)0; 17public bool IsEquivalent(DPI_AWARENESS_CONTEXT dpiContext)