66 references to DpiUtil
PresentationCore (37)
MS\Internal\DpiScale2.cs (2)
207return new DpiScale2(ppiX / DpiUtil.DefaultPixelsPerInch, ppiY / DpiUtil.DefaultPixelsPerInch);
MS\Internal\DpiUtil\DpiUtil.cs (4)
184if (UIElement.DpiScaleXValues[index] == pixelsPerInchX / DpiUtil.DefaultPixelsPerInch && 185UIElement.DpiScaleYValues[index] == pixelsPerInchY / DpiUtil.DefaultPixelsPerInch) 194UIElement.DpiScaleXValues.Add(pixelsPerInchX / DpiUtil.DefaultPixelsPerInch); 195UIElement.DpiScaleYValues.Add(pixelsPerInchY / DpiUtil.DefaultPixelsPerInch);
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (3)
26/// <param name="fallbackToNearestMonitorHeuristic">Semantics of this parameter are identical to that in <see cref="DpiUtil.GetWindowDpi"/></param> 28item1: (DpiAwarenessContextValue)DpiUtil.GetDpiAwarenessContext(hWnd), 29item2: DpiUtil.GetWindowDpi(hWnd, fallbackToNearestMonitorHeuristic))
System\Windows\DpiChangedEventArgs.cs (4)
46OldDpi = new DpiScale(oldDpiX / DpiUtil.DefaultPixelsPerInch, oldDpiY / DpiUtil.DefaultPixelsPerInch); 47NewDpi = new DpiScale(newDpiX / DpiUtil.DefaultPixelsPerInch, newDpiY / DpiUtil.DefaultPixelsPerInch);
System\Windows\DpiScale.cs (2)
64get { return DpiUtil.DefaultPixelsPerInch * _dpiScaleX; } 75get { return DpiUtil.DefaultPixelsPerInch * _dpiScaleY; }
System\Windows\Input\Stylus\Pointer\PointerTouchDevice.cs (1)
74double pixelsPerInch = DpiUtil.DefaultPixelsPerInch;
System\Windows\Input\Stylus\Wisp\WispStylusTouchDevice.cs (1)
37double pixelsPerInch = DpiUtil.DefaultPixelsPerInch;
System\Windows\InterOp\HwndTarget.cs (17)
331DpiUtil.UpdateUIElementCacheForSystemDpi(DpiUtil.GetSystemDpi()); 337DpiAwarenessContext = (DpiAwarenessContextValue)DpiUtil.GetDpiAwarenessContext(_hWnd); 363appManifestProcessDpiAwareness = DpiUtil.GetProcessDpiAwareness(hWnd); 374processDpiAwareness = DpiUtil.GetLegacyProcessDpiAwareness(); 415dpiScale = DpiUtil.GetWindowDpi(hWnd, fallbackToNearestMonitorHeuristic: false); 421dpiScale = DpiUtil.GetSystemDpiFromUIElementCache(); 425dpiScale = DpiScale2.FromPixelsPerInch(DpiUtil.DefaultPixelsPerInch, DpiUtil.DefaultPixelsPerInch); 433var dpiAwareness = DpiUtil.GetLegacyProcessDpiAwareness(); 437dpiScale = DpiUtil.GetSystemDpi(); 441? DpiUtil.GetWindowDpi(hWnd, fallbackToNearestMonitorHeuristic: false) 442: DpiUtil.GetSystemDpi(); 447DpiUtil.DefaultPixelsPerInch, 448DpiUtil.DefaultPixelsPerInch); 1704var dpiFlags = DpiUtil.UpdateDpiScalesAndGetIndex(newDpi.PixelsPerInchX, newDpi.PixelsPerInchY); 2301DpiFlags dpiFlags = DpiUtil.UpdateDpiScalesAndGetIndex(CurrentDpiScale.PixelsPerInchX, CurrentDpiScale.PixelsPerInchY);
System\Windows\Media\VisualTreeHelper.cs (1)
112DpiFlags dpiFlags = DpiUtil.UpdateDpiScalesAndGetIndex(dpiInfo.PixelsPerInchX, dpiInfo.PixelsPerInchY);
System\Windows\UIElement.cs (2)
1149_dpiScaleX = (double)dpiX / DpiUtil.DefaultPixelsPerInch; 1150_dpiScaleY = (double)dpiY / DpiUtil.DefaultPixelsPerInch;
PresentationFramework (29)
System\Windows\Controls\Primitives\Popup.cs (1)
3525return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE;
System\Windows\Interop\HwndHost.cs (4)
416DpiScale2 dpi = DpiUtil.GetWindowDpi(Handle, fallbackToNearestMonitorHeuristic: false); 417DpiScale2 dpiParent = DpiUtil.GetWindowDpi(UnsafeNativeMethods.GetParent(_hwnd), fallbackToNearestMonitorHeuristic: false); 1030if (DpiUtil.GetDpiAwarenessContext(_hwnd.Handle) != DpiUtil.GetDpiAwarenessContext(hwndParent.Handle))
System\Windows\SystemParameters.cs (1)
1864using (DpiUtil.WithDpiAwarenessContext(MS.Utility.DpiAwarenessContextValue.Unaware))
System\Windows\SystemResources.cs (22)
1005/// on-demand by <see cref="EnsureResourceChangeListener(DpiUtil.HwndDpiInfo)"/> 1011/// of <see cref="DpiAwarenessContextValue"/> + DPI that is observed - i.e., for each unique <see cref="DpiUtil.HwndDpiInfo"/>. This 1027_hwndNotify = new Dictionary<DpiUtil.HwndDpiInfo, HwndWrapper>(); 1028_hwndNotifyHook = new Dictionary<DpiUtil.HwndDpiInfo, HwndWrapperHook>(); 1029_dpiAwarenessContextAndDpis = new List<DpiUtil.HwndDpiInfo>(); 1046private static bool EnsureResourceChangeListener(DpiUtil.HwndDpiInfo hwndDpiInfo) 1083/// must only be called by <see cref="EnsureResourceChangeListener"/> or <see cref="EnsureResourceChangeListener(DpiUtil.HwndDpiInfo)"/> 1085/// <returns><see cref="DpiUtil.HwndDpiInfo"/> of the newly created <see cref="HwndWrapper"/>, which is also a new key added into <see cref="_hwndNotify"/></returns> 1086private static DpiUtil.HwndDpiInfo CreateResourceChangeListenerWindow(DpiAwarenessContextValue dpiContextValue, int x = 0, int y = 0, [System.Runtime.CompilerServices.CallerMemberName] string callerName = "") 1092using (DpiUtil.WithDpiAwarenessContext(dpiContextValue)) 1115DpiUtil.GetExtendedDpiInfoForWindow(hwndNotify.Handle): 1116new DpiUtil.HwndDpiInfo(dpiContextValue, GetDpiScaleForUnawareOrSystemAwareContext(dpiContextValue)); 1162dpiScale = DpiScale2.FromPixelsPerInch(DpiUtil.DefaultPixelsPerInch, DpiUtil.DefaultPixelsPerInch); 1166dpiScale = DpiUtil.GetSystemDpi(); 1510return DpiUtil.GetProcessDpiAwarenessContextValue(IntPtr.Zero); 1626DpiUtil.HwndDpiInfo hwndDpiInfo = 1628DpiUtil.GetExtendedDpiInfoForWindow(hwnd.Handle, fallbackToNearestMonitorHeuristic: true) : 1629new DpiUtil.HwndDpiInfo(processDpiAwarenessContextValue, GetDpiScaleForUnawareOrSystemAwareContext(processDpiAwarenessContextValue)); 1662[ThreadStatic] private static List<DpiUtil.HwndDpiInfo> _dpiAwarenessContextAndDpis; 1664[ThreadStatic] private static Dictionary<DpiUtil.HwndDpiInfo, HwndWrapper> _hwndNotify; 1665[ThreadStatic] private static Dictionary<DpiUtil.HwndDpiInfo, HwndWrapperHook> _hwndNotifyHook;
System\Windows\Window.cs (1)
7818return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE;