57 references to Utility
PresentationFramework (57)
System\Windows\Appearance\WindowBackdropManager.cs (5)
16
WindowBackdropType.Auto =>
Utility
.IsWindows11_22H2OrNewer,
17
WindowBackdropType.TabbedWindow =>
Utility
.IsWindows11_22H2OrNewer,
18
WindowBackdropType.MainWindow =>
Utility
.IsOSWindows11OrNewer,
19
WindowBackdropType.TransientWindow =>
Utility
.IsOSWindows7OrNewer,
139
internal static bool IsBackdropEnabled => _isBackdropEnabled ??=
Utility
.IsWindows11_22H2OrNewer &&
System\Windows\Shell\WindowChrome.cs (3)
194
(value) =>
Utility
.IsThicknessNonNegative((Thickness)value));
215
if (!
Utility
.IsThicknessNonNegative(thickness))
248
(value) =>
Utility
.IsCornerRadiusValid((CornerRadius)value));
System\Windows\Shell\WindowChromeWorker.cs (31)
141
Utility
.AddDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
142
Utility
.AddDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
183
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
184
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
306
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
314
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
322
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
330
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
415
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
419
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
423
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
427
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
483
var mousePosScreen = new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam));
514
if (
Utility
.IsOSVistaOrNewer && _chromeInfo.GlassFrameThickness != default(Thickness) && _isGlassEnabled)
541
SystemCommands.ShowSystemMenuPhysicalCoordinates(_window, new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam)));
581
if (!
Utility
.IsFlagSet(wp.flags, (int)SWP.NOSIZE))
675
bool canMinimize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MINIMIZEBOX);
676
bool canMaximize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MAXIMIZEBOX);
677
bool canSize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.THICKFRAME);
787
Utility
.SafeDeleteObject(ref hrgn);
795
if (null != wp && !
Utility
.IsFlagSet(wp.Value.flags, (int)SWP.NOSIZE))
865
Utility
.SafeDeleteObject(ref hrgn);
908
Utility
.SafeDeleteObject(ref hrgn);
938
if (!
Utility
.IsOSVistaOrNewer)
975
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
980
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
985
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
990
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
1144
if (!
Utility
.IsOSVistaOrNewer || _hwnd == IntPtr.Zero)
System\Windows\Standard\MessageWindow.cs (1)
184
Utility
.SafeDestroyWindow(ref hwnd);
System\Windows\Standard\NativeMethods.cs (14)
1588
Utility
.SafeRelease(ref cp);
1615
Utility
.SafeRelease(ref _cp);
2049
return (_left << 16 |
Utility
.LOWORD(_right)) ^ (_top << 16 |
Utility
.LOWORD(_bottom));
2314
if (!
Utility
.IsOSVistaOrNewer)
2322
if (!
Utility
.IsOSWindows7OrNewer)
2522
if (
Utility
.IsOSVistaOrNewer && IsThemeActive())
2543
if (!
Utility
.IsOSVistaOrNewer)
2559
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2566
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2574
Assert.IsTrue(
Utility
.IsOSVistaOrNewer);
2581
Assert.IsTrue(
Utility
.IsOSWindows7OrNewer);
3011
var metrics =
Utility
.IsOSVistaOrNewer
3181
if (!
Utility
.IsOSVistaOrNewer)
System\Windows\SystemParameters.cs (1)
5670
_windowGlassColor = Standard.
Utility
.ColorFromArgbDword(color);
System\Windows\Window.cs (2)
2598
if (Standard.
Utility
.IsOSWindows10OrNewer)
2622
if(!Standard.
Utility
.IsOSWindows11OrNewer) return;