4 instantiations of DpiScale2
PresentationCore (4)
MS\Internal\DpiScale2.cs (1)
209return new DpiScale2(ppiX / DpiUtil.DefaultPixelsPerInch, ppiY / DpiUtil.DefaultPixelsPerInch);
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (1)
75return new DpiScale2(UIElement.DpiScaleXValues[0], UIElement.DpiScaleYValues[0]);
System\Windows\InterOp\HwndTarget.cs (2)
1764var newDpi = new DpiScale2(e.NewDpi); 1786var newDpi = new DpiScale2(e.NewDpi);
62 references to DpiScale2
PresentationCore (60)
MS\Internal\DpiScale2.cs (19)
14internal class DpiScale2 : IEquatable<DpiScale2>, IEquatable<DpiScale> 19/// Initializes a new instance of the <see cref="DpiScale2"/> class. 28/// Initializes a new instance of the <see cref="DpiScale2"/> class. 78/// Implicitly casts a <see cref="DpiScale2"/> object to 81/// <param name="dpiScale2">The <see cref="DpiScale2"/> object that is 83public static implicit operator DpiScale(DpiScale2 dpiScale2) 89/// Checks to inequality between two <see cref="DpiScale2"/> instances. 94public static bool operator !=(DpiScale2 dpiScaleA, DpiScale2 dpiScaleB) 106/// Checks for equality between two <see cref="DpiScale2"/> instances. 111public static bool operator ==(DpiScale2 dpiScaleA, DpiScale2 dpiScaleB) 135/// Equality test against a <see cref="DpiScale2"/> object. 152public bool Equals(DpiScale2 dpiScale2) 175else if (obj is DpiScale2) 177areEqual = this.Equals((DpiScale2)obj); 197/// Creates an instances of <see cref="DpiScale2"/> from PPI values. 201/// <returns>A new <see cref="DpiScale2"/> instance</returns> 202internal static DpiScale2 FromPixelsPerInch(double ppiX, double ppiY)
MS\Internal\DpiUtil\DpiUtil.cs (6)
97internal static DpiScale2 GetSystemDpi() 106internal static DpiScale2 GetSystemDpiFromUIElementCache() 115internal static void UpdateUIElementCacheForSystemDpi(DpiScale2 systemDpiScale) 130internal static DpiScale2 GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 137/// <see cref="DpiScale2"/>, and the screen-rectangle of the monitor where the <paramref name="hWnd"/> resides. 149/// <see cref="DpiScale2"/>, and the screen-rectangle of the monitor where the <paramref name="hWnd"/> resides.
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (4)
23public class HwndDpiInfo : Tuple<DpiAwarenessContextValue, DpiScale2> 39/// and <see cref="DpiScale2"/> information 43internal HwndDpiInfo(DpiAwarenessContextValue dpiAwarenessContextValue, DpiScale2 dpiScale) 89internal DpiScale2 DpiScale { get => Item2; }
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (7)
50internal static DpiScale2 GetSystemDpi() 71internal static DpiScale2 GetSystemDpiFromUIElementCache() 83internal static void UpdateUIElementCacheForSystemDpi(DpiScale2 systemDpiScale) 96private static DpiScale2 GetDpiForSystem() 99return DpiScale2.FromPixelsPerInch(dpi, dpi); 107private static DpiScale2 GetSystemDpiFromDeviceCaps() 121return DpiScale2.FromPixelsPerInch(ppiX, ppiY);
MS\Internal\DpiUtil\DpiUtil+WindowDpiScaleHelper.cs (5)
45internal static DpiScale2 GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 81private static DpiScale2 GetDpiForWindow(IntPtr hWnd) 84return DpiScale2.FromPixelsPerInch(dpi, dpi); 92private static DpiScale2 GetDpiForWindowFromNearestMonitor(IntPtr hWnd) 103return DpiScale2.FromPixelsPerInch(dpiX, dpiY);
System\Windows\Input\Stylus\Common\StylusLogic.cs (2)
183private readonly Dictionary<DpiScale2, Matrix> _transformToDeviceMatrices = new Dictionary<DpiScale2, Matrix>();
System\Windows\InterOp\HwndTarget.cs (17)
420private static DpiScale2 GetDpiScaleForWindow(IntPtr hWnd) 422DpiScale2 dpiScale = null; 441dpiScale = DpiScale2.FromPixelsPerInch(DpiUtil.DefaultPixelsPerInch, DpiUtil.DefaultPixelsPerInch); 462dpiScale = DpiScale2.FromPixelsPerInch( 885var oldDpi = CurrentDpiScale; 886var newDpi = 887DpiScale2.FromPixelsPerInch( 918var oldDpi = CurrentDpiScale; 919var newDpi = GetDpiScaleForWindow(_hWnd); 1691private void UpdateWorldTransform(DpiScale2 dpiScale) 1722private void PropagateDpiChangeToRootVisual(DpiScale2 oldDpi, DpiScale2 newDpi) 1763var oldDpi = CurrentDpiScale; 1764var newDpi = new DpiScale2(e.NewDpi); 1785var oldDpi = CurrentDpiScale; 1786var newDpi = new DpiScale2(e.NewDpi); 2034internal DpiScale2 CurrentDpiScale { get; private set; }
PresentationFramework (2)
System\Windows\SystemResources.cs (2)
1062/// <param name="hwndDpiInfo">Represents a combination of <see cref="DpiAwarenessContextValue"/> and <see cref="DpiScale2"/></param> 1684/// List of {<see cref="DpiAwarenessContextValue"/> , <see cref="DpiScale2"/>} combinations for which notify-windows are being maintained