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)
140
Utility
.AddDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
141
Utility
.AddDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
182
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
183
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
305
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
313
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
321
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
329
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
414
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
418
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
422
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
426
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
482
var mousePosScreen = new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam));
513
if (
Utility
.IsOSVistaOrNewer && _chromeInfo.GlassFrameThickness != default(Thickness) && _isGlassEnabled)
540
SystemCommands.ShowSystemMenuPhysicalCoordinates(_window, new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam)));
580
if (!
Utility
.IsFlagSet(wp.flags, (int)SWP.NOSIZE))
674
bool canMinimize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MINIMIZEBOX);
675
bool canMaximize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MAXIMIZEBOX);
676
bool canSize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.THICKFRAME);
786
Utility
.SafeDeleteObject(ref hrgn);
794
if (null != wp && !
Utility
.IsFlagSet(wp.Value.flags, (int)SWP.NOSIZE))
864
Utility
.SafeDeleteObject(ref hrgn);
907
Utility
.SafeDeleteObject(ref hrgn);
937
if (!
Utility
.IsOSVistaOrNewer)
974
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
979
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
984
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
989
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
1143
if (!
Utility
.IsOSVistaOrNewer || _hwnd == IntPtr.Zero)
System\Windows\Standard\MessageWindow.cs (1)
183
Utility
.SafeDestroyWindow(ref hwnd);
System\Windows\Standard\NativeMethods.cs (14)
1587
Utility
.SafeRelease(ref cp);
1614
Utility
.SafeRelease(ref _cp);
2053
return (_left << 16 |
Utility
.LOWORD(_right)) ^ (_top << 16 |
Utility
.LOWORD(_bottom));
2318
if (!
Utility
.IsOSVistaOrNewer)
2326
if (!
Utility
.IsOSWindows7OrNewer)
2526
if (
Utility
.IsOSVistaOrNewer && IsThemeActive())
2547
if (!
Utility
.IsOSVistaOrNewer)
2563
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2570
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2578
Assert.IsTrue(
Utility
.IsOSVistaOrNewer);
2585
Assert.IsTrue(
Utility
.IsOSWindows7OrNewer);
3015
var metrics =
Utility
.IsOSVistaOrNewer
3185
if (!
Utility
.IsOSVistaOrNewer)
System\Windows\SystemParameters.cs (1)
5655
_windowGlassColor = Standard.
Utility
.ColorFromArgbDword(color);
System\Windows\Window.cs (2)
2581
if (Standard.
Utility
.IsOSWindows10OrNewer)
2605
if(!Standard.
Utility
.IsOSWindows11OrNewer) return;