Skip to content

Commit f79b907

Browse files
committed
Removing the label [RefreshProperties(RefreshProperties.All)] from other properties that using "combo boxes"
1 parent 72f6c68 commit f79b907

File tree

9 files changed

+19
-17
lines changed

9 files changed

+19
-17
lines changed

src/System.Windows.Forms/src/System/Windows/Forms/Controls/Buttons/CheckBox.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ public ContentAlignment CheckAlign
144144
SettingsBindable(true)]
145145
[DefaultValue(false)]
146146
[SRCategory(nameof(SR.CatAppearance))]
147-
[RefreshProperties(RefreshProperties.All)]
148147
[SRDescription(nameof(SR.CheckBoxCheckedDescr))]
149148
public bool Checked
150149
{
@@ -164,7 +163,6 @@ public bool Checked
164163
[Bindable(true)]
165164
[SRCategory(nameof(SR.CatAppearance))]
166165
[DefaultValue(CheckState.Unchecked)]
167-
[RefreshProperties(RefreshProperties.All)]
168166
[SRDescription(nameof(SR.CheckBoxCheckStateDescr))]
169167
public CheckState CheckState
170168
{

src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridView.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,6 @@ private bool ShouldSerializeColumnHeadersHeight() =>
16001600
/// Gets or sets a value that determines the behavior for adjusting the column headers height.
16011601
/// </summary>
16021602
[DefaultValue(DataGridViewColumnHeadersHeightSizeMode.EnableResizing)]
1603-
[RefreshProperties(RefreshProperties.All)]
16041603
[SRCategory(nameof(SR.CatBehavior))]
16051604
[SRDescription(nameof(SR.DataGridView_ColumnHeadersHeightSizeModeDescr))]
16061605
public DataGridViewColumnHeadersHeightSizeMode ColumnHeadersHeightSizeMode
@@ -3437,7 +3436,6 @@ _rowHeadersWidthSizeMode is DataGridViewRowHeadersWidthSizeMode.EnableResizing o
34373436
/// Gets or sets a value that determines the behavior for adjusting the row headers width.
34383437
/// </summary>
34393438
[DefaultValue(DataGridViewRowHeadersWidthSizeMode.EnableResizing)]
3440-
[RefreshProperties(RefreshProperties.All)]
34413439
[SRCategory(nameof(SR.CatBehavior))]
34423440
[SRDescription(nameof(SR.DataGridView_RowHeadersWidthSizeModeDescr))]
34433441
public DataGridViewRowHeadersWidthSizeMode RowHeadersWidthSizeMode

src/System.Windows.Forms/src/System/Windows/Forms/Controls/DataGridView/DataGridViewColumn.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ internal float FillWeightInternal
361361
}
362362

363363
[DefaultValue(false)]
364-
[RefreshProperties(RefreshProperties.All)]
365364
[SRCategory(nameof(SR.CatLayout))]
366365
[SRDescription(nameof(SR.DataGridView_ColumnFrozenDescr))]
367366
public override bool Frozen

src/System.Windows.Forms/src/System/Windows/Forms/Controls/TabControl/TabControl.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public TabControl()
9898
[SRCategory(nameof(SR.CatBehavior))]
9999
[Localizable(true)]
100100
[DefaultValue(TabAlignment.Top)]
101-
[RefreshProperties(RefreshProperties.All)]
102101
[SRDescription(nameof(SR.TabBaseAlignmentDescr))]
103102
public TabAlignment Alignment
104103
{

src/System.Windows.Forms/src/System/Windows/Forms/Controls/TextBox/TextBoxBase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,6 @@ public event EventHandler? ModifiedChanged
712712
[DefaultValue(false)]
713713
[Localizable(true)]
714714
[SRDescription(nameof(SR.TextBoxMultilineDescr))]
715-
[RefreshProperties(RefreshProperties.All)]
716715
public virtual bool Multiline
717716
{
718717
get

src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripItem.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ public virtual bool AllowDrop
325325
/// </summary>
326326
[DefaultValue(true)]
327327
[SRCategory(nameof(SR.CatBehavior))]
328-
[RefreshProperties(RefreshProperties.All)]
329328
[Localizable(true)]
330329
[SRDescription(nameof(SR.ToolStripItemAutoSizeDescr))]
331330
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]

src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripMenuItem.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ public override bool Enabled
248248
[Bindable(true)]
249249
[DefaultValue(false)]
250250
[SRCategory(nameof(SR.CatAppearance))]
251-
[RefreshProperties(RefreshProperties.All)]
252251
[SRDescription(nameof(SR.CheckBoxCheckedDescr))]
253252
public bool Checked
254253
{
@@ -295,7 +294,6 @@ public bool CheckOnClick
295294
[Bindable(true)]
296295
[SRCategory(nameof(SR.CatAppearance))]
297296
[DefaultValue(CheckState.Unchecked)]
298-
[RefreshProperties(RefreshProperties.All)]
299297
[SRDescription(nameof(SR.CheckBoxCheckStateDescr))]
300298
public CheckState CheckState
301299
{

src/System.Windows.Forms/src/System/Windows/Forms/Controls/ToolStrips/ToolStripTextBox.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ public bool Modified
283283
[DefaultValue(false)]
284284
[Localizable(true)]
285285
[SRDescription(nameof(SR.TextBoxMultilineDescr))]
286-
[RefreshProperties(RefreshProperties.All)]
287286
[Browsable(false)]
288287
[EditorBrowsable(EditorBrowsableState.Never)]
289288
public bool Multiline

src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/MainForm.cs

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,35 @@ private void CreateDesignSurface(int n)
124124
// - create some Controls at DesignTime
125125
TextBox t1 = surface.CreateControl<TextBox>(new Size(200, 23), new Point(172, 12));
126126
Button b1 = surface.CreateControl<Button>(new Size(200, 40), new Point(172, 63));
127-
CustomButton b2 = surface.CreateControl<CustomButton>(new Size(200, 40), new Point(100, 200));
127+
CustomButton b2 = surface.CreateControl<CustomButton>(new Size(200, 40), new Point(172, 200));
128128
b1.Text = "I'm the first Button";
129129
b2.Text = "I'm the second Button";
130130
b1.BackColor = Color.LightGray;
131131
b2.BackColor = Color.LightGreen;
132132

133-
RadioButton rb1 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 21));
133+
RadioButton rb1 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 10));
134134
rb1.Text = "Check me!";
135-
RadioButton rb2 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 50));
135+
RadioButton rb2 = surface.CreateControl<RadioButton>(new Size(120, 22), new Point(12, 35));
136136
rb2.Text = "No, check me!";
137137
rb2.Checked = true;
138138

139-
Panel pnl = surface.CreateControl<Panel>(new Size(130, 100), new Point(12, 21));
139+
CheckBox checkbox1 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 60));
140+
checkbox1.Text = "I'm Unchecked!";
141+
CheckBox checkbox2 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 85));
142+
checkbox2.Text = "I'm Indeterminate!";
143+
checkbox2.AutoSize= true;
144+
checkbox2.CheckState = CheckState.Indeterminate;
145+
CheckBox checkbox3 = surface.CreateControl<CheckBox>(new Size(120, 22), new Point(12, 110));
146+
checkbox3.Text = "I'm Checked!";
147+
checkbox3.CheckState = CheckState.Checked;
148+
149+
Panel pnl = surface.CreateControl<Panel>(new Size(140, 140), new Point(12, 12));
140150
pnl.BackColor = Color.Aquamarine;
141151
rb1.Parent = pnl;
142152
rb2.Parent = pnl;
153+
checkbox1.Parent = pnl;
154+
checkbox2.Parent = pnl;
155+
checkbox3.Parent = pnl;
143156

144157
Label l1 = surface.CreateControl<Label>(new Size(100, 25), new Point(12, 12));
145158
Label l2 = surface.CreateControl<Label>(new Size(120, 25), new Point(12, 12));
@@ -154,7 +167,7 @@ private void CreateDesignSurface(int n)
154167
l1.Parent = sct.Panel1;
155168
l2.Parent = sct.Panel2;
156169

157-
PictureBox pb1 = surface.CreateControl<PictureBox>(new Size(64, 64), new Point(24, 166));
170+
PictureBox pb1 = surface.CreateControl<PictureBox>(new Size(64, 64), new Point(12, 176));
158171
pb1.Image = new Icon("painter.ico").ToBitmap();
159172

160173
ContextMenuStrip cm1 = surface.CreateComponent<ContextMenuStrip>();
@@ -333,7 +346,7 @@ private void CreateDesignSurface(int n)
333346
splitter.BackColor = Color.Green;
334347
splitter.Dock = DockStyle.Bottom;
335348

336-
Panel panel = surface.CreateControl<Panel>(new(0, tabPage6.Height/2), new(0, 0));
349+
Panel panel = surface.CreateControl<Panel>(new(0, tabPage6.Height / 2), new(0, 0));
337350
panel.Dock = DockStyle.Bottom;
338351
NumericUpDown numericUpDown = surface.CreateControl<NumericUpDown>(new(50, 10), new(10, 10));
339352
panel.Controls.Add(numericUpDown);

0 commit comments

Comments
 (0)