Skip to content

Commit cfaf092

Browse files
authored
updates for .net 9 preview 1 (#9560)
1 parent f182313 commit cfaf092

23 files changed

+8665
-8662
lines changed

xml/System.ComponentModel.Design/ComponentDesigner.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -581,14 +581,8 @@
581581
<Docs>
582582
<param name="component">The component for this designer.</param>
583583
<summary>Prepares the designer to view, edit, and design the specified component.</summary>
584-
<remarks>
585-
<format type="text/markdown"><![CDATA[
586-
587-
## Remarks
588-
The designer host calls this method when it is ready to use the designer.
589-
590-
]]></format>
591-
</remarks>
584+
<remarks>The designer host calls this method when it's ready to use the designer.</remarks>
585+
<exception cref="T:System.ArgumentNullException">.NET 9 and later versions: <paramref name="component" /> is <see langword="null" />.</exception>
592586
<altmember cref="T:System.ComponentModel.Design.IDesigner" />
593587
<altmember cref="T:System.ComponentModel.Design.IDesignerHost" />
594588
</Docs>

xml/System.Windows.Forms/BindingSource.xml

Lines changed: 794 additions & 790 deletions
Large diffs are not rendered by default.

xml/System.Windows.Forms/DataGridView.xml

Lines changed: 4199 additions & 4199 deletions
Large diffs are not rendered by default.

xml/System.Windows.Forms/DataGridViewButtonCell.xml

Lines changed: 160 additions & 160 deletions
Large diffs are not rendered by default.

xml/System.Windows.Forms/DataGridViewCell.xml

Lines changed: 861 additions & 861 deletions
Large diffs are not rendered by default.

xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventArgs.xml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,32 @@
3131
<Docs>
3232
<summary>Provides data for the <see cref="E:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded" /> event.</summary>
3333
<remarks>
34-
<format type="text/markdown"><![CDATA[
35-
36-
## Remarks
37-
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event occurs only when the <xref:System.Windows.Forms.DataGridView> control <xref:System.Windows.Forms.DataGridView.DataSource%2A> property is set or its <xref:System.Windows.Forms.DataGridView.VirtualMode%2A> property is `true`.
38-
39-
When you handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event, the shortcut menu that you specify in the handler is shown whenever the user right-clicks a cell. This is useful when you want to display shortcut menus determined by the current state or value of a cell.
40-
41-
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event also occurs whenever the value of the <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A?displayProperty=nameWithType> property is retrieved, either programmatically or when the user right-clicks the cell.
42-
43-
You can use the <xref:System.Windows.Forms.DataGridViewCellEventArgs.ColumnIndex%2A> and <xref:System.Windows.Forms.DataGridViewCellEventArgs.RowIndex%2A> properties to determine the state or value of a cell, and use this information to set the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs.ContextMenuStrip%2A> property. This property is initialized with the value of the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property, which the event value overrides.
44-
45-
Handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event when working with large amounts of data to avoid the performance penalties of setting the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> value for multiple cells. For more information, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control).
46-
47-
You can also specify shortcut menus for individual rows rather than individual cells by setting the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property or handling the <xref:System.Windows.Forms.DataGridView> control's <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event. The cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property setting overrides the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting, and the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event overrides both the <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event and the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting. You can specify `null` for a cell shortcut menu, however, to prevent a row shortcut menu from being overridden.
48-
49-
For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/).
50-
51-
52-
53-
## Examples
54-
The following code example uses the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs> class to set the shortcut menu without unsharing the row.
55-
34+
<format type="text/markdown"><![CDATA[
35+
36+
## Remarks
37+
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event occurs only when the <xref:System.Windows.Forms.DataGridView> control <xref:System.Windows.Forms.DataGridView.DataSource%2A> property is set or its <xref:System.Windows.Forms.DataGridView.VirtualMode%2A> property is `true`.
38+
39+
When you handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event, the shortcut menu that you specify in the handler is shown whenever the user right-clicks a cell. This is useful when you want to display shortcut menus determined by the current state or value of a cell.
40+
41+
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event also occurs whenever the value of the <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A?displayProperty=nameWithType> property is retrieved, either programmatically or when the user right-clicks the cell.
42+
43+
You can use the <xref:System.Windows.Forms.DataGridViewCellEventArgs.ColumnIndex%2A> and <xref:System.Windows.Forms.DataGridViewCellEventArgs.RowIndex%2A> properties to determine the state or value of a cell, and use this information to set the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs.ContextMenuStrip%2A> property. This property is initialized with the value of the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property, which the event value overrides.
44+
45+
Handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event when working with large amounts of data to avoid the performance penalties of setting the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> value for multiple cells. For more information, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control).
46+
47+
You can also specify shortcut menus for individual rows rather than individual cells by setting the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property or handling the <xref:System.Windows.Forms.DataGridView> control's <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event. The cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property setting overrides the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting, and the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event overrides both the <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event and the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting. You can specify `null` for a cell shortcut menu, however, to prevent a row shortcut menu from being overridden.
48+
49+
For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/).
50+
51+
52+
53+
## Examples
54+
The following code example uses the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs> class to set the shortcut menu without unsharing the row.
55+
5656
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/CPP/sharedrows.cpp" id="Snippet20":::
5757
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellContextMenuStripNeeded/sharedrows.cs" id="Snippet20":::
58-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/VB/sharedrows.vb" id="Snippet20":::
59-
58+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/VB/sharedrows.vb" id="Snippet20":::
59+
6060
]]></format>
6161
</remarks>
6262
<altmember cref="T:System.Windows.Forms.DataGridView" />
@@ -145,20 +145,20 @@
145145
<summary>Gets or sets the shortcut menu for the cell that raised the <see cref="E:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded" /> event.</summary>
146146
<value>The <see cref="T:System.Windows.Forms.ContextMenuStrip" /> for the cell.</value>
147147
<remarks>
148-
<format type="text/markdown"><![CDATA[
149-
150-
## Remarks
151-
This property initially contains the value of the <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A?displayProperty=nameWithType> property if it has been set for a cell.
152-
153-
154-
155-
## Examples
156-
The following code example demonstrates an event handler that uses the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs.ContextMenuStrip%2A> property to set the shortcut menu for a cell.
157-
148+
<format type="text/markdown"><![CDATA[
149+
150+
## Remarks
151+
This property initially contains the value of the <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A?displayProperty=nameWithType> property if it has been set for a cell.
152+
153+
154+
155+
## Examples
156+
The following code example demonstrates an event handler that uses the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs.ContextMenuStrip%2A> property to set the shortcut menu for a cell.
157+
158158
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/CPP/sharedrows.cpp" id="Snippet22":::
159159
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellContextMenuStripNeeded/sharedrows.cs" id="Snippet22":::
160-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/VB/sharedrows.vb" id="Snippet22":::
161-
160+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/VB/sharedrows.vb" id="Snippet22":::
161+
162162
]]></format>
163163
</remarks>
164164
<altmember cref="T:System.Windows.Forms.DataGridView" />

xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventHandler.xml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,34 @@
3737
<param name="e">A <see cref="T:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs" /> that contains the event data.</param>
3838
<summary>Represents the method that will handle a <see cref="E:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded" /> event of a <see cref="T:System.Windows.Forms.DataGridView" />.</summary>
3939
<remarks>
40-
<format type="text/markdown"><![CDATA[
41-
42-
## Remarks
43-
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event occurs only when the <xref:System.Windows.Forms.DataGridView> control <xref:System.Windows.Forms.DataGridView.DataSource%2A> property is set or its <xref:System.Windows.Forms.DataGridView.VirtualMode%2A> property is `true`.
44-
45-
When you handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event, the shortcut menu that you specify in the handler is shown whenever the user right-clicks a cell. This is useful when you want to display shortcut menus determined by the current state or value of a cell.
46-
47-
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event also occurs whenever the value of the <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A?displayProperty=nameWithType> property is retrieved, either programmatically or when the user right-clicks the cell.
48-
49-
You can use the <xref:System.Windows.Forms.DataGridViewCellEventArgs.ColumnIndex%2A> and <xref:System.Windows.Forms.DataGridViewCellEventArgs.RowIndex%2A> properties to determine the state or value of a cell, and use this information to set the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs.ContextMenuStrip%2A> property. This property is initialized with the value of the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property, which the event value overrides.
50-
51-
Handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event when working with large amounts of data to avoid the performance penalties of setting the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> value for multiple cells. For more information, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/framework/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control).
52-
53-
You can also specify shortcut menus for individual rows rather than individual cells by setting the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property or handling the <xref:System.Windows.Forms.DataGridView> control's <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event. The cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property setting overrides the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting, and the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event overrides both the <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event and the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting. You can specify `null` for a cell shortcut menu, however, to prevent a row shortcut menu from being overridden.
54-
55-
For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/).
56-
57-
When you create a <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventHandler> delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
58-
59-
60-
61-
## Examples
62-
The following code example uses <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs> to set the context menu without unsharing the row.
63-
40+
<format type="text/markdown"><![CDATA[
41+
42+
## Remarks
43+
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event occurs only when the <xref:System.Windows.Forms.DataGridView> control <xref:System.Windows.Forms.DataGridView.DataSource%2A> property is set or its <xref:System.Windows.Forms.DataGridView.VirtualMode%2A> property is `true`.
44+
45+
When you handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event, the shortcut menu that you specify in the handler is shown whenever the user right-clicks a cell. This is useful when you want to display shortcut menus determined by the current state or value of a cell.
46+
47+
The <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event also occurs whenever the value of the <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A?displayProperty=nameWithType> property is retrieved, either programmatically or when the user right-clicks the cell.
48+
49+
You can use the <xref:System.Windows.Forms.DataGridViewCellEventArgs.ColumnIndex%2A> and <xref:System.Windows.Forms.DataGridViewCellEventArgs.RowIndex%2A> properties to determine the state or value of a cell, and use this information to set the <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs.ContextMenuStrip%2A> property. This property is initialized with the value of the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property, which the event value overrides.
50+
51+
Handle the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event when working with large amounts of data to avoid the performance penalties of setting the cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> value for multiple cells. For more information, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control).
52+
53+
You can also specify shortcut menus for individual rows rather than individual cells by setting the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property or handling the <xref:System.Windows.Forms.DataGridView> control's <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event. The cell <xref:System.Windows.Forms.DataGridViewCell.ContextMenuStrip%2A> property setting overrides the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting, and the <xref:System.Windows.Forms.DataGridView.CellContextMenuStripNeeded> event overrides both the <xref:System.Windows.Forms.DataGridView.RowContextMenuStripNeeded> event and the row <xref:System.Windows.Forms.DataGridViewRow.ContextMenuStrip%2A> property setting. You can specify `null` for a cell shortcut menu, however, to prevent a row shortcut menu from being overridden.
54+
55+
For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/).
56+
57+
When you create a <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventHandler> delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
58+
59+
60+
61+
## Examples
62+
The following code example uses <xref:System.Windows.Forms.DataGridViewCellContextMenuStripNeededEventArgs> to set the context menu without unsharing the row.
63+
6464
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/CPP/sharedrows.cpp" id="Snippet20":::
6565
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellContextMenuStripNeeded/sharedrows.cs" id="Snippet20":::
66-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/VB/sharedrows.vb" id="Snippet20":::
67-
66+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataGridView_SharedRowScenarios/VB/sharedrows.vb" id="Snippet20":::
67+
6868
]]></format>
6969
</remarks>
7070
<altmember cref="T:System.Windows.Forms.DataGridView" />

0 commit comments

Comments
 (0)