Skip to content

Commit db755c7

Browse files
Fix rebase merge issues.
1 parent 696b411 commit db755c7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/System.Windows.Forms/System/Windows/Forms/Form.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,6 +2183,7 @@ protected override void SetVisibleCore(bool value)
21832183
[SRDescription(nameof(SR.FormCornerPreferenceDescr))]
21842184
[Browsable(false)]
21852185
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
2186+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
21862187
public FormCornerPreference FormCornerPreference
21872188
{
21882189
get => Properties.GetValueOrDefault(s_propFormCornerPreference, FormCornerPreference.Default);
@@ -2220,6 +2221,7 @@ public FormCornerPreference FormCornerPreference
22202221
/// <param name="e">
22212222
/// An <see cref="EventArgs"/> that contains the event data, in this case empty.
22222223
/// </param>
2224+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
22232225
protected virtual void OnFormCornerPreferenceChanged(EventArgs e)
22242226
{
22252227
if (Events[s_formCornerPreferenceChanged] is EventHandler eventHandler)
@@ -2228,6 +2230,7 @@ protected virtual void OnFormCornerPreferenceChanged(EventArgs e)
22282230
}
22292231
}
22302232

2233+
#pragma warning disable WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
22312234
private unsafe void SetFormCornerPreferenceInternal(FormCornerPreference cornerPreference)
22322235
{
22332236
DWM_WINDOW_CORNER_PREFERENCE dwmCornerPreference = cornerPreference switch
@@ -2245,6 +2248,7 @@ private unsafe void SetFormCornerPreferenceInternal(FormCornerPreference cornerP
22452248
&dwmCornerPreference,
22462249
sizeof(DWM_WINDOW_CORNER_PREFERENCE));
22472250
}
2251+
#pragma warning restore WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
22482252

22492253
/// <summary>
22502254
/// Sets or gets the Form's border color.
@@ -2271,6 +2275,7 @@ private unsafe void SetFormCornerPreferenceInternal(FormCornerPreference cornerP
22712275
[SRDescription(nameof(SR.FormBorderColorDescr))]
22722276
[Browsable(false)]
22732277
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
2278+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
22742279
public Color FormBorderColor
22752280
{
22762281
get => Properties.GetValueOrDefault(s_propFormBorderColor, Color.Empty);
@@ -2298,6 +2303,7 @@ public Color FormBorderColor
22982303
/// <param name="e">
22992304
/// An <see cref="EventArgs"/> that contains the event data, in this case empty.
23002305
/// </param>
2306+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
23012307
protected virtual void OnFormBorderColorChanged(EventArgs e)
23022308
{
23032309
if (Events[s_formBorderColorChanged] is EventHandler eventHandler)
@@ -2331,6 +2337,7 @@ protected virtual void OnFormBorderColorChanged(EventArgs e)
23312337
[SRDescription(nameof(SR.FormCaptionBackColorDescr))]
23322338
[Browsable(false)]
23332339
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
2340+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
23342341
public Color FormCaptionBackColor
23352342
{
23362343
get => Properties.GetValueOrDefault(s_propFormCaptionBackColor, Color.Empty);
@@ -2359,6 +2366,7 @@ public Color FormCaptionBackColor
23592366
/// <param name="e">
23602367
/// An <see cref="EventArgs"/> that contains the event data, in this case empty.
23612368
/// </param>
2369+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
23622370
protected virtual void OnFormCaptionBackColorChanged(EventArgs e)
23632371
{
23642372
if (Events[s_formCaptionBackColorChanged] is EventHandler eventHandler)
@@ -2392,6 +2400,7 @@ protected virtual void OnFormCaptionBackColorChanged(EventArgs e)
23922400
[SRDescription(nameof(SR.FormCaptionTextColorDescr))]
23932401
[Browsable(false)]
23942402
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
2403+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
23952404
public Color FormCaptionTextColor
23962405
{
23972406
get => Properties.GetValueOrDefault(s_propFormCaptionTextColor, Color.Empty);
@@ -2420,6 +2429,7 @@ public Color FormCaptionTextColor
24202429
/// <param name="e">
24212430
/// An <see cref="EventArgs"/> that contains the event data, in this case empty.
24222431
/// </param>
2432+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
24232433
protected virtual void OnFormCaptionTextColorChanged(EventArgs e)
24242434
{
24252435
if (Events[s_formCaptionTextColorChanged] is EventHandler eventHandler)
@@ -4899,10 +4909,12 @@ private void SetFormTitleProperties()
48994909
SetFormAttributeColorInternal(DWMWINDOWATTRIBUTE.DWMWA_TEXT_COLOR, formCaptionTextColor.Value);
49004910
}
49014911

4912+
#pragma warning disable WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
49024913
if (Properties.TryGetValue(s_propFormCornerPreference, out FormCornerPreference? cornerPreference))
49034914
{
49044915
SetFormCornerPreferenceInternal(cornerPreference.Value);
49054916
}
4917+
#pragma warning restore WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
49064918
}
49074919
}
49084920

src/System.Windows.Forms/System/Windows/Forms/FormCornerPreference.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Windows.Forms.Analyzers.Diagnostics;
45
using Windows.Win32.Graphics.Dwm;
56

67
namespace System.Windows.Forms;
@@ -9,6 +10,7 @@ namespace System.Windows.Forms;
910
/// Specifies the corner preference for a <see cref="Form"/> which can be
1011
/// set using the <see cref="Form.FormCornerPreference"/> property.
1112
/// </summary>
13+
[Experimental(DiagnosticIDs.ExperimentalDarkMode, UrlFormat = DiagnosticIDs.UrlFormat)]
1214
public enum FormCornerPreference
1315
{
1416
/// <summary>

0 commit comments

Comments
 (0)