static DpiAwarenessContextHandle() { WellKnownContextValues = new Dictionary <DpiAwarenessContextValue, IntPtr> { { DpiAwarenessContextValue.Unaware, new IntPtr((int)DpiAwarenessContextValue.Unaware) }, { DpiAwarenessContextValue.SystemAware, new IntPtr((int)DpiAwarenessContextValue.SystemAware) }, { DpiAwarenessContextValue.PerMonitorAware, new IntPtr((int)DpiAwarenessContextValue.PerMonitorAware) }, { DpiAwarenessContextValue.PerMonitorAwareVersion2, new IntPtr((int)DpiAwarenessContextValue.PerMonitorAwareVersion2) }, }; DPI_AWARENESS_CONTEXT_UNAWARE = new DpiAwarenessContextHandle(WellKnownContextValues[DpiAwarenessContextValue.Unaware]); DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = new DpiAwarenessContextHandle(WellKnownContextValues[DpiAwarenessContextValue.SystemAware]); DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = new DpiAwarenessContextHandle(WellKnownContextValues[DpiAwarenessContextValue.PerMonitorAware]); DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = new DpiAwarenessContextHandle(WellKnownContextValues[DpiAwarenessContextValue.PerMonitorAwareVersion2]); }
public bool Equals(DpiAwarenessContextHandle dpiContextHandle) { return(SafeNativeMethods.AreDpiAwarenessContextsEqual(this.DangerousGetHandle(), dpiContextHandle.DangerousGetHandle())); }