@@ -21,12 +21,12 @@ namespace System.Windows.Forms;
21
21
public sealed partial class Application
22
22
{
23
23
/// <summary>
24
- /// Hash table for our event list
24
+ /// Hash table for our event list.
25
25
/// </summary>
26
26
private static EventHandlerList ? s_eventHandlers ;
27
27
private static Font ? s_defaultFont ;
28
28
/// <summary>
29
- /// Scaled version of non system <see cref="s_defaultFont"/>.
29
+ /// Scaled version of non- system <see cref="s_defaultFont"/>.
30
30
/// </summary>
31
31
private static Font ? s_defaultFontScaled ;
32
32
private static string ? s_startupPath ;
@@ -50,7 +50,7 @@ public sealed partial class Application
50
50
private const int SystemDarkModeDisabled = 1 ;
51
51
52
52
/// <summary>
53
- /// Events the user can hook into
53
+ /// Events the user can hook into.
54
54
/// </summary>
55
55
private static readonly object s_eventApplicationExit = new ( ) ;
56
56
private static readonly object s_eventThreadExit = new ( ) ;
@@ -65,16 +65,16 @@ public sealed partial class Application
65
65
private static bool s_parkingWindowCreated ;
66
66
67
67
/// <summary>
68
- /// This class is static, there is no need to ever create it.
68
+ /// This class is static; there is no need to ever create it.
69
69
/// </summary>
70
70
private Application ( )
71
71
{
72
72
}
73
73
74
74
/// <summary>
75
75
/// Determines if the caller should be allowed to quit the application. This will return false,
76
- /// for example, if being called from a windows forms control being hosted within a web browser. The
77
- /// windows forms control should not attempt to quit the application.
76
+ /// for example, if being called from a Windows Forms control being hosted within a web browser. The
77
+ /// Windows Forms control should not attempt to quit the application.
78
78
/// </summary>
79
79
public static bool AllowQuit => ThreadContext . GetAllowQuit ( ) ;
80
80
@@ -271,8 +271,8 @@ internal static bool CustomThreadExceptionHandlerAttached
271
271
/// to apply the new system setting.
272
272
/// </para>
273
273
/// <para>
274
- /// Note that Dark Mode is only available on Windows 11 and later. If Windows is set to High Contrast mode,
275
- /// that mode always takes precedence over other settings .
274
+ /// Note that the dark color mode is only available from Windows 11 on or later versions . If the system
275
+ /// is set to a accessibility contrast theme, the dark mode is not available .
276
276
/// </para>
277
277
/// <para>
278
278
/// <b>Note for Visual Basic:</b> If you are using the Visual Basic Application Framework, set the color mode
@@ -389,14 +389,15 @@ static void NotifySystemEventsOfColorChange()
389
389
/// <remarks>
390
390
/// <para>
391
391
/// The color setting is determined based on the operating system version and its system settings.
392
- /// It returns <see cref="SystemColorMode.Dark"/> if the dark mode is enabled in the system settings,
393
- /// <see cref="SystemColorMode.Classic"/> if the color mode equals the light, standard color setting.
392
+ /// It returns <see cref="SystemColorMode.Dark"/> if dark mode is enabled in the system settings,
393
+ /// or <see cref="SystemColorMode.Classic"/> if the color mode is set to the light, standard color setting.
394
394
/// </para>
395
395
/// <para>
396
- /// SystemColorMode is supported on Windows 11 or later versions.
396
+ /// <see cref=" SystemColorMode"/> is supported on Windows 11 or later versions.
397
397
/// </para>
398
398
/// <para>
399
- /// SystemColorModes is not supported, if the Windows OS <c>High Contrast Mode</c> has been enabled in the system settings.
399
+ /// <see cref="SystemColorMode"/> is not supported if a Windows OS high contrast theme has been
400
+ /// enabled in the system settings.
400
401
/// </para>
401
402
/// </remarks>
402
403
public static SystemColorMode SystemColorMode =>
@@ -434,7 +435,7 @@ private static int GetSystemColorModeInternal()
434
435
435
436
/// <summary>
436
437
/// Gets a value indicating whether the application is running in a dark system color context.
437
- /// Note: In a high contrast mode , this will always return <see langword="false"/>.
438
+ /// Note: With a accessibility contrast theme selected in the OS , this will always return <see langword="false"/>.
438
439
/// </summary>
439
440
public static bool IsDarkModeEnabled =>
440
441
! SystemInformation . HighContrast
@@ -949,7 +950,7 @@ internal static void DoEventsModal()
949
950
950
951
/// <summary>
951
952
/// Enables visual styles for all subsequent <see cref="Run()"/> and <see cref="Control.CreateHandle"/> calls.
952
- /// Uses the default theming manifest file shipped with the redist .
953
+ /// Uses the default theming manifest file shipped with the redistributable package .
953
954
/// </summary>
954
955
[ UnconditionalSuppressMessage ( "SingleFile" , "IL3002" , Justification = "Single-file case is handled" ) ]
955
956
public static void EnableVisualStyles ( )
@@ -1363,6 +1364,10 @@ internal static void RunDialog(Form form)
1363
1364
/// This switch determines the default text rendering engine to use by some controls that support
1364
1365
/// switching rendering engine.
1365
1366
/// </summary>
1367
+ /// <param name="defaultValue">The default value to use for compatible text rendering.</param>
1368
+ /// <exception cref="InvalidOperationException">
1369
+ /// Thrown if any window handle has already been created in the application.
1370
+ /// </exception>
1366
1371
public static void SetCompatibleTextRenderingDefault ( bool defaultValue )
1367
1372
{
1368
1373
if ( NativeWindow . AnyHandleCreated )
@@ -1374,7 +1379,7 @@ public static void SetCompatibleTextRenderingDefault(bool defaultValue)
1374
1379
}
1375
1380
1376
1381
/// <summary>
1377
- /// Sets the default <see cref="Font"/> for process.
1382
+ /// Sets the default <see cref="Font"/> for the process.
1378
1383
/// </summary>
1379
1384
/// <param name="font">The font to be used as a default across the application.</param>
1380
1385
/// <exception cref="ArgumentNullException"><paramref name="font"/> is <see langword="null"/>.</exception>
@@ -1383,11 +1388,11 @@ public static void SetCompatibleTextRenderingDefault(bool defaultValue)
1383
1388
/// </exception>
1384
1389
/// <remarks>
1385
1390
/// <para>
1386
- /// The system text scale factor will be applied to the font, i.e. if the default font is set to "Calibri, 11f"
1387
- /// and the text scale factor is set to 150% the resulting default font will be set to "Calibri, 16.5f".
1391
+ /// The system text scale factor will be applied to the font. For example, if the default font is set to "Calibri, 11f"
1392
+ /// and the text scale factor is set to 150%, the resulting default font will be set to "Calibri, 16.5f".
1388
1393
/// </para>
1389
1394
/// <para>
1390
- /// Users can adjust text scale with the Make text bigger slider on the Settings -> Ease of Access -> Vision/ Display screen.
1395
+ /// Users can adjust text scale with the " Make text bigger" slider on the Settings → Accessibility → Display screen.
1391
1396
/// </para>
1392
1397
/// </remarks>
1393
1398
/// <seealso href="https://docs.microsoft.com/windows/uwp/design/input/text-scaling">Windows Text scaling</seealso>
@@ -1403,7 +1408,7 @@ public static void SetDefaultFont(Font font)
1403
1408
}
1404
1409
1405
1410
/// <summary>
1406
- /// Scale <see cref="s_defaultFont"/> or <see cref="s_defaultFontScaled"/> if needed.
1411
+ /// Scales <see cref="s_defaultFont"/> or <see cref="s_defaultFontScaled"/> if needed.
1407
1412
/// </summary>
1408
1413
internal static void ScaleDefaultFont ( )
1409
1414
{
0 commit comments