73 references to Utility
PresentationFramework (73)
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,
135
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 (48)
85
if (
Utility
.IsPresentationFrameworkVersionLessThan4)
163
Utility
.AddDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
164
Utility
.AddDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
205
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
206
Utility
.RemoveDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup);
330
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
338
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
346
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
354
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
364
if (
Utility
.IsPresentationFrameworkVersionLessThan4)
373
if (!
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
382
if (!
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
391
if (!
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
400
if (!
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
441
if (
Utility
.IsPresentationFrameworkVersionLessThan4)
455
Assert.IsTrue(
Utility
.IsPresentationFrameworkVersionLessThan4);
484
Assert.IsTrue(
Utility
.IsPresentationFrameworkVersionLessThan4);
503
Assert.IsTrue(
Utility
.IsPresentationFrameworkVersionLessThan4);
592
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
596
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
600
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
604
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
660
var mousePosScreen = new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam));
691
if (
Utility
.IsOSVistaOrNewer && _chromeInfo.GlassFrameThickness != default(Thickness) && _isGlassEnabled)
718
SystemCommands.ShowSystemMenuPhysicalCoordinates(_window, new Point(
Utility
.GET_X_LPARAM(lParam),
Utility
.GET_Y_LPARAM(lParam)));
758
if (!
Utility
.IsFlagSet(wp.flags, (int)SWP.NOSIZE))
785
Assert.IsTrue(
Utility
.IsPresentationFrameworkVersionLessThan4);
796
Assert.IsTrue(
Utility
.IsPresentationFrameworkVersionLessThan4);
802
Assert.Implies(_window.WindowState == WindowState.Maximized,
Utility
.IsOSWindows7OrNewer);
823
Assert.IsTrue(
Utility
.IsPresentationFrameworkVersionLessThan4);
831
Assert.IsTrue(
Utility
.IsOSWindows7OrNewer);
843
Assert.IsTrue(
Utility
.IsPresentationFrameworkVersionLessThan4);
925
bool canMinimize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MINIMIZEBOX);
926
bool canMaximize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.MAXIMIZEBOX);
927
bool canSize =
Utility
.IsFlagSet((int)dwStyle, (int)WS.THICKFRAME);
1037
Utility
.SafeDeleteObject(ref hrgn);
1045
if (null != wp && !
Utility
.IsFlagSet(wp.Value.flags, (int)SWP.NOSIZE))
1115
Utility
.SafeDeleteObject(ref hrgn);
1158
Utility
.SafeDeleteObject(ref hrgn);
1188
if (!
Utility
.IsOSVistaOrNewer)
1225
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Top))
1230
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Left))
1235
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Bottom))
1240
if (
Utility
.IsFlagSet((int)_chromeInfo.NonClientFrameEdges, (int)NonClientFrameEdges.Right))
1388
if (
Utility
.IsPresentationFrameworkVersionLessThan4)
1403
if (!
Utility
.IsOSVistaOrNewer || _hwnd == IntPtr.Zero)
System\Windows\Standard\MessageWindow.cs (1)
188
Utility
.SafeDestroyWindow(ref hwnd);
System\Windows\Standard\NativeMethods.cs (14)
1601
Utility
.SafeRelease(ref cp);
1629
Utility
.SafeRelease(ref _cp);
2074
return (_left << 16 |
Utility
.LOWORD(_right)) ^ (_top << 16 |
Utility
.LOWORD(_bottom));
2351
if (!
Utility
.IsOSVistaOrNewer)
2359
if (!
Utility
.IsOSWindows7OrNewer)
2588
if (
Utility
.IsOSVistaOrNewer && IsThemeActive())
2610
if (!
Utility
.IsOSVistaOrNewer)
2629
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2637
Assert.IsTrue(
Utility
.IsWindows11_22H2OrNewer);
2645
Assert.IsTrue(
Utility
.IsOSVistaOrNewer);
2653
Assert.IsTrue(
Utility
.IsOSWindows7OrNewer);
3143
var metrics =
Utility
.IsOSVistaOrNewer
3327
if (!
Utility
.IsOSVistaOrNewer)
System\Windows\SystemParameters.cs (1)
5674
_windowGlassColor = Standard.
Utility
.ColorFromArgbDword(color);
System\Windows\Window.cs (1)
2518
if (Standard.
Utility
.IsOSWindows11OrNewer && ThemeManager.IsFluentThemeEnabled)