57 references to Utility
PresentationFramework (57)
System\Windows\Appearance\WindowBackdropManager.cs (5)
17
WindowBackdropType.Auto =>
Utility
.IsWindows11_22H2OrNewer,
18
WindowBackdropType.TabbedWindow =>
Utility
.IsWindows11_22H2OrNewer,
19
WindowBackdropType.MainWindow =>
Utility
.IsOSWindows11OrNewer,
20
WindowBackdropType.TransientWindow =>
Utility
.IsOSWindows7OrNewer,
140
internal static bool IsBackdropEnabled => _isBackdropEnabled ??=
Utility
.IsWindows11_22H2OrNewer &&
System\Windows\Shell\WindowChrome.cs (3)
197
(value) =>
Utility
.IsThicknessNonNegative((Thickness)value));
218
if (!
Utility
.IsThicknessNonNegative(thickness))
251
(value) =>
Utility
.IsCornerRadiusValid((CornerRadius)value));
System\Windows\Shell\WindowChromeWorker.cs (31)
146
Utility
.AddDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
147
Utility
.AddDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
188
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
189
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
311
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
319
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
327
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
335
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
420
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
424
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
428
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
432
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
488
var mousePosScreen = new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam));
519
if (
Utility
.IsOSVistaOrNewer && _chromeInfo.GlassFrameThickness != default(Thickness) && _isGlassEnabled)
546
SystemCommands.ShowSystemMenuPhysicalCoordinates(_window, new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam)));
586
if (!
Utility
.IsFlagSet(wp.flags, (int)SWP.NOSIZE))
680
bool canMinimize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MINIMIZEBOX);
681
bool canMaximize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MAXIMIZEBOX);
682
bool canSize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.THICKFRAME);
792
Utility
.SafeDeleteObject(ref hrgn);
800
if (null != wp && !
Utility
.IsFlagSet(wp.Value.flags, (int)SWP.NOSIZE))
870
Utility
.SafeDeleteObject(ref hrgn);
913
Utility
.SafeDeleteObject(ref hrgn);
943
if (!
Utility
.IsOSVistaOrNewer)
980
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
985
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
990
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
995
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
1149
if (!
Utility
.IsOSVistaOrNewer || _hwnd == IntPtr.Zero)
System\Windows\Standard\MessageWindow.cs (1)
187
Utility
.SafeDestroyWindow(ref hwnd);
System\Windows\Standard\NativeMethods.cs (14)
1593
Utility
.SafeRelease(ref cp);
1620
Utility
.SafeRelease(ref _cp);
2054
return (_left << 16 |
Utility
.LOWORD(_right)) ^ (_top << 16 |
Utility
.LOWORD(_bottom));
2319
if (!
Utility
.IsOSVistaOrNewer)
2327
if (!
Utility
.IsOSWindows7OrNewer)
2527
if (
Utility
.IsOSVistaOrNewer && IsThemeActive())
2548
if (!
Utility
.IsOSVistaOrNewer)
2564
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2571
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2579
Assert.IsTrue(
Utility
.IsOSVistaOrNewer);
2586
Assert.IsTrue(
Utility
.IsOSWindows7OrNewer);
3016
var metrics =
Utility
.IsOSVistaOrNewer
3186
if (!
Utility
.IsOSVistaOrNewer)
System\Windows\SystemParameters.cs (1)
5674
_windowGlassColor = Standard.
Utility
.ColorFromArgbDword(color);
System\Windows\Window.cs (2)
2611
if (Standard.
Utility
.IsOSWindows10OrNewer)
2635
if(!Standard.
Utility
.IsOSWindows11OrNewer) return;