4 instantiations of DpiScale2
PresentationCore (4)
MS\Internal\DpiScale2.cs (1)
207
return new
DpiScale2
(ppiX / DpiUtil.DefaultPixelsPerInch, ppiY / DpiUtil.DefaultPixelsPerInch);
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (1)
69
return new
DpiScale2
(UIElement.DpiScaleXValues[0], UIElement.DpiScaleYValues[0]);
System\Windows\InterOp\HwndTarget.cs (2)
1742
var newDpi = new
DpiScale2
(e.NewDpi);
1764
var newDpi = new
DpiScale2
(e.NewDpi);
53 references to DpiScale2
PresentationCore (48)
MS\Internal\DpiScale2.cs (10)
12
internal class DpiScale2 : IEquatable<
DpiScale2
>, IEquatable<DpiScale>
81
public static implicit operator DpiScale(
DpiScale2
dpiScale2)
92
public static bool operator !=(
DpiScale2
dpiScaleA,
DpiScale2
dpiScaleB)
109
public static bool operator ==(
DpiScale2
dpiScaleA,
DpiScale2
dpiScaleB)
150
public bool Equals(
DpiScale2
dpiScale2)
173
else if (obj is
DpiScale2
)
175
areEqual = this.Equals((
DpiScale2
)obj);
200
internal static
DpiScale2
FromPixelsPerInch(double ppiX, double ppiY)
MS\Internal\DpiUtil\DpiUtil.cs (4)
93
internal static
DpiScale2
GetSystemDpi()
102
internal static
DpiScale2
GetSystemDpiFromUIElementCache()
111
internal static void UpdateUIElementCacheForSystemDpi(
DpiScale2
systemDpiScale)
126
internal static
DpiScale2
GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic)
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (3)
20
public class HwndDpiInfo : Tuple<DpiAwarenessContextValue,
DpiScale2
>
40
internal HwndDpiInfo(DpiAwarenessContextValue dpiAwarenessContextValue,
DpiScale2
dpiScale)
86
internal
DpiScale2
DpiScale { get => Item2; }
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (7)
44
internal static
DpiScale2
GetSystemDpi()
65
internal static
DpiScale2
GetSystemDpiFromUIElementCache()
77
internal static void UpdateUIElementCacheForSystemDpi(
DpiScale2
systemDpiScale)
90
private static
DpiScale2
GetDpiForSystem()
93
return
DpiScale2
.FromPixelsPerInch(dpi, dpi);
101
private static
DpiScale2
GetSystemDpiFromDeviceCaps()
115
return
DpiScale2
.FromPixelsPerInch(ppiX, ppiY);
MS\Internal\DpiUtil\DpiUtil+WindowDpiScaleHelper.cs (5)
42
internal static
DpiScale2
GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic)
78
private static
DpiScale2
GetDpiForWindow(IntPtr hWnd)
81
return
DpiScale2
.FromPixelsPerInch(dpi, dpi);
89
private static
DpiScale2
GetDpiForWindowFromNearestMonitor(IntPtr hWnd)
100
return
DpiScale2
.FromPixelsPerInch(dpiX, dpiY);
System\Windows\Input\Stylus\Common\StylusLogic.cs (2)
172
private readonly Dictionary<
DpiScale2
, Matrix> _transformToDeviceMatrices = new Dictionary<
DpiScale2
, Matrix>();
System\Windows\InterOp\HwndTarget.cs (17)
404
private static
DpiScale2
GetDpiScaleForWindow(IntPtr hWnd)
406
DpiScale2
dpiScale = null;
425
dpiScale =
DpiScale2
.FromPixelsPerInch(DpiUtil.DefaultPixelsPerInch, DpiUtil.DefaultPixelsPerInch);
446
dpiScale =
DpiScale2
.FromPixelsPerInch(
869
var
oldDpi = CurrentDpiScale;
870
var
newDpi =
871
DpiScale2
.FromPixelsPerInch(
902
var
oldDpi = CurrentDpiScale;
903
var
newDpi = GetDpiScaleForWindow(_hWnd);
1669
private void UpdateWorldTransform(
DpiScale2
dpiScale)
1700
private void PropagateDpiChangeToRootVisual(
DpiScale2
oldDpi,
DpiScale2
newDpi)
1741
var
oldDpi = CurrentDpiScale;
1742
var
newDpi = new DpiScale2(e.NewDpi);
1763
var
oldDpi = CurrentDpiScale;
1764
var
newDpi = new DpiScale2(e.NewDpi);
2012
internal
DpiScale2
CurrentDpiScale { get; private set; }
PresentationFramework (5)
System\Windows\Interop\HwndHost.cs (2)
416
DpiScale2
dpi = DpiUtil.GetWindowDpi(Handle, fallbackToNearestMonitorHeuristic: false);
417
DpiScale2
dpiParent = DpiUtil.GetWindowDpi(UnsafeNativeMethods.GetParent(_hwnd), fallbackToNearestMonitorHeuristic: false);
System\Windows\SystemResources.cs (3)
1154
private static
DpiScale2
GetDpiScaleForUnawareOrSystemAwareContext(DpiAwarenessContextValue dpiContextValue)
1158
DpiScale2
dpiScale = null;
1162
dpiScale =
DpiScale2
.FromPixelsPerInch(DpiUtil.DefaultPixelsPerInch, DpiUtil.DefaultPixelsPerInch);