55 references to OsVersion
System.Private.Windows.Core (1)
Windows\Win32\PInvokeCore.SystemParametersInfo.cs (1)
81
if (
OsVersion
.IsWindows10_1607OrGreater())
System.Windows.Forms (28)
System\Windows\Forms\Application.cs (1)
397
!SystemInformation.HighContrast &&
OsVersion
.IsWindows11_OrGreater();
System\Windows\Forms\Control.cs (4)
5389
if (OriginalDeviceDpiInternal != DeviceDpiInternal &&
OsVersion
.IsWindows10_1703OrGreater())
6450
if ((ScaleHelper.IsThreadPerMonitorV2Aware || ScaleHelper.IsScalingRequired) &&
OsVersion
.IsWindows10_1703OrGreater())
7726
if (
OsVersion
.IsWindows11_OrGreater()
9438
if (
OsVersion
.IsWindows8OrGreater() && TryGetAccessibilityObject(out AccessibleObject? accessibleObject))
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxAccessibleObject.cs (1)
155
if (
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
37
if (!
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
25606
if (
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (1)
1065
if (DataGridView.IsAccessibilityObjectCreated &&
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (1)
2179
if (DataGridView.IsAccessibilityObjectCreated &&
OsVersion
.IsWindows8OrGreater() && this[index] is DataGridViewRow row)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (1)
432
if (
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (1)
130
if (
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5098
if (!
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (1)
437
if (
OsVersion
.IsWindows8OrGreater() && _accessibilityObject is ListViewGroupAccessibleObject accessibleObject)
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
1019
if (
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarAccessibleObject.cs (1)
42
Debug.Assert(
OsVersion
.IsWindows8OrGreater());
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarBodyAccessibleObject.cs (1)
50
Debug.Assert(
OsVersion
.IsWindows8OrGreater());
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarRowAccessibleObject.cs (1)
94
Debug.Assert(
OsVersion
.IsWindows8OrGreater());
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1485
if (
OsVersion
.IsWindows8OrGreater() && IsAccessibilityObjectCreated)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (2)
80
Debug.Assert(
OsVersion
.IsWindows8OrGreater());
513
if (
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
3925
if (
OsVersion
.IsWindows8OrGreater())
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
652
if (
OsVersion
.IsWindows10_1607OrGreater())
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
341
&&
OsVersion
.IsWindows8OrGreater()
System\Windows\Forms\Form.cs (1)
6543
if (!
OsVersion
.IsWindows11_OrGreater())
System\Windows\Forms\NativeWindow.cs (1)
476
if (
OsVersion
.IsWindows10_18030rGreater())
System\Windows\Forms\ToolTip\ToolTip.cs (2)
83
IsPersistent =
OsVersion
.IsWindows11_OrGreater();
95
IsPersistent =
OsVersion
.IsWindows11_OrGreater();
System.Windows.Forms.Primitives (16)
System\Windows\Forms\Internals\ScaleHelper.cs (8)
64
if (!
OsVersion
.IsWindows10_1607OrGreater())
76
if (!
OsVersion
.IsWindows10_1607OrGreater())
225
if (font is null || font.IsSystemFont || !
OsVersion
.IsWindows10_1507OrGreater())
309
internal static Size LogicalSmallSystemIconSize => s_logicalSmallSystemIconSize ??=
OsVersion
.IsWindows10_1607OrGreater()
371
if (
OsVersion
.IsWindows10_1607OrGreater())
400
else if (
OsVersion
.IsWindows8_1OrGreater())
443
if (
OsVersion
.IsWindows10_1703OrGreater())
464
else if (
OsVersion
.IsWindows8_1OrGreater())
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (1)
31
if (!
OsVersion
.IsWindows10_18030rGreater())
Windows\Win32\PInvoke.GetDpiForWindow.cs (1)
11
if (
OsVersion
.IsWindows10_1607OrGreater())
Windows\Win32\PInvoke.GetSystemMetrics.cs (1)
13
=>
OsVersion
.IsWindows10_1607OrGreater() ? GetSystemMetricsForDpi(nIndex, dpi) : PInvokeCore.GetSystemMetrics(nIndex);
Windows\Win32\PInvoke.GetThreadDpiAwarenessContext.cs (1)
17
if (
OsVersion
.IsWindows10_1607OrGreater())
Windows\Win32\PInvoke.SetThreadDpiAwarenessContext.cs (1)
17
if (
OsVersion
.IsWindows10_1607OrGreater())
Windows\Win32\PInvoke.UiaDisconnectProvider.cs (1)
13
if (provider is not null && (skipOSCheck ||
OsVersion
.IsWindows8OrGreater()))
Windows\Win32\PInvoke.UiaRaiseNotificationEvent.cs (1)
18
if (
OsVersion
.IsWindows10_1709OrGreater())
Windows\Win32\UI\HiDpi\DPI_AWARENESS_CONTEXT.cs (1)
19
|| (
OsVersion
.IsWindows10_1607OrGreater()
System.Windows.Forms.Tests (8)
KeyboardTooltipStateMachineTests.cs (1)
109
Assert.Equal(isPersistent &&
OsVersion
.IsWindows11_OrGreater() ? "Hidden" : "Shown", currentState);
System\Windows\Forms\ApplicationTests.cs (1)
324
if (!
OsVersion
.IsWindows10_1507OrGreater())
System\Windows\Forms\FormTests.cs (3)
980
if (!
OsVersion
.IsWindows11_OrGreater())
1009
if (!
OsVersion
.IsWindows11_OrGreater())
1038
if (!
OsVersion
.IsWindows11_OrGreater())
System\Windows\Forms\InputLanguageTests.cs (1)
140
if (
OsVersion
.IsWindows11_22H2OrGreater())
System\Windows\Forms\ToolTipTests.cs (2)
298
bool persistentToolTipSupported =
OsVersion
.IsWindows11_OrGreater();
321
bool persistentToolTipSupported =
OsVersion
.IsWindows11_OrGreater();
System.Windows.Forms.UI.IntegrationTests (2)
FormTests.cs (2)
26
if (!
OsVersion
.IsWindows11_OrGreater())
85
if (!
OsVersion
.IsWindows11_OrGreater())