57 references to Utility
PresentationFramework (57)
System\Windows\Appearance\WindowBackdropManager.cs (5)
19
WindowBackdropType.Auto =>
Utility
.IsWindows11_22H2OrNewer,
20
WindowBackdropType.TabbedWindow =>
Utility
.IsWindows11_22H2OrNewer,
21
WindowBackdropType.MainWindow =>
Utility
.IsOSWindows11OrNewer,
22
WindowBackdropType.TransientWindow =>
Utility
.IsOSWindows7OrNewer,
142
internal static bool IsBackdropEnabled => _isBackdropEnabled ??=
Utility
.IsWindows11_22H2OrNewer &&
System\Windows\Shell\WindowChrome.cs (3)
193
(value) =>
Utility
.IsThicknessNonNegative((Thickness)value));
214
if (!
Utility
.IsThicknessNonNegative(thickness))
247
(value) =>
Utility
.IsCornerRadiusValid((CornerRadius)value));
System\Windows\Shell\WindowChromeWorker.cs (31)
133
Utility
.AddDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
134
Utility
.AddDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
175
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
176
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
295
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
303
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
311
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
319
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
404
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
408
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
412
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
416
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
472
var mousePosScreen = new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam));
503
if (
Utility
.IsOSVistaOrNewer && _chromeInfo.GlassFrameThickness != default(Thickness) && _isGlassEnabled)
530
SystemCommands.ShowSystemMenuPhysicalCoordinates(_window, new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam)));
570
if (!
Utility
.IsFlagSet(wp.flags, (int)SWP.NOSIZE))
664
bool canMinimize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MINIMIZEBOX);
665
bool canMaximize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MAXIMIZEBOX);
666
bool canSize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.THICKFRAME);
776
Utility
.SafeDeleteObject(ref hrgn);
784
if (null != wp && !
Utility
.IsFlagSet(wp.Value.flags, (int)SWP.NOSIZE))
854
Utility
.SafeDeleteObject(ref hrgn);
897
Utility
.SafeDeleteObject(ref hrgn);
927
if (!
Utility
.IsOSVistaOrNewer)
964
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
969
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
974
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
979
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
1133
if (!
Utility
.IsOSVistaOrNewer || _hwnd == IntPtr.Zero)
System\Windows\Standard\MessageWindow.cs (1)
183
Utility
.SafeDestroyWindow(ref hwnd);
System\Windows\Standard\NativeMethods.cs (14)
1580
Utility
.SafeRelease(ref cp);
1607
Utility
.SafeRelease(ref _cp);
2046
return (_left << 16 |
Utility
.LOWORD(_right)) ^ (_top << 16 |
Utility
.LOWORD(_bottom));
2311
if (!
Utility
.IsOSVistaOrNewer)
2319
if (!
Utility
.IsOSWindows7OrNewer)
2555
if (
Utility
.IsOSVistaOrNewer && IsThemeActive())
2576
if (!
Utility
.IsOSVistaOrNewer)
2592
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2599
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2607
Assert.IsTrue(
Utility
.IsOSVistaOrNewer);
2614
Assert.IsTrue(
Utility
.IsOSWindows7OrNewer);
3044
var metrics =
Utility
.IsOSVistaOrNewer
3214
if (!
Utility
.IsOSVistaOrNewer)
System\Windows\SystemParameters.cs (1)
5655
_windowGlassColor = Standard.
Utility
.ColorFromArgbDword(color);
System\Windows\Window.cs (2)
2572
if (Standard.
Utility
.IsOSWindows10OrNewer)
2596
if(!Standard.
Utility
.IsOSWindows11OrNewer) return;