diff --git a/xml/System.Windows.Forms.ComponentModel.Com2Interop/IComPropertyBrowser.xml b/xml/System.Windows.Forms.ComponentModel.Com2Interop/IComPropertyBrowser.xml index f4a942abe09..8b5b192d3c6 100644 --- a/xml/System.Windows.Forms.ComponentModel.Com2Interop/IComPropertyBrowser.xml +++ b/xml/System.Windows.Forms.ComponentModel.Com2Interop/IComPropertyBrowser.xml @@ -54,11 +54,11 @@ Occurs when the control is browsing a COM object and the user renames the object. - event. - + event. + ]]> @@ -223,11 +223,11 @@ The registry key that contains the user states. Loads user states from the registry into the control. - control states, such as the and properties, to the registry and load them the next time the user runs your application. - + control states, such as the and properties, to the registry and load them the next time the user runs your application. + ]]> @@ -265,11 +265,11 @@ The registry key that contains the user states. Saves user states from the control to the registry. - control states, such as the and properties, to the registry and load them the next time the user runs your application. - + control states, such as the and properties, to the registry and load them the next time the user runs your application. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Annotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Annotation.xml index d43beb104ec..23ecd812c19 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Annotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Annotation.xml @@ -31,7 +31,7 @@ There are two ways to use axis values when you specify the position and size of an annotation: -- Set the , or both of these annotation properties to the and property values of a object. +- Set the , or both of these annotation properties to the and property values of a object. - Use the property to anchor the annotation to a data point. In this case, its positioning is automatically calculated. @@ -358,7 +358,7 @@ property, or by setting the and properties. Its and properties must be set to . + The annotation must be anchored by either using the property, or by setting the and properties. Its and properties must be set to . ]]> @@ -410,9 +410,9 @@ ## Remarks The annotation is anchored to the X and Y values of the specified data point, and automatically uses the same axes coordinates as the data point. - To automatically position the annotation relative to the anchor point, make sure its and properties are set to . The property can be used to change the automatic position alignment of the annotation to the anchor point. The and properties may be used to add extra spacing. + To automatically position the annotation relative to the anchor point, make sure its and properties are set to . The property can be used to change the automatic position alignment of the annotation to the anchor point. The and properties may be used to add extra spacing. - When you use this property, make sure the and properties are set to Double.NaN, as they have precedence. + When you use this property, make sure the and properties are set to Double.NaN, as they have precedence. Set this value to `null` to disable annotation anchoring to a data point. @@ -495,7 +495,7 @@ or the property, and its property must be set to . + The annotation must be anchored using either the or the property, and its property must be set to . ]]> @@ -537,7 +537,7 @@ or property, and its property must be set to . + The annotation must be anchored using either the or property, and its property must be set to . ]]> @@ -585,7 +585,7 @@ ## Remarks The annotation is anchored to the X coordinate and is specified in relative chart or axes coordinates, depending on the property value. - To automatically position an annotation relative to an anchor point, make sure its property is set to . The property can be used to change the automatic position alignment of the annotation to the anchor point. The and properties may be used to add extra spacing. + To automatically position an annotation relative to an anchor point, make sure its property is set to . The property can be used to change the automatic position alignment of the annotation to the anchor point. The and properties may be used to add extra spacing. This property has a higher priority than the property. @@ -637,7 +637,7 @@ ## Remarks The annotation is anchored to the Y coordinate and is specified in relative chart or axes coordinates, depending on the property value. - To automatically position an annotation relative to an anchor point make sure its property is set to . The property can be used to change the automatic position alignment of the annotation to the anchor point. The and properties may be used to add extra spacing. + To automatically position an annotation relative to an anchor point make sure its property is set to . The property can be used to change the automatic position alignment of the annotation to the anchor point. The and properties may be used to add extra spacing. This property has a higher priority than the property. @@ -1016,7 +1016,7 @@ and . + Two colors are used to draw the gradients, and . This property does not apply to line-type annotations, image annotations and text annotations. @@ -1068,7 +1068,7 @@ and . + Two colors are used to draw the hatching, and . This property does not apply to line-type annotations, image annotations and text annotations. @@ -1124,7 +1124,7 @@ when or is used. + The secondary color is used with the when or is used. This property does not apply to line-type annotations, image annotations and text annotations. @@ -1156,7 +1156,7 @@ ## Remarks When this method is called, the end user is allowed to place an annotation using the mouse. - Placement finishes when the end user specifies all required points, or when the method is called. + Placement finishes when the end user specifies all required points, or when the method is called. ]]> @@ -1206,7 +1206,7 @@ property, or set the annotation axes using the or properties and set the property to `false`. + To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the or properties and set the property to `false`. ]]> @@ -1324,7 +1324,7 @@ method call. + This method ends an annotation placement operation previously started by a method call. Calling this method is not required, because placement will automatically end when an end user enters all required points. However, it is useful when an annotation placement operation needs to be aborted for some reason. @@ -1450,7 +1450,7 @@ Annotation width can be in relative chart coordinates or in axes coordinates. Chart relative coordinates are used by default. - To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the or properties and set the property to `false`. + To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the or properties and set the property to `false`. Set the width to to achieve automatic size calculation for annotations with text. The size will automatically be calculated based on the annotation text and font size. @@ -1529,7 +1529,7 @@ ## Remarks The height and width of an annotation may be set in relative chart or in axes coordinates. Relative chart coordinates are the default. - To express the size of an annotation in axes coordinates, set the property to `false`. Then anchor the annotation to a data point or set the and properties. + To express the size of an annotation in axes coordinates, set the property to `false`. Then anchor the annotation to a data point or set the and properties. ]]> @@ -1748,7 +1748,7 @@ property, or set the annotation axes using the and properties and set the property to `false`. + To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the and properties and set the property to `false`. ]]> @@ -2177,9 +2177,9 @@ ## Remarks The X coordinate of an annotation is specified in relative chart coordinates or in axes coordinates. Relative chart coordinates are used by default. - To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the and properties. + To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the and properties. - Set the position to to automatically calculate position when the annotation has been anchored using the property or the and properties. + Set the position to to automatically calculate position when the annotation has been anchored using the property or the and properties. ]]> @@ -2227,9 +2227,9 @@ ## Remarks The Y coordinate of an annotation is specified in relative chart coordinates or in axes coordinates. Relative chart coordinates are used by default. - To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the or properties. + To use axes coordinates, anchor an annotation to a data point using the property, or set the annotation axes using the or properties. - Set the position to to automatically calculate the position when the annotation has been anchored using the property or the and properties. + Set the position to to automatically calculate the position when the annotation has been anchored using the property or the and properties. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.xml b/xml/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.xml index 941e85119a5..57585f66131 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.xml @@ -431,7 +431,7 @@ and . + Two colors are used to draw the gradient, and . ]]> @@ -481,7 +481,7 @@ and . + Two colors are used to draw the hatching, and . ]]> @@ -535,7 +535,7 @@ when or are used. + A secondary color is used with when or are used. ]]> @@ -747,7 +747,7 @@ ## Remarks The height and width of an annotation may be set in relative chart or in axes coordinates. By default, relative chart coordinates are used. - To use axes coordinates, set the property to `false`. Then either anchor the annotation to a data point or set the or properties. + To use axes coordinates, set the property to `false`. Then either anchor the annotation to a data point or set the or properties. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.xml index df8980e1acb..c9aca41af19 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.xml @@ -16,13 +16,13 @@ Represents an arrow annotation. - @@ -77,13 +77,13 @@ Gets or sets the position alignment of the annotation to the anchor point. A enumeration value that represents the alignment of the annotation to the anchor point. - , or the and properties. - - Its and properties must be set to . - + , or the and properties. + + Its and properties must be set to . + ]]> @@ -125,13 +125,13 @@ Gets the name of the annotation type. For internal use, should not be used. A value that represents the name of the annotation type. - diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Axis.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Axis.xml index 4e5c51cb555..dc18a07d041 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Axis.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Axis.xml @@ -25,7 +25,7 @@ control, and is exposed by the , , and properties of objects. + This class encapsulates all the functionality for axes in the control, and is exposed by the , , and properties of objects. For all charts - except bar, stacked bar, pie and doughnut - the primary and secondary axes are as follows: @@ -363,7 +363,7 @@ If an axis is enabled, the axis, along with all its attributes (tick marks, strip lines, labels, and so forth), will be displayed regardless of whether or not it is being used to plot a . - If a value of is used, an axis may or may not be displayed, depending on whether it is being used to plot a . The axes that are used to plot data are determined by the and property settings. + If a value of is used, an axis may or may not be displayed, depending on whether it is being used to plot a . The axes that are used to plot data are determined by the and property settings. > [!NOTE] > If an axis is not enabled but an adjacent axis is using grid lines, one of those grid lines will be displayed in place of the axis that is not enabled. The same situation will occur if the property of an axis is set to , but the axis is not being used to plot data; the grid line of an adjacent axis will be drawn instead. @@ -451,7 +451,7 @@ ## Remarks Use this property to specify the color of interlaced strip lines that are displayed when you invoke the property. - To specify the border color of the interlaced strip lines, you must display the strips using the collection property instead of the property. + To specify the border color of the interlaced strip lines, you must display the strips using the collection property instead of the property. ]]> @@ -601,7 +601,7 @@ The property of the tick marks, labels and grid lines of an axis has priority over the property setting of the object. - A value of zero represents an "Auto" value. Also, cannot be set to not set (that is, a ). If you assign , a value of "Auto" - that is, a value of zero - will be used instead. + A value of zero represents an "Auto" value. Also, cannot be set to not set (that is, a ). If you assign , a value of "Auto" - that is, a value of zero - will be used instead. **Note** The minor grid lines and tick marks of an axis never use this property for their interval offset. @@ -713,7 +713,7 @@ The interval of the axis is determined by the property. > [!IMPORTANT] -> If the axis interval type is represented by a time such as hours, minutes, and so forth, then in order for zooming to function correctly, the must be set to a time value as well. For example, if ChartArea1.AxisX.IntervalType is set to hours, then ChartArea1.CursorX.IntervalType could be set to minutes. +> If the axis interval type is represented by a time such as hours, minutes, and so forth, then in order for zooming to function correctly, the must be set to a time value as well. For example, if ChartArea1.AxisX.IntervalType is set to hours, then ChartArea1.CursorX.IntervalType could be set to minutes. ]]> @@ -1199,7 +1199,7 @@ ## Remarks Use this property to specify the style, formatting, and so forth, of axis labels. - If the property is `true`, the font size, font angle and the use of offset labels are determined automatically. If you set any one of the LabelStyle.Font.Size, or properties, the property will be set to `false`. + If the property is `true`, the font size, font angle and the use of offset labels are determined automatically. If you set any one of the LabelStyle.Font.Size, or properties, the property will be set to `false`. Note that if a format that consists of a date without a time is used for labels, and the data point values that are used specify times, the times will affect the positions of the data points, even though they are not displayed due to the label formatting. @@ -1555,7 +1555,7 @@ method. The value must be greater than the value. + To automatically round the maximum and minimum axis values call the method. The value must be greater than the value. ]]> @@ -1632,9 +1632,9 @@ control will assume the first data point occurs at zero. Also, if the value is explicitly set, the property will be ignored. The value must be less than the value. + Note that if you set this value explicitly, the X-values of data elements must be taken into account. If all data points have X-values of zero, the control will assume the first data point occurs at zero. Also, if the value is explicitly set, the property will be ignored. The value must be less than the value. - To automatically round the maximum and minimum axis values. call the method. + To automatically round the maximum and minimum axis values. call the method. ]]> @@ -1861,7 +1861,7 @@ method to round the values of an axis. Note that the interval used for the axis will not be changed when this method is called. This method is only supported for the X and X2 axes. The Y and Y2 axes values are rounded by default. + Call the method to round the values of an axis. Note that the interval used for the axis will not be changed when this method is called. This method is only supported for the X and X2 axes. The Y and Y2 axes values are rounded by default. ]]> @@ -2178,7 +2178,7 @@ If you want more control over the positioning of an axis title, you must perform custom drawing using the or event. - You can further align and position the titles of objects by using their and TitleAngle properties. + You can further align and position the titles of objects by using their and TitleAngle properties. ]]> @@ -2226,7 +2226,7 @@ ## Remarks Gets or sets title font properties such as face or size. - To set font properties at run time, a new object must be created. Any attempt to change the properties of the current object at run time will result in a compilation error. + To set font properties at run time, a new object must be created. Any attempt to change the properties of the current object at run time will result in a compilation error. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/AxisEnabled.xml b/xml/System.Windows.Forms.DataVisualization.Charting/AxisEnabled.xml index 5c52ff5e03a..e5f1f790472 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/AxisEnabled.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/AxisEnabled.xml @@ -20,7 +20,7 @@ ## Remarks The enumeration is used with the property to enable or disable an axis. - If the property is set to Auto, an axis may or may not be displayed, depending on whether it is being used to plot a . The axes that are used to plot data for a series are determined by the and property settings. + If the property is set to Auto, an axis may or may not be displayed, depending on whether it is being used to plot a . The axes that are used to plot data for a series are determined by the and property settings. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyle.xml b/xml/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyle.xml index 523c5e1ad40..b4fcc38de80 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyle.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyle.xml @@ -27,7 +27,7 @@ ## Remarks Scale breaks are intentional discontinuities on the Y-axis that are most often used to redistribute the data points in a series on a chart. This feature improves readability when there are large differences between the high and low values of the data in one series being plotted. Scale breaks are not drawn for differences between data in multiple series. - By default, scale breaks are disabled. You can enable scale breaks on the Y-axis by setting the property to `true`. To change the amount of vertical space of the scale break, you can specify a value. This is calculated as a percentage of the Y-axis scale. + By default, scale breaks are disabled. You can enable scale breaks on the Y-axis by setting the property to `true`. To change the amount of vertical space of the scale break, you can specify a value. This is calculated as a percentage of the Y-axis scale. You must have sufficient separation between ranges of data points in a single series to draw a scale break. By default, a scale break can be added only if there is a separation between the data ranges of at least 25% of the chart. If you enable a scale break but it does not appear, even though there is sufficient distance between the data ranges, you can set the property to a value less than 25. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.xml b/xml/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.xml index bb9d116a1a4..e1c7ce4109f 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.xml @@ -30,13 +30,13 @@ Scrollbars are only shown when zooming occurs. In other words, even if a scrollbar is enabled, it will only be visible when a view is being displayed. > [!IMPORTANT] -> To fix the position of scrollbars, the plotting area position of a chart area must not be set to . To explicitly set the plotting area position, use the property. +> To fix the position of scrollbars, the plotting area position of a chart area must not be set to . To explicitly set the plotting area position, use the property. To display scrollbars when a chart is first displayed, use the class properties and methods so that a view is initially displayed to end users. The background color, button color and width of scrollbars can be set using this class. - Note that there are two main types of scrolling: large scrolling, which occurs when the end user clicks in the background of a scrollbar - that is, that part of a scrollbar not covered by the thumb; and small scrolling, which occurs when the end user clicks a left/right or up/down button. To control the large scrolling size, use the property of the object. To set the small scrolling size, use the property of the class. + Note that there are two main types of scrolling: large scrolling, which occurs when the end user clicks in the background of a scrollbar - that is, that part of a scrollbar not covered by the thumb; and small scrolling, which occurs when the end user clicks a left/right or up/down button. To control the large scrolling size, use the property of the object. To set the small scrolling size, use the property of the class. ]]> @@ -543,7 +543,7 @@ Set this property to zero to disable a scrollbar. > [!IMPORTANT] -> To fix the position of scrollbars, the plotting area position of a chart area must not be set to . To explicitly set the plotting area position, use the property. +> To fix the position of scrollbars, the plotting area position of a chart area must not be set to . To explicitly set the plotting area position, use the property. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/AxisType.xml b/xml/System.Windows.Forms.DataVisualization.Charting/AxisType.xml index c9ac77231ff..dd570bbb618 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/AxisType.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/AxisType.xml @@ -15,24 +15,24 @@ Specifies the axis type for the X and Y-axes of a . - enumeration represents the axis type used for the X and Y-axes of a . - - A is plotted using two axes, with the exception of pie and doughnut charts. This enumeration is used in conjunction with the and properties to set the axes used for plotting the associated data points of the series. - - For all charts except for bar, stacked bar, pie and doughnut types, the primary and secondary axes are as follows: - -|Axis Type|Description| -|---------------|-----------------| -|Primary X-Axis|Bottom horizontal axis.| -|Secondary X-Axis|Top horizontal axis.| -|Primary Y-Axis|Left vertical axis.| -|Secondary Y-Axis|Right vertical axis.| - - Bar and stacked bar charts have their axes rotated 90 degrees clockwise. For example, the primary X-axis for these two charts is the left-vertical axis. - + enumeration represents the axis type used for the X and Y-axes of a . + + A is plotted using two axes, with the exception of pie and doughnut charts. This enumeration is used in conjunction with the and properties to set the axes used for plotting the associated data points of the series. + + For all charts except for bar, stacked bar, pie and doughnut types, the primary and secondary axes are as follows: + +|Axis Type|Description| +|---------------|-----------------| +|Primary X-Axis|Bottom horizontal axis.| +|Secondary X-Axis|Top horizontal axis.| +|Primary Y-Axis|Left vertical axis.| +|Secondary Y-Axis|Right vertical axis.| + + Bar and stacked bar charts have their axes rotated 90 degrees clockwise. For example, the primary X-axis for these two charts is the left-vertical axis. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/BorderSkin.xml b/xml/System.Windows.Forms.DataVisualization.Charting/BorderSkin.xml index c2563f0adf5..142fee13e1c 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/BorderSkin.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/BorderSkin.xml @@ -421,7 +421,7 @@ property, when the and properties are used. + This color is combined with the primary background color, which is set with the property, when the and properties are used. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.xml index f87fb5f1e65..0dd667948a1 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.xml @@ -103,7 +103,7 @@ must be anchored using either the or the property, and its property must be set to . + The must be anchored using either the or the property, and its property must be set to . ]]> @@ -141,7 +141,7 @@ must be anchored using either the or the property, and its property must be set to . + The must be anchored using either the or the property, and its property must be set to . ]]> @@ -284,7 +284,7 @@ and properties. + Two colors are used to draw the gradient, and are set with the and properties. ]]> @@ -334,7 +334,7 @@ and properties. + Two colors are used to draw the hatching, and are set with the and properties. ]]> @@ -388,7 +388,7 @@ property when the or properties are used. + This color is used with the property when the or properties are used. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Chart.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Chart.xml index 56395128dd0..b6b00bf5215 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Chart.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Chart.xml @@ -46,7 +46,7 @@ ## Remarks This class exposes all of the properties, methods and events of the Chart Windows control. - Two important properties of the class are the and properties, both of which are collection properties. The collection property stores objects, which are used to store data that is to be displayed, along with attributes of that data. The collection property stores objects, which are primarily used to draw one or more charts using one set of axes. + Two important properties of the class are the and properties, both of which are collection properties. The collection property stores objects, which are used to store data that is to be displayed, along with attributes of that data. The collection property stores objects, which are primarily used to draw one or more charts using one set of axes. ]]> @@ -137,7 +137,7 @@ ## Remarks This method is used to align data points from different series along the X axis using their axis labels, and is applicable when: -- Multiple series are displayed and are indexed; that is, all data points have an of 0, or the property is `true`. +- Multiple series are displayed and are indexed; that is, all data points have an of 0, or the property is `true`. - All data points have non-empty axis labels, which are unique to their . If they are not unique, an exception will be thrown. @@ -208,7 +208,7 @@ ## Remarks This method is used to align data points from different series along the X axis using their axis labels, and is applicable when: -- Multiple series are displayed and are indexed; that is, all data points have an of 0, or the property is `true`. +- Multiple series are displayed and are indexed; that is, all data points have an of 0, or the property is `true`. - All data points have non-empty axis labels, which are unique to their . If they are not unique, an exception will be thrown. @@ -447,7 +447,7 @@ ## Remarks When the colors are automatically assigned at run time, there is no way to know what the colors will be prior to the time when the chart rendered; the `Color` property of an automatically assigned value will return at this time. - If you call the method, the colors for the series and the data points will be set, which allows for programmatic access. + If you call the method, the colors for the series and the data points will be set, which allows for programmatic access. ]]> @@ -560,9 +560,9 @@ object, the alpha component cannot be set to a value other than 255. This also means that, for the object only, a value cannot be used. + You can set this property to any valid ARGB (alpha, red, green, blue) value. Note that for the object, the alpha component cannot be set to a value other than 255. This also means that, for the object only, a value cannot be used. - The value will be the first color used if you are using gradient colors for the background. + The value will be the first color used if you are using gradient colors for the background. The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of 0 - no color will be assigned to the background of the title. As a result, the background will be transparent. @@ -757,7 +757,7 @@ ## Remarks This property defines a path to a background image for a legend, and can be an absolute or relative URL. - To position the image, use the and properties. + To position the image, use the and properties. You can also specify one of the colors displayed by the image as "transparent", by setting the property. @@ -952,7 +952,7 @@ If the `BackImageWrapMode` property is set to property determines the secondary background color of many objects, and is used when gradient colors are being applied. - You can set to any valid ARGB (alpha, red, green, blue) value. + You can set to any valid ARGB (alpha, red, green, blue) value. If hatching is used, the property determines the color of the hatching lines for the chart. @@ -1048,7 +1048,7 @@ If the `BackImageWrapMode` property is set to instead. + To get or set the border color, use instead. ]]> @@ -1296,7 +1296,7 @@ If the `BackImageWrapMode` property is set to instead. + To get or set of the border width, use instead. ]]> @@ -1519,7 +1519,7 @@ If the `BackImageWrapMode` property is set to control to the specified data source. - In cases where a data source is set to a chart and no other data operations are required, the method does not have to be explicitly called. In these cases, the itself will data bind to the data source prior to being rendered. + In cases where a data source is set to a chart and no other data operations are required, the method does not have to be explicitly called. In these cases, the itself will data bind to the data source prior to being rendered. ]]> @@ -1575,12 +1575,12 @@ If the `BackImageWrapMode` property is set to -- -- -- -- -- , which are the names of the custom properties. +- +- +- +- +- +- , which are the names of the custom properties. ]]> @@ -1631,12 +1631,12 @@ These data point properties are: These data point properties are: -- -- -- -- -- -- , which are the names of the custom properties +- +- +- +- +- +- , which are the names of the custom properties ]]> @@ -1809,7 +1809,7 @@ These data point properties are: ## Remarks The data points in a series can be bound to a data source at any time using the property. - To force the chart to bind to the data source, call the method. + To force the chart to bind to the data source, call the method. The following is a list of objects that you can use as the data source: @@ -2128,7 +2128,7 @@ These data point properties are: ## Remarks Call this method to determine the chart element, if any, that is located at a specified point. - This method is often used in some mouse-related event - for example, - to determine which chart element the end-user clicked. The X and Y mouse coordinates obtained from the event parameters are then used for the `x` and `y` parameter values of this method call. + This method is often used in some mouse-related event - for example, - to determine which chart element the end-user clicked. The X and Y mouse coordinates obtained from the event parameters are then used for the `x` and `y` parameter values of this method call. The properties of the object that is returned can then be used to determine which chart element was clicked; the object also provides an instance of the actual object selected, if any. @@ -2291,7 +2291,7 @@ These data point properties are: , to determine which gauge element the end-user clicked. The X and Y mouse coordinates obtained from the event parameters are then used for the X and Y parameter values of this method call. + Call this method to determine the gauge element, if any, which is located at a specified point. This method is often used in some mouse-related event, for example, , to determine which gauge element the end-user clicked. The X and Y mouse coordinates obtained from the event parameters are then used for the X and Y parameter values of this method call. The properties of the returned object can then be used to determine which chart element was clicked; the object also provides an instance of the actual object selected, if any. @@ -2341,7 +2341,7 @@ These data point properties are: ## Remarks Use this property to add objects to and remove objects from the object of the . This collection property is available at run time only. - An image - that is, an object derived from type , such as , that is created dynamically - can be stored in this collection, and then assigned at a later time to any image-related property, such as . + An image - that is, an object derived from type , such as , that is created dynamically - can be stored in this collection, and then assigned at a later time to any image-related property, such as . When you assign a object to an image-related property in the class, use the name of the object for the `string` value of the image-related property. @@ -2529,7 +2529,7 @@ These data point properties are: ## Remarks Use this method if you want to load a template from a stream, such as a memory stream, file stream, and so forth. - Make sure to set the property to `true` before saving the template with the method. + Make sure to set the property to `true` before saving the template with the method. If a loaded template has two data series, the appearance properties of the series are applied sequentially to the chart. In other words, the first template series appearance properties are assigned to the first series of the chart, the second template series appearance properties are applied to the second series of the chart, then the first template series is used again for the third series of the chart, and so on. The same holds true for chart areas, and any other collections that have appearance properties. @@ -2566,9 +2566,9 @@ These data point properties are: ## Remarks The `name` parameter must use a full path, for example, C:\MyPic.jpg. Note that you must also specify the file extension. - This method loads a template from disk that was saved using the method. + This method loads a template from disk that was saved using the method. - Make sure to set the property to `true` before saving the template with the method. + Make sure to set the property to `true` before saving the template with the method. If a loaded template has two data series, the appearance properties of the series are applied sequentially to the chart. In other words, the first template series appearance properties are assigned to the first series of the chart, the second template series appearance properties are applied to the second series of the chart, then the first template series is used again for the third series of the chart, and so on. The same holds true for chart areas, and any other collections that have appearance properties. @@ -3226,11 +3226,11 @@ Raising the event invokes the even The object contains the following methods, which are used for basic printing operations: - : Displays a Page Setup dialog, which allows the end-user to select paper size, paper source, page orientation, and so forth. + : Displays a Page Setup dialog, which allows the end-user to select paper size, paper source, page orientation, and so forth. - : Displays a Print Preview dialog, which allows the end-user to zoom, print the chart, and so forth. + : Displays a Print Preview dialog, which allows the end-user to zoom, print the chart, and so forth. - : Prints the ; the Print dialog can optionally be displayed prior to printing. + : Prints the ; the Print dialog can optionally be displayed prior to printing. ]]> @@ -3371,7 +3371,7 @@ Raising the event invokes the even ; these properties are calculated prior to the chart being rendered. "Auto" is usually represented as a value. + Several chart properties can be set to "Auto" - for example, ; these properties are calculated prior to the chart being rendered. "Auto" is usually represented as a value. Call this method to reset these properties from their calculated value to "Auto" (). diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea.xml index 547d1cffaf3..adbf3e053b3 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea.xml @@ -41,7 +41,7 @@ When you use Shape chart types, which includes pie, doughnut, funnel, pyramid, polar, and radar charts, the inner plotting position defines the size of the chart type shape. For example, when you increase the value of the property on a pie chart, you will increase the radius of the pie shape. - For all other chart types, each chart area has two sets of X- and Y-axes, primary and secondary. To access properties related to these axes, use the , , and properties. If you need to set a property that affects all axes on the chart, use the property. + For all other chart types, each chart area has two sets of X- and Y-axes, primary and secondary. To access properties related to these axes, use the , , and properties. If you need to set a property that affects all axes on the chart, use the property. One or more series are associated with a chart area. The series has a property that determines the chart area that each series belongs to. By default, the series is connected to the default chart area. To disable the display of a series, set the property of that series to a zero-length string. @@ -49,7 +49,7 @@ A 3D chart is displayed on a chart area-by-chart area basis. You can use the property to enable and customize your chart in 3D. - The chart area minimum and maximum will not be automatically recalculated if you add new data, so the chart will not automatically change axis sizes. You can require the chart area to recalculate these values by using the method. + The chart area minimum and maximum will not be automatically recalculated if you add new data, so the chart will not automatically change axis sizes. You can require the chart area to recalculate these values by using the method. To align multiple chart areas vertically, set the property. To align multiple chart areas horizontally, you must first position the chart areas using the property, and then set the property to Horizontal. @@ -89,7 +89,7 @@ Use this constructor to create and initialize a new instance of the class. > [!NOTE] -> It is highly recommended that you use one of the `Add` or `Insert` methods of the collection property to add a chart area at run time. +> It is highly recommended that you use one of the `Add` or `Insert` methods of the collection property to add a chart area at run time. ]]> @@ -160,11 +160,11 @@ , and properties, it is possible to align or synchronize two or more chart areas horizontally, vertically or both. + Through the use of the , and properties, it is possible to align or synchronize two or more chart areas horizontally, vertically or both. - First, set the property to the name of a object. This chart area will then be aligned, based on the setting, which defines the alignment to use, and the setting, which defines the elements of the chart area that should be used to set the alignment. + First, set the property to the name of a object. This chart area will then be aligned, based on the setting, which defines the alignment to use, and the setting, which defines the elements of the chart area that should be used to set the alignment. - If the property is not set, the chart area will not be aligned, regardless of the and settings. + If the property is not set, the chart area will not be aligned, regardless of the and settings. ]]> @@ -222,10 +222,10 @@ |AxesView|Chart areas are aligned using the View of the specified .| |Cursor|Chart areas are aligned on the cursor.| |None|Chart areas are not automatically aligned.| -|Position|Chart areas are aligned with the of the chart area specified.| -|InnerPlotPosition|Chart areas are aligned with the of the chart area specified.| +|Position|Chart areas are aligned with the of the chart area specified.| +|InnerPlotPosition|Chart areas are aligned with the of the chart area specified.| - If the value is not set, the property will have no effect. + If the value is not set, the property will have no effect. ]]> @@ -271,11 +271,11 @@ , and properties, it is possible to align or synchronize two or more chart areas horizontally, vertically or both. + Through the use of the , and properties, it is possible to align or synchronize two or more chart areas horizontally, vertically or both. - First, set the property to the name of a object. This chart area will then be aligned, based on the setting, which defines the alignment to use, and the setting, which defines the elements of the chart area that should be used to set the alignment. + First, set the property to the name of a object. This chart area will then be aligned, based on the setting, which defines the alignment to use, and the setting, which defines the elements of the chart area that should be used to set the alignment. - If the property is not set, the chart area will not be aligned, regardless of the and settings. + If the property is not set, the chart area will not be aligned, regardless of the and settings. ]]> @@ -383,7 +383,7 @@ ## Remarks The main purpose of this property is to provide access to the properties of the X, Y, X2 and Y2 axes at design time. - At run time, the axes for a chart area should be accessed using the individual axis properties, such as , , and so forth. + At run time, the axes for a chart area should be accessed using the individual axis properties, such as , , and so forth. If you decide to use this property at run time - for example, in an event - you can access an item in this array by specifying an enumeration member as the identifier. @@ -645,7 +645,7 @@ ## Remarks You can set this property to any valid ARGB (alpha, red, green, blue) value. - The value will be the first color used if you have specified gradient colors for the background. + The value will be the first color used if you have specified gradient colors for the background. The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of 0 - no color will be assigned to the background of the chart area. As a result, the background will be transparent. @@ -826,7 +826,7 @@ ## Remarks This property defines a path to a background image for a , and can be an absolute or relative URL. - To position the image, use the and properties. + To position the image, use the and properties. You can also specify one of the colors displayed by the image as "transparent", by setting the property. @@ -1043,7 +1043,7 @@ ## Remarks This property is one of several related properties that determine the secondary background color of objects, and is used when gradient colors are being applied. - You can set to any valid ARGB (alpha, red, green, blue) value. + You can set to any valid ARGB (alpha, red, green, blue) value. If hatching is used, the property determines the color of the hatching lines for the chart area. @@ -1378,9 +1378,9 @@ The depth of a series can be used to determine a Z value for a point that is used in a custom drawing routine. > [!NOTE] -> Any points used in custom 3D drawing must be transformed from relative 3D coordinates to relative 2D coordinates using the method. +> Any points used in custom 3D drawing must be transformed from relative 3D coordinates to relative 2D coordinates using the method. - To get relative X and Y-values from an axis, use the method for both the X and Y axes. + To get relative X and Y-values from an axis, use the method for both the X and Y axes. ]]> @@ -1417,9 +1417,9 @@ The Z position of a series is normally used for a custom drawing routine. > [!NOTE] -> Any points used in custom 3D drawing must be transformed from relative 3D coordinates to relative 2D coordinates using the method. +> Any points used in custom 3D drawing must be transformed from relative 3D coordinates to relative 2D coordinates using the method. - To get relative X and Y-values from an axis, use the method for both the X and Y axes. + To get relative X and Y-values from an axis, use the method for both the X and Y axes. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea3DStyle.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea3DStyle.xml index 5a4532155b1..60ee9bccceb 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea3DStyle.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ChartArea3DStyle.xml @@ -23,7 +23,7 @@ To enable 3D for a chart area, set the property to `true`. This causes 3D to be applied to all data series drawn in a chart area. - An isometric projection of a chart area can be displayed by setting the property to `true`, which is the default. Isometric views are not actually 3D, because the displayed angles of rotation may not match the actual angles of rotation around the vertical and horizontal axes. The actual angles are controlled using the and properties, respectively. + An isometric projection of a chart area can be displayed by setting the property to `true`, which is the default. Isometric views are not actually 3D, because the displayed angles of rotation may not match the actual angles of rotation around the vertical and horizontal axes. The actual angles are controlled using the and properties, respectively. For more information about isometric projections, see the Remarks section of the property. @@ -37,9 +37,9 @@ - Set the amount of perspective with the property. -- Control the depth of data points and the distance between data rows using the and properties, respectively. +- Control the depth of data points and the distance between data rows using the and properties, respectively. -- Rotate a chart area using the and properties. +- Rotate a chart area using the and properties. To work with coordinates of 3D points, use the class. @@ -265,7 +265,7 @@ and properties, respectively. + Isometric views are not actually 3D, because the displayed angles of rotation may not match the actual angles of rotation around the vertical and horizontal axes. The actual angles are controlled using the and properties, respectively. Note the following points concerning isometric projection: diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ChartAreaCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ChartAreaCollection.xml index bff9cc91ef2..983d085edc8 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ChartAreaCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ChartAreaCollection.xml @@ -26,7 +26,7 @@ This class is exposed as the property of the root object. - The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. + The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ChartColorPalette.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ChartColorPalette.xml index 5d81860bf1e..0a0cbc7ce04 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ChartColorPalette.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ChartColorPalette.xml @@ -22,9 +22,9 @@ If no colors are assigned to data points and their associated series, the default colors will be assigned to the data. For example: -- If is set to None, then the default palette is set to or BrightPastel. +- If is set to None, then the default palette is set to or BrightPastel. - If. is set to None, then the default palette for the chart is used (). + If. is set to None, then the default palette for the chart is used (). ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ChartElementCollection`1.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ChartElementCollection`1.xml index d5a36583ac3..08c1b263924 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ChartElementCollection`1.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ChartElementCollection`1.xml @@ -202,11 +202,11 @@ Resumes the invalidation of a chart element in the collection. - method several times, you will need to call the method an equal number of times. - + method several times, you will need to call the method an equal number of times. + ]]> @@ -256,13 +256,13 @@ Suspends the invalidation of a chart element in the collection. - method will have no effect after the method is called. - - If you call the method several times, you will need to call the method an equal number of times. - + method will have no effect after the method is called. + + If you call the method several times, you will need to call the method an equal number of times. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.xml index bada632ec74..850212dca99 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.xml @@ -44,11 +44,11 @@ > [!IMPORTANT] > The property is implemented internally by the control as the property -- Serialization of chart properties specified by the property. This is a comma-separated listing of all chart properties that are serializable. After this property is set to an explicit value, it is the responsibility of the developer to specify all properties to be saved. In other words, unlike the property, the names of chart areas and series will not be automatically persisted. The and properties can also be used in conjunction. However, make sure that is concatenated with itself when being set, otherwise the chart properties specified by the property will be overridden. +- Serialization of chart properties specified by the property. This is a comma-separated listing of all chart properties that are serializable. After this property is set to an explicit value, it is the responsibility of the developer to specify all properties to be saved. In other words, unlike the property, the names of chart areas and series will not be automatically persisted. The and properties can also be used in conjunction. However, make sure that is concatenated with itself when being set, otherwise the chart properties specified by the property will be overridden. To prohibit certain properties from being serialized, use the property. When one property is set as serializable and non-serializable, which is common when wildcards are used, the property has precedence. However, precedence also depends on how many wildcards were used when a property was specified. - By default, serializable properties are reset to their defaults before they are loaded. This behavior can be changed using the property. The method can also be used to explicitly reset chart properties to their default values. + By default, serializable properties are reset to their defaults before they are loaded. This behavior can be changed using the property. The method can also be used to explicitly reset chart properties to their default values. ]]> @@ -86,10 +86,10 @@ property. Note that the and properties can also be used along with the property. + By default, all chart properties will be serialized when any of the `Save` and `Load` methods are called. To provide more control over what is serialized, use the property. Note that the and properties can also be used along with the property. > [!IMPORTANT] - > The property determines types of chart characteristics, such as "appearance", to be serialized, and is actually implemented internally as the property. This means that setting the property and then setting the property will result in the property value being overridden, unless is concatenated. See the sample code below for an example of this procedure. + > The property determines types of chart characteristics, such as "appearance", to be serialized, and is actually implemented internally as the property. This means that setting the property and then setting the property will result in the property value being overridden, unless is concatenated. See the sample code below for an example of this procedure. If you set the property, all and objects names will automatically be serialized; this means that serialized data that pertains to chart areas and series will be applied to existing objects when loaded. @@ -289,7 +289,7 @@ When a load operation occurs, serializable properties are, by default, first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the property. - By default, all serialized chart properties will be loaded. To load specific serialized properties, set the , or properties before loading the data. + By default, all serialized chart properties will be loaded. To load specific serialized properties, set the , or properties before loading the data. Note that when data is saved using a `Save` method, only those properties that have non-default values are actually serialized. @@ -326,7 +326,7 @@ When a load operation occurs, by default the serializable properties are first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the property. - By default, all serialized chart properties will be loaded. By setting the , or properties, a specific set of properties can be loaded. + By default, all serialized chart properties will be loaded. By setting the , or properties, a specific set of properties can be loaded. If you use this definition, note that the format, which is set by the property, must be XML. @@ -363,7 +363,7 @@ When a load operation occurs, serializable properties are, by default, first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the property. - By default, all serialized chart properties will be loaded. To load specific serialized properties, set the , or properties before loading the data. + By default, all serialized chart properties will be loaded. To load specific serialized properties, set the , or properties before loading the data. Note that when data is saved using a `Save` method, only those properties that have non-default values are actually serialized. @@ -400,11 +400,11 @@ When a load operation occurs, by default serializable properties are first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the property. - By default, all serialized chart properties will be loaded. If you set the , or properties, a specific set of properties can be loaded. + By default, all serialized chart properties will be loaded. If you set the , or properties, a specific set of properties can be loaded. When you use this definition, the format must be XML; the format can be changed with the property. - When you work with XML format text files, for simplicity use the method instead. + When you work with XML format text files, for simplicity use the method instead. ]]> @@ -438,13 +438,13 @@ property to limit chart characteristics to be serialized, along with the and properties. + By default all chart properties will be serialized when the `Save` and `Load` methods are called. You can use the property to limit chart characteristics to be serialized, along with the and properties. This property determines which chart characteristics will not be serialized. Wildcards can be used in the string expression, in the same manner as the property. For example, to exclude all chart `BackColor` properties from serialization, set this property to "\*.BackColor". - Sometimes, a property can be set to be both serialized and not serialized, which is common when wildcards are used. The expression has a lower priority when compared to the expression. However, note that less weight is given to string expressions that use wildcards. For example, if the property is set to "\*.BackColor" and the property is set to , all `BackColor` properties except for objects will be serialized. + Sometimes, a property can be set to be both serialized and not serialized, which is common when wildcards are used. The expression has a lower priority when compared to the expression. However, note that less weight is given to string expressions that use wildcards. For example, if the property is set to "\*.BackColor" and the property is set to , all `BackColor` properties except for objects will be serialized. - If the property has been set, the priority depends on how many wild cards are used in the expression. For example, setting the property to will result in the property containing a "\*.Back\*" expression. If the property is set to "\*.Back\*", all `Back\*` chart properties, such as `BackColor`, `BackGradient`, and so forth, will still be serialized. This is because the property value has higher priority when compared to the property. + If the property has been set, the priority depends on how many wild cards are used in the expression. For example, setting the property to will result in the property containing a "\*.Back\*" expression. If the property is set to "\*.Back\*", all `Back\*` chart properties, such as `BackColor`, `BackGradient`, and so forth, will still be serialized. This is because the property value has higher priority when compared to the property. This property affects all save, load and reset operations. @@ -476,7 +476,7 @@ ## Remarks By default, this method resets all chart properties to their default values. - To limit the chart properties that are reset to their defaults, use the , and properties. + To limit the chart properties that are reset to their defaults, use the , and properties. Note that this method is also called automatically when a `Load` method is used and the property is set to `true`. @@ -518,13 +518,13 @@ , and properties. + By default, all chart properties with non-default values, which includes data points, will be serialized when this method is called. To control chart characteristics to be serialized, use the , and properties. If this method is used to save appearance properties as a template, make sure that the property of the object is first set to `true` before calling this method. Serialization of a chart as a template occurs differently from non-template serialization; template serialization concentrates on Appearance properties. - When a template is serialized, the method can be used to load the template, to provide the Appearance properties for a chart. + When a template is serialized, the method can be used to load the template, to provide the Appearance properties for a chart. Templates can be used to simulate custom palettes. @@ -557,7 +557,7 @@ , and properties. + By default, all chart properties with non-default values, which includes data points, will be serialized when this method is called. To control which chart characteristics are serialized, use the , and properties. When you use this definition, the format must be XML; the format can be set with the property. @@ -590,7 +590,7 @@ , and properties. + By default, all chart properties with non-default values, which includes data points, will be serialized when this method is called. To control chart characteristics to be serialized use the , and properties. By default data is saved in an XML format. To save the data in a binary format, use the property. @@ -600,7 +600,7 @@ Serialization of a chart as a template proceeds differently from non-template serialization, primarily because template serialization concentrates on Appearance properties. - When a template is serialized, the method can be used to load the template, to provide the Appearance properties for a chart. + When a template is serialized, the method can be used to load the template, to provide the Appearance properties for a chart. Templates can be used to simulate custom palettes. @@ -633,11 +633,11 @@ , and properties. + By default, all chart properties with non-default values, which includes data points, will be serialized when this method is called. To control which chart characteristics are serialized, use the , and properties. When you use this definition, the format must be XML; the format can be changed with the property. - When you work with XML format text files, for simplicity use the method instead. + When you work with XML format text files, for simplicity use the method instead. ]]> @@ -671,13 +671,13 @@ property to limit chart characteristics to be serialized, along with the and properties. + By default all chart properties will be serialized when the `Save` and `Load` methods are called. You can use the property to limit chart characteristics to be serialized, along with the and properties. The property determines which chart characteristics will be serialized. Wildcards can be used in the string expression, in the same manner as the property. For example, to serialize all chart `BackColor` properties, set this property to "*.BackColor". If and/or child properties are specified, then the names of all and objects must be also specified to enable the persisted data to be applied to existing and objects; that is, you must specify "Series.Name" and "ChartArea.Name" expressions. See the sample code below for an example of this procedure. Similarly, if multiple chart areas are being used, the property of all plotted must also be saved. - Sometimes, a property can be set to be both serialized and not serialized, which is common when wildcards are used. The expression has a lower priority when compared to the expression. However, note that less weight is given to string expressions that use wildcards. For example, if the property is set to "*.BackColor" and the property is set to , all B`ackColor` properties except for objects will be serialized. + Sometimes, a property can be set to be both serialized and not serialized, which is common when wildcards are used. The expression has a lower priority when compared to the expression. However, note that less weight is given to string expressions that use wildcards. For example, if the property is set to "*.BackColor" and the property is set to , all B`ackColor` properties except for objects will be serialized. If you set the property, the property will be set internally. If the property is already set but another property needs to be serialized, make sure to concatenate the property when specifying that extra property. See the sample code below for an example of this procedure. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Cursor.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Cursor.xml index 47d1b7410ac..17b0030d08b 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Cursor.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Cursor.xml @@ -31,7 +31,7 @@ ## Remarks A cursor is a horizontal or vertical line that defines a position along an axis. A range selection is a range along an axis that is defined by a beginning and end position, and is displayed using a semi-transparent color. - Cursors and range selections are both implemented by the class, which is exposed as the and properties of the object. The object is for the X axis of a chart area, and the object is for the Y axis. The property of these objects determines whether the associated axis is primary or secondary. + Cursors and range selections are both implemented by the class, which is exposed as the and properties of the object. The object is for the X axis of a chart area, and the object is for the Y axis. The property of these objects determines whether the associated axis is primary or secondary. The only cursor and range selection functionality found outside the class are the events related to the cursor and range selection that are in the root object. @@ -408,7 +408,7 @@ > [!NOTE] > Interval-related properties have no effect when a range selection or cursor position is set programmatically. - If the axis interval type represents a time - for example, hours, minutes, and so forth - then in order to correctly enable the zooming function, the must also be set to a time value. For example, if the ChartArea1.AxisX.IntervalType is expressed in hours, then the ChartArea1.CursorX.IntervalType could be set to minutes. + If the axis interval type represents a time - for example, hours, minutes, and so forth - then in order to correctly enable the zooming function, the must also be set to a time value. For example, if the ChartArea1.AxisX.IntervalType is expressed in hours, then the ChartArea1.CursorX.IntervalType could be set to minutes. ]]> @@ -666,11 +666,11 @@ The position is measured as a value of the axis that the cursor belongs to, which is determined by the property. For example, if the cursor belongs to the primary X axis, then setting this property to a value of January 1, 2000 will result in the X-axis cursor being drawn at the January 1, 2000 position along the axis. If this axis value does not exist, the cursor will not be displayed. - Note that if you set this property, the and properties will have no effect; that is, the cursor will be displayed at this specified location. + Note that if you set this property, the and properties will have no effect; that is, the cursor will be displayed at this specified location. Setting this property will not raise the or events. - Alternatively, the and methods can be used to set the cursor. + Alternatively, the and methods can be used to set the cursor. To programmatically remove a cursor, use this property to set the position of the cursor to . @@ -728,7 +728,7 @@ ## Remarks This property determines the color of the range selection, and can be set to any valid ARGB (alpha, red, green, blue) value. If an alpha value, which determines the level of transparency, is not provided, a default alpha value of 120 is used. - The selected color can be set for both the X and Y axis cursors, which is implemented using the and properties of the object, respectively. If a range is only selected along the X-axis, the value for the X-axis cursor is used; if a range is only selected along the Y-axis, the value for the Y-axis cursor is used. If a range is selected along both axes, the value for the Y-axis cursor is also used for the selected color. + The selected color can be set for both the X and Y axis cursors, which is implemented using the and properties of the object, respectively. If a range is only selected along the X-axis, the value for the X-axis cursor is used; if a range is only selected along the Y-axis, the value for the Y-axis cursor is used. If a range is selected along both axes, the value for the Y-axis cursor is also used for the selected color. ]]> @@ -774,11 +774,11 @@ property must also be set to `true`. In addition, a range selection can be set programmatically using either the and properties, or the or methods. + A user can select a range within a chart area by clicking on the left mouse button and then dragging the mouse. Note that the property must also be set to `true`. In addition, a range selection can be set programmatically using either the and properties, or the or methods. The end position of a range selection is calculated as a value of the axis to which the cursor belongs. For example, if the cursor belongs to the primary X-axis, and you set the property to a value of December 31, 2000, the end of the selected area will occur at December 31, 2000 along the primary X axis. - To programmatically remove a range selection, set the beginning and end points of the range to using the and properties, or use the method. + To programmatically remove a range selection, set the beginning and end points of the range to using the and properties, or use the method. ]]> @@ -824,11 +824,11 @@ property must also be set to `true`. In addition, a range selection can be set programmatically using either the and properties, or the or methods. + A user can select a range by clicking on the left mouse button and then moving the cursor position by dragging the mouse. Note that the property must also be set to `true`. In addition, a range selection can be set programmatically using either the and properties, or the or methods. The start position of a range selection is calculated as a value of the axis to which the cursor belongs. For example, if the cursor belongs to the primary X-axis, and you set the property to a value of January 1, 2000, the beginning of the selected area will occur at January 1, 2000 along the primary X axis. - To programmatically remove a range selection, set the beginning and end points of the range to using the and properties, or use the method. + To programmatically remove a range selection, set the beginning and end points of the range to using the and properties, or use the method. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.xml b/xml/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.xml index 2fb6bbef8d0..e423988bc30 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.xml @@ -132,7 +132,7 @@ - determine the type of axis - X, X2, Y or Y2 - that the event is being raised for, using the property. -- get and set axis properties, such as . +- get and set axis properties, such as . ]]> @@ -172,7 +172,7 @@ - determine which chart area the event is being raised for; this is useful to know when there are multiple chart areas within a chart image. -- get and set chart area properties, such as . +- get and set chart area properties, such as . ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabel.xml b/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabel.xml index a204792573a..b229d62a1a9 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabel.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabel.xml @@ -31,7 +31,7 @@ Only custom labels may be used for the second label row. - The and properties determine the axis range that the label applies to. + The and properties determine the axis range that the label applies to. A grid line and/or tick mark can be displayed for a custom axis label by using the property; this property specifies whether a custom grid line or tick mark will be drawn in the middle of the label range. @@ -298,9 +298,9 @@ ## Remarks The property determines the start position of the axis range the label is applied to. - The difference between the values of the and properties determines where the label text will be displayed. For example, suppose the X-axis has a scale that ranges from 1 to 5 (1, 2 ,3 , 4, 5). In order to display a custom label just underneath the second point, you would set the property to 1.5 and the property to 2.5. + The difference between the values of the and properties determines where the label text will be displayed. For example, suppose the X-axis has a scale that ranges from 1 to 5 (1, 2 ,3 , 4, 5). In order to display a custom label just underneath the second point, you would set the property to 1.5 and the property to 2.5. - If the - or , depending on the axis in question - is set to a value, then this property will be displayed as a value in the designer. + If the - or , depending on the axis in question - is set to a value, then this property will be displayed as a value in the designer. This property should not be set to the same value as the property. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabelsCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabelsCollection.xml index 0e6a7b1ec17..5beee54ccd0 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabelsCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/CustomLabelsCollection.xml @@ -22,12 +22,12 @@ class represents a collection of objects, which in turn represent the custom labels that an object can use. This class is exposed as the collection property of an object. + The class represents a collection of objects, which in turn represent the custom labels that an object can use. This class is exposed as the collection property of an object. > [!NOTE] -> You can automatically populate the entire label row of an axis with custom labels using any method definition that includes a `DateTimeIntervalType` argument. +> You can automatically populate the entire label row of an axis with custom labels using any method definition that includes a `DateTimeIntervalType` argument. - The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. + The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. ]]> @@ -75,12 +75,12 @@ method creates and initializes objects for the entire first label row of an axis with labels of the specified type. + The method creates and initializes objects for the entire first label row of an axis with labels of the specified type. The `labelsStep` parameter determines how often the custom labels will be drawn. > [!NOTE] -> The method must be called prior to calling this particular method definition. +> The method must be called prior to calling this particular method definition. ]]> @@ -121,7 +121,7 @@ If a custom label is used anywhere in the first label row, no labels are automatically generated for that first row. > [!NOTE] -> The method must be called prior to calling this particular method definition. +> The method must be called prior to calling this particular method definition. ]]> @@ -167,7 +167,7 @@ The step determines how often the custom labels will be drawn, and optional label formatting can be specified as well. > [!NOTE] -> The method must be called prior to calling this particular method definition. +> The method must be called prior to calling this particular method definition. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.xml b/xml/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.xml index d77fce03195..961d7485768 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.xml @@ -113,7 +113,7 @@ The property allows you to delete or modify both default and custom legend items in the event, and to add custom legend items. The order of legend items can also be changed. > [!NOTE] -> The and properties can be used to determine the data element that is associated with a default legend item. These properties will return zero-length strings for custom legend items, because custom items are not associated with chart data. +> The and properties can be used to determine the data element that is associated with a default legend item. These properties will return zero-length strings for custom legend items, because custom items are not associated with chart data. This property enables you to determine which the event was raised for, which enables you to customize an individual . diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/DataManipulator.xml b/xml/System.Windows.Forms.DataVisualization.Charting/DataManipulator.xml index 6db0fa9d5bc..2dbde6f06d9 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/DataManipulator.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/DataManipulator.xml @@ -1493,11 +1493,11 @@ method of the interface, perform the comparison(s) and then return `true` or `false`. The sort order is determined by the return value. + This method performs a custom sort on the data points in one or more series; the sort logic is defined by the `comparer` parameter. Override and implement the method of the interface, perform the comparison(s) and then return `true` or `false`. The sort order is determined by the return value. Note that if multiple series are sorted, the series must be aligned, otherwise an exception will be thrown. - The two object parameters of the method must always be of type . + The two object parameters of the method must always be of type . > [!IMPORTANT] > All data points, regardless of the series they belong to, are sorted based on the first series; if the position of a data point in the first series changes, all corresponding points in the other series change as well. @@ -1533,11 +1533,11 @@ method of the interface, perform the comparison(s) and then return `true` or `false`. The sort order is determined by the return value. + This method performs a custom sort on the data points in a series; the sort logic is defined by the `comparer` parameter. Override and implement the method of the interface, perform the comparison(s) and then return `true` or `false`. The sort order is determined by the return value. - The two object parameters of the method must always be of type . + The two object parameters of the method must always be of type . - To perform a custom sort for more than one series per function call, use the method. + To perform a custom sort for more than one series per function call, use the method. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/DataPoint.xml b/xml/System.Windows.Forms.DataVisualization.Charting/DataPoint.xml index a1a21c9e9ea..a3661709332 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/DataPoint.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/DataPoint.xml @@ -70,7 +70,7 @@ ## Remarks This constructor can be used to create and initialize a new instance of the class. - However, it is highly recommended that you instead add data points at run time, using the collection property. + However, it is highly recommended that you instead add data points at run time, using the collection property. ]]> @@ -100,7 +100,7 @@ ## Remarks This constructor can be used to create and initialize a new instance of the class. - However, it is highly recommended that you instead add data points at run time, using the collection property. + However, it is highly recommended that you instead add data points at run time, using the collection property. ]]> @@ -132,7 +132,7 @@ ## Remarks This constructor can be used to create and initialize a new instance of the class. - However, it is highly recommended that you instead add data points at run time, using the collection property. + However, it is highly recommended that you instead add data points at run time, using the collection property. ]]> @@ -164,7 +164,7 @@ ## Remarks This constructor can be used to create and initialize a new instance of the class. - However, it is highly recommended that you instead add data points at run time, using the collection property. + However, it is highly recommended that you instead add data points at run time, using the collection property. ]]> @@ -202,7 +202,7 @@ ## Remarks This constructor can be used to create and initialize a new instance of the class. - However, it is highly recommended that you instead add data points at run time, using the collection property. + However, it is highly recommended that you instead add data points at run time, using the collection property. ]]> @@ -231,7 +231,7 @@ method to obtain an exact copy of the data point. + Use the method to obtain an exact copy of the data point. ]]> @@ -378,7 +378,7 @@ method to set the value(s) of a data point at run time. + Use the method to set the value(s) of a data point at run time. Note that if you set the X-value to a value other than zero (0), a scatter plot will be generated. For further details, see the Remarks section of the property. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.xml index d010213e63f..037dcb324ef 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.xml @@ -26,13 +26,13 @@ This collection class is implemented as the property of a object. - objects can be appended or inserted into the collection with their X-value and Y-value(s) already specified as parameters. Note that they are also added automatically when a series is bound to a data source using either the or method. + objects can be appended or inserted into the collection with their X-value and Y-value(s) already specified as parameters. Note that they are also added automatically when a series is bound to a data source using either the or method. Data points are plotted in the order that they occur in this collection only if the series that the collection belongs to has its property set to `true` (the default value is `false`), or if all X-values for all data points are zero. Otherwise data points are plotted using their X-values. Data points can be located, and manipulated, based on maximum, minimum or specified X or Y-values using the overloaded `FindMaxValue`, `FindMinValue` or `FindValue` methods, respectively. - The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. + The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. ]]> @@ -109,9 +109,9 @@ ## Remarks This method adds object to the ; the object is always added to the end of the collection. - Use the method overload if your data points require more than one Y-value. + Use the method overload if your data points require more than one Y-value. - If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the method instead. + If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the method instead. ]]> @@ -158,7 +158,7 @@ In order for formatting to have an effect, a value must be a object. - If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the method instead + If your data points do not need an X-value - that is, if you are creating non-scatter plots - use the method instead ]]> @@ -371,9 +371,9 @@ The following .NET types can be used for the object type parameters: ## Remarks This method binds all objects in a , and uses separate data sources for the X and Y-value(s). - Note that the first available column in the data source will be used if data-binding to a table. To bind to a column other than the first column, use the method. + Note that the first available column in the data source will be used if data-binding to a table. To bind to a column other than the first column, use the method. - You can bind to multiple Y-values by providing a comma-separated list of objects for the `yValues` parameter. + You can bind to multiple Y-values by providing a comma-separated list of objects for the `yValues` parameter. If Y-values are not provided by the data source, or if the wrong number of values are provided, an exception will be thrown. @@ -389,7 +389,7 @@ The following .NET types can be used for the object type parameters: - Lists -- All other objects that use the interface. +- All other objects that use the interface. ]]> @@ -444,7 +444,7 @@ The following .NET types can be used for the object type parameters: - Lists -- All other objects that use the interface. +- All other objects that use the interface. ]]> @@ -499,9 +499,9 @@ The following .NET types can be used for the object type parameters: ## Remarks This method binds the Y-value(s) of the data points in the collection to the first column of the specified data source(s). - To bind Y-values to a data source column that is not the first available column, use the method. + To bind Y-values to a data source column that is not the first available column, use the method. - You can bind several Y-values by specifying multiple data sources, using the `yValue` parameter. Note that the first available column in each data source will be used for each data point's successive Y-values. For example, the first column of the first data source will be bound to the first Y-value of data points, the first column of the second data source will be bound to the second Y-value of data points, and so forth. + You can bind several Y-values by specifying multiple data sources, using the `yValue` parameter. Note that the first available column in each data source will be used for each data point's successive Y-values. For example, the first column of the first data source will be bound to the first Y-value of data points, the first column of the second data source will be bound to the second Y-value of data points, and so forth. If Y-values are not provided by the data source, or if the wrong number of values are provided, an exception will be thrown. @@ -517,7 +517,7 @@ The following .NET types can be used for the object type parameters: - Lists -- All other objects that use the interface. +- All other objects that use the interface. ]]> @@ -558,7 +558,7 @@ The following .NET types can be used for the object type parameters: ## Remarks This method binds the Y-values of the data points in the collection to the specified fields(s) of the data source. - To bind only to the first field in a data source, use the method. + To bind only to the first field in a data source, use the method. You can bind to several fields by setting the `yFields` parameter to multiple field names that are comma-separated. Note that the first field will be used for the data point's first Y-value, the second named field will be used for the data point's second Y-value, and so forth. @@ -574,7 +574,7 @@ The following .NET types can be used for the object type parameters: - Lists -- All other objects that use the interface. +- All other objects that use the interface. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ElementPosition.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ElementPosition.xml index dbbca974803..27509096325 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ElementPosition.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ElementPosition.xml @@ -25,9 +25,9 @@ class is used to define the position of a chart element, and represents one rectangle using the , , and properties. + The class is used to define the position of a chart element, and represents one rectangle using the , , and properties. - The class is always exposed as a `Position` property, such as , , and so forth. It is also exposed in the and events of the control as a property of the object. + The class is always exposed as a `Position` property, such as , , and so forth. It is also exposed in the and events of the control as a property of the object. The position of the applicable chart elements can be set automatically by setting the property to `true`; chart elements can also be positioned at design time in the Design View. @@ -143,7 +143,7 @@ property to . + Use this property to automatically position a chart element. For example, to position the legend automatically, set the property to . ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Grid.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Grid.xml index 5ecfeb01d85..e74558e4984 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Grid.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Grid.xml @@ -25,11 +25,11 @@ and properties of each object. + This class provides the functionality for the grids on the chart, and is exposed using the and properties of each object. - Major grid lines by default do not have their , , , and properties set. When these properties for major grid lines are not set, the control determines the appropriate values for grid lines automatically. + Major grid lines by default do not have their , , , and properties set. When these properties for major grid lines are not set, the control determines the appropriate values for grid lines automatically. - The axis and its minor grid lines by default have their , , , and properties set to **Auto** (0). If axis labels or minor grid lines are enabled and these properties are not modified, the control automatically determines how often to draw the minor grid lines. + The axis and its minor grid lines by default have their , , , and properties set to **Auto** (0). If axis labels or minor grid lines are enabled and these properties are not modified, the control automatically determines how often to draw the minor grid lines. Axis grids: @@ -151,7 +151,7 @@ The interval is measured in axis units, and determines how often an applicable chart element is drawn. For example, suppose a column chart has an X axis step of 1 (that is, 1, 2, 3, 4, and so forth); if you set the property for the X axis to 2, an axis label will be displayed for every other column. - The same holds true for all applicable chart elements. In other words, if in the previous example strip lines were being used, with an of 0.5, and their property was 2, a strip line would be displayed at 0.5, 2.5, 4.5, and so on. + The same holds true for all applicable chart elements. In other words, if in the previous example strip lines were being used, with an of 0.5, and their property was 2, a strip line would be displayed at 0.5, 2.5, 4.5, and so on. If you set a chart element `Interval` property to zero, an interval will be automatically determined by the control. @@ -201,7 +201,7 @@ The property setting defines the units of measurement of the offset. - The can be a negative value. + The can be a negative value. ]]> @@ -295,7 +295,7 @@ Interval types can be set to ; the type of interval then depends on either the X-values or Y-values of the plotted objects, depending on which axis the applicable elements belong to. - Setting the property for a value axis will only have an effect if the values of the data points are or `double` values. Also, the or property of the plotted must be set to or . + Setting the property for a value axis will only have an effect if the values of the data points are or `double` values. Also, the or property of the plotted must be set to or . Setting the property for a categorical axis will only have an effect if the property (or property, depending on the axis in question) of the plotted object is either or . diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/HitTestResult.xml b/xml/System.Windows.Forms.DataVisualization.Charting/HitTestResult.xml index 4a666b15ca3..7ab0f926168 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/HitTestResult.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/HitTestResult.xml @@ -19,7 +19,7 @@ class represents the results of a hit test, and is exposed as the return object from a method call. + The class represents the results of a hit test, and is exposed as the return object from a method call. A hit test checks a specified point in the chart to determine if a chart element is located at that point. If a chart element is detected, the class is used to obtain information about that chart element. @@ -27,7 +27,7 @@ If a data point is located, you can use the property to get the index of that data point; that is, the zero-based index of the point in the . Use the property to get the associated object for that data point. - The and properties are used to get the associated chart area and axis of the chart element - if any - returned by the hit test. Note that these properties may be `null` if the returned chart element does not have an associated chart area or axis. + The and properties are used to get the associated chart area and axis of the chart element - if any - returned by the hit test. Note that these properties may be `null` if the returned chart element does not have an associated chart area or axis. Use the property to determine the type of the chart element returned by a hit test. @@ -86,7 +86,7 @@ ## Remarks If the chart object returned by the hit test is an object that is associated with an axis - for example, a scrollbar element, tick mark, grid line or strip line - the property will reference the object with which the returned chart object is associated. Otherwise this property will be `null`. - Note that the method can be called explicitly, in which case a chart element may or may not be at the specified location. + Note that the method can be called explicitly, in which case a chart element may or may not be at the specified location. ]]> @@ -128,7 +128,7 @@ If no chart element is returned by the hit test, the value of this property will be `null`. - **Note** The method can be called explicitly, in which case a chart element may or may not be at the specified location. + **Note** The method can be called explicitly, in which case a chart element may or may not be at the specified location. ]]> @@ -207,7 +207,7 @@ If a chart element is located at the point that is checked by the hit test, this property will reference that chart element, otherwise the value of this property will be `null`. > [!NOTE] -> If a data point is returned by the hit test, this property will still return a `null`. To obtain information about the data point, use the and properties instead. +> If a data point is returned by the hit test, this property will still return a `null`. To obtain information about the data point, use the and properties instead. ]]> @@ -247,7 +247,7 @@ ## Remarks If a data point is at the location that is checked by a hit test, the property will return the zero-based index of that data point, otherwise it will return a negative one (-1). - All data points are stored in a , which is exposed as the collection property of a object; the index of the is zero-based. + All data points are stored in a , which is exposed as the collection property of a object; the index of the is zero-based. Use the property to determine the series to which the data point belongs. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/IDataPointFilter.xml b/xml/System.Windows.Forms.DataVisualization.Charting/IDataPointFilter.xml index 5ce6c9a55a8..c84f09769f1 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/IDataPointFilter.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/IDataPointFilter.xml @@ -16,17 +16,17 @@ interface exposes the method, which takes a specific data point within a series and returns a `Boolean` value that determines whether that data point will be filtered. + The interface exposes the method, which takes a specific data point within a series and returns a `Boolean` value that determines whether that data point will be filtered. To perform custom filtering: - Derive a new or existing class from this interface. -- Override the method to provide the custom filtering logic. +- Override the method to provide the custom filtering logic. - To initiate the filtering operation, call one of the `Filter` methods in the class that takes an object as its first parameter. - For sample source code, see the method. + For sample source code, see the method. ]]> @@ -69,7 +69,7 @@ Filtered points, by default, are removed from a series. They can also be displayed as empty points by setting the value of the property to `true`. - Filtered points can also be marked as filtered if they do not match filtering criteria, as determined by the value. + Filtered points can also be marked as filtered if they do not match filtering criteria, as determined by the value. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Legend.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Legend.xml index a0c58fd88ac..904b292341c 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Legend.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Legend.xml @@ -25,7 +25,7 @@ class encapsulates all the functionality of the control's legend, and is exposed using the collection property of the root object. + The class encapsulates all the functionality of the control's legend, and is exposed using the collection property of the root object. There can be any number of legends for a chart image. @@ -53,21 +53,21 @@ Legend series symbols are rectangles, dots or lines. The symbol type is set automatically by the chart and depends on the plotted chart type. - Legend text by default is automatically sized. You can disable automatic sizing of legend text by disabling the property. When this property is set to `false`, the size of the legend text is determined by the Size property of the legend . If the property is enabled, the property determines the minimum font size that a legend item can have when resizing. + Legend text by default is automatically sized. You can disable automatic sizing of legend text by disabling the property. When this property is set to `false`, the size of the legend text is determined by the Size property of the legend . If the property is enabled, the property determines the minimum font size that a legend item can have when resizing. - The property defines a limit on the number of characters that can be shown on one line before text is wrapped to another line. If you do not wish to wrap text in the legend, set the value of the property to zero. By default, when the entire legend text does not fit in the legend, the text will be truncated. You can set the on the legend to get the text to wrap instead of being truncated. + The property defines a limit on the number of characters that can be shown on one line before text is wrapped to another line. If you do not wish to wrap text in the legend, set the value of the property to zero. By default, when the entire legend text does not fit in the legend, the text will be truncated. You can set the on the legend to get the text to wrap instead of being truncated. If the contents of the legend cannot fit into the given space, legend entries are truncated. An ellipsis is shown to indicate that there are more entries than the legend has space for. To prevent the legend items from being truncated, set the position and size of the legend using the property. When setting the legend position or size, the chart can no longer automatically position the elements in the chart. In some cases, you many need to manually position other chart elements to achieve the desired appearance. Another option would be to define your own cell columns instead of using the default legend settings. - The object has a CellColumn Collection; each CellColumn object represents a column in the Legend. A cell column has and properties that can be used to adjust the size of the columns. + The object has a CellColumn Collection; each CellColumn object represents a column in the Legend. A cell column has and properties that can be used to adjust the size of the columns. - When the legend contains many entries, can be used to improve readability. When this property is set to True, it will display a back color that you can set using the property. + When the legend contains many entries, can be used to improve readability. When this property is set to True, it will display a back color that you can set using the property. - By default, the legend is positioned in the top-right corner of the chart. This position can be modified by using the and properties of the legend. The legend can also be associated with a chart area by use of the property. This property specifies the name of the chart area for which the legend should be docked. In addition, the property can be used to display the legend inside a chart area. + By default, the legend is positioned in the top-right corner of the chart. This position can be modified by using the and properties of the legend. The legend can also be associated with a chart area by use of the property. This property specifies the name of the chart area for which the legend should be docked. In addition, the property can be used to display the legend inside a chart area. - When is set to False, the property defines the maximum size, in percent, of the legend within the available chart when the legend is automatically positioned. This property should be set if you wish to adjust the width or height of the legend after the docking properties have been set. + When is set to False, the property defines the maximum size, in percent, of the legend within the available chart when the legend is automatically positioned. This property should be set if you wish to adjust the width or height of the legend after the docking properties have been set. The legend can be modified using the event. @@ -168,7 +168,7 @@ always centers the legend, either vertically or horizontally. - Setting the property will have no effect if the property is not set to . + Setting the property will have no effect if the property is not set to . ]]> @@ -259,7 +259,7 @@ ## Remarks You can set this property to any valid ARGB (alpha, red, green, blue) value. - The value will be the first color used if you have specified gradient colors for the background. + The value will be the first color used if you have specified gradient colors for the background. The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of 0 - no color will be assigned to the background of the legend. As a result, the background will be transparent. @@ -439,7 +439,7 @@ ## Remarks This property defines a path to a background image for a legend, and can be an absolute or relative URL. - To position the image, use the and properties. + To position the image, use the and properties. You can also specify one of the colors displayed by the image as "transparent", by setting the property. @@ -654,7 +654,7 @@ ## Remarks The property determines the secondary background color of many objects, and is used when gradient colors are being applied. - You can set to any valid ARGB (alpha, red, green, blue) value. + You can set to any valid ARGB (alpha, red, green, blue) value. If hatching is used, the property determines the color of the hatching lines for the legend. @@ -1029,7 +1029,7 @@ ## Remarks The can be docked to the top, left, bottom or right of either the entire chart image, or the inside or outside of a chart area. If the property is set to `false`, docking applies to the entire chart image. If the property is set to `true`, docking applies to the object specified by the property - This property has no effect if the property is not set to . + This property has no effect if the property is not set to . ]]> @@ -1451,7 +1451,7 @@ This property will only have an effect if the property is set to the name of a object. > [!NOTE] -> If the property is set to any value other than , the property also has no effect. This is because the position of the legend is determined by the property setting. +> If the property is set to any value other than , the property also has no effect. This is because the position of the legend is determined by the property setting. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/LegendCell.xml b/xml/System.Windows.Forms.DataVisualization.Charting/LegendCell.xml index 1dd9a62141d..a78b88d96f5 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/LegendCell.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/LegendCell.xml @@ -288,7 +288,7 @@ - Text: A string is specified using the property, and will be displayed in the legend cell. -- SeriesSymbol: A series symbol is defined by the property in the class. It will be displayed for the legend cell. Recall that a series symbol is a visual indicator - a line, rectangle or marker. When is set to , all marker attributes of the custom item apply to the cell. +- SeriesSymbol: A series symbol is defined by the property in the class. It will be displayed for the legend cell. Recall that a series symbol is a visual indicator - a line, rectangle or marker. When is set to , all marker attributes of the custom item apply to the cell. - Image: An image is defined using the property and will be displayed in the legend cell. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.xml b/xml/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.xml index 769d81e594f..1a168e2350b 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.xml @@ -239,7 +239,7 @@ ## Remarks This property determines the type of content that will be displayed in each individual legend cell column. There are two possible values: -- Text: By default, the #LEGENDTEXT keyword is used to place the value in each cell column. However, you can use the property to set any keyword(s) that will be replaced by a value of the corresponding series. +- Text: By default, the #LEGENDTEXT keyword is used to place the value in each cell column. However, you can use the property to set any keyword(s) that will be replaced by a value of the corresponding series. - SeriesSymbol: The legend cell will contain a series symbol, such as a rectangle, line, line with marker, or marker, of the same fill color as its corresponding series. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/LegendCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/LegendCollection.xml index 12a0969ec62..7a6c73239f4 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/LegendCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/LegendCollection.xml @@ -19,15 +19,15 @@ Represents a collection of objects. - class is implemented as the collection property of the root object. - - objects can be appended, inserted or removed from the collection at either design time or run time. - - The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. - + class is implemented as the collection property of the root object. + + objects can be appended, inserted or removed from the collection at either design time or run time. + + The property indicates the total number of items in the collection and is commonly used to find the upper bound of the collection. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/LegendItem.xml b/xml/System.Windows.Forms.DataVisualization.Charting/LegendItem.xml index e8bdcb42986..e3775584caa 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/LegendItem.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/LegendItem.xml @@ -68,7 +68,7 @@ ## Remarks Use this constructor to create and initialize a new instance of the class. - Note that you can also add custom legend items using the `Add` and `Insert` methods associated with the collection property of the object. + Note that you can also add custom legend items using the `Add` and `Insert` methods associated with the collection property of the object. ]]> @@ -339,7 +339,7 @@ This property is only implemented if the property is set to . - You can set to any valid ARGB (alpha, red, green, blue) value. + You can set to any valid ARGB (alpha, red, green, blue) value. If hatching is used, the property determines the color of the hatching lines for the legend item. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.xml index 3afbac642ab..23916224071 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.xml @@ -26,7 +26,7 @@ This collection class is exposed in two ways: -- As the object property of the object, which can be used to add, delete or modify custom legend items. The term "custom" refers to legend items that have user-defined text, symbol color, and so forth. In comparison, "default" legend items are items that are automatically inserted into the legend and represent a data series or data point. Default legend item entries for pie and doughnut charts represent the plotted data points, whereas item entries for all other chart types represent the plotted series. The property is available at both design time and run time. +- As the object property of the object, which can be used to add, delete or modify custom legend items. The term "custom" refers to legend items that have user-defined text, symbol color, and so forth. In comparison, "default" legend items are items that are automatically inserted into the legend and represent a data series or data point. Default legend item entries for pie and doughnut charts represent the plotted data points, whereas item entries for all other chart types represent the plotted series. The property is available at both design time and run time. - In the event, as the property of the parameter. The property stores both default legend items and custom legend items that have been added to the control at design time. Legend items can be modified or deleted; in addition, their order can be changed. @@ -77,7 +77,7 @@ To add a custom legend item that uses an image for its symbol, call the method. - To insert a custom into the collection, use one of the methods of this class. + To insert a custom into the collection, use one of the methods of this class. ]]> @@ -115,7 +115,7 @@ To add a custom legend item that uses a color for its symbol, call the method. - To insert a object into the collection use one of the methods of this class. + To insert a object into the collection use one of the methods of this class. ]]> @@ -161,9 +161,9 @@ ## Remarks Inserts a custom legend item into the collection at the specified location using the specified text and symbol color. - To insert a legend item that uses an image for its symbol, use the method. + To insert a legend item that uses an image for its symbol, use the method. - Use the method to append a object that uses a color for its symbol to the end if the collection. + Use the method to append a object that uses a color for its symbol to the end if the collection. ]]> @@ -200,9 +200,9 @@ ## Remarks Inserts a custom legend item into the collection at the specified location using the specified text and image for the symbol. - To insert a legend item that uses a color for its symbol, use the method. + To insert a legend item that uses a color for its symbol, use the method. - Use the method to append a object with a symbol image to the end if the collection. + Use the method to append a object with a symbol image to the end if the collection. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/LineAnchorCapStyle.xml b/xml/System.Windows.Forms.DataVisualization.Charting/LineAnchorCapStyle.xml index 5ce92b38c0a..91398eddcdf 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/LineAnchorCapStyle.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/LineAnchorCapStyle.xml @@ -15,11 +15,11 @@ Specifies the shape - that is, the anchor cap - to draw on the point end of the label callout line. - enumeration represents the shape to be drawn on the point end of the label callout line. It is used in conjunction with the and the properties. If a callout line is not used, this enumeration will have no effect. - + enumeration represents the shape to be drawn on the point end of the label callout line. It is used in conjunction with the and the properties. If a callout line is not used, this enumeration will have no effect. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.xml index 3b89f54cd57..265eaadf5b1 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.xml @@ -102,7 +102,7 @@ , or the and properties. Its and properties must be set to . + The annotation must be anchored using either , or the and properties. Its and properties must be set to . ]]> @@ -500,7 +500,7 @@ property to `false`. Then anchor the annotation to a data point or set the or properties. + The width and height of an annotation may be set in relative chart or in axes coordinates. By default, relative chart coordinates are used. To use axes coordinates for the annotation size, set the property to `false`. Then anchor the annotation to a data point or set the or properties. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/NamedImage.xml b/xml/System.Windows.Forms.DataVisualization.Charting/NamedImage.xml index 7d47ae0fb90..e6c4008eef0 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/NamedImage.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/NamedImage.xml @@ -29,7 +29,7 @@ The property determines the unique name of a object. The property determines its associated image, which can be any object derived from the .NET Framework class. - When one of the image properties of the control is set by specifying a `string` value, the collection property is first checked to determine whether an image with the specified name exists. If a matching object is found, this image is used. If a matching object is not located, the `string` value is treated as a URL, image resource name, or an image path. + When one of the image properties of the control is set by specifying a `string` value, the collection property is first checked to determine whether an image with the specified name exists. If a matching object is found, this image is used. If a matching object is not located, the `string` value is treated as a URL, image resource name, or an image path. ]]> @@ -195,7 +195,7 @@ This property value is used when you set a chart image property to a object. - When one of the image properties of the control is set by specifying a `string` value, the collection property - of type - is first checked to determine whether an image with the specified name exists. If a matching object is found, this image is used. If a matching object is not located, the `string` value is treated as a URL, an image resource name, or an image path. + When one of the image properties of the control is set by specifying a `string` value, the collection property - of type - is first checked to determine whether an image with the specified name exists. If a matching object is found, this image is used. If a matching object is not located, the `string` value is treated as a URL, an image resource name, or an image path. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/NamedImagesCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/NamedImagesCollection.xml index b0fe603c8fc..af5fbb9eb3a 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/NamedImagesCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/NamedImagesCollection.xml @@ -19,17 +19,17 @@ Represents a collection of objects. - class represents a collection of objects, which are objects that have an associated image and a name that is unique to the collection. - - This class is exposed as the collection property of the root object, and is only available at run time. - - An image can be any object derived from the .NET Framework class, such as , which is created dynamically. The image can be stored in this collection, and then assigned at a later time to any image property in the control, such as . - - When one of the image properties in the control is set by specifying a `string` value, the collection property, of type , is first checked to see if an image with that name exists. If a matching object is found, this image is used. If a matching object is not located, the string expression is treated as a URL, image resource name or pathname. - + class represents a collection of objects, which are objects that have an associated image and a name that is unique to the collection. + + This class is exposed as the collection property of the root object, and is only available at run time. + + An image can be any object derived from the .NET Framework class, such as , which is created dynamically. The image can be stored in this collection, and then assigned at a later time to any image property in the control, such as . + + When one of the image properties in the control is set by specifying a `string` value, the collection property, of type , is first checked to see if an image with that name exists. If a matching object is found, this image is used. If a matching object is not located, the string expression is treated as a URL, image resource name or pathname. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Point3D.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Point3D.xml index 8a53e289a17..40332ba892c 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Point3D.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Point3D.xml @@ -19,7 +19,7 @@ method. By calling , the X and Y-values of the objects are changed so that they reflect the 3-dimensional space. The new X and Y points can then be used for GDI+ method calls - the Z value is then disregarded - after being changed to absolute pixel coordinates using the method. + Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from relative X, Y and Z (3D) coordinates into relative X and Y (2D) coordinates using the method. By calling , the X and Y-values of the objects are changed so that they reflect the 3-dimensional space. The new X and Y points can then be used for GDI+ method calls - the Z value is then disregarded - after being changed to absolute pixel coordinates using the method. Note that the Z coordinate may be less than zero (located behind a chart area) or greater than 100 (located in front of a chart area). @@ -116,9 +116,9 @@ method. This method takes an array of objects as its only parameter. By calling , the X and Y property values are changed to reflect the 3-dimensional space. + Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z (3D) coordinates into X and Y (2D) coordinates using the method. This method takes an array of objects as its only parameter. By calling , the X and Y property values are changed to reflect the 3-dimensional space. - These new X and Y coordinates are then converted to absolute coordinates, by using a method such as the method. After converting the coordinates, the property of each Point3D object can be used for any GDI+ method that take a object as a parameter. + These new X and Y coordinates are then converted to absolute coordinates, by using a method such as the method. After converting the coordinates, the property of each Point3D object can be used for any GDI+ method that take a object as a parameter. ]]> @@ -156,11 +156,11 @@ method. This method takes an array of Point3D objects as its only parameter. By calling the method, the X and Y property values are changed to reflect the 3-dimensional space. + Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z (3D) coordinates into X and Y (2D) coordinates using the method. This method takes an array of Point3D objects as its only parameter. By calling the method, the X and Y property values are changed to reflect the 3-dimensional space. - These new X and Y coordinates are then converted to absolute coordinates using the method. They are then used for GDI+ method calls. + These new X and Y coordinates are then converted to absolute coordinates using the method. They are then used for GDI+ method calls. - A relative X coordinate can be obtained from an axis value by calling the method. + A relative X coordinate can be obtained from an axis value by calling the method. ]]> @@ -198,11 +198,11 @@ method. This method takes an array of Point3D objects as its only parameter. By calling the method, the X and Y property values are changed to reflect the 3-dimensional space. + Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z (3D) coordinates into X and Y (2D) coordinates using the method. This method takes an array of Point3D objects as its only parameter. By calling the method, the X and Y property values are changed to reflect the 3-dimensional space. - These new X and Y coordinates are then converted to absolute coordinates by using the method. They are then used for GDI+ method calls. + These new X and Y coordinates are then converted to absolute coordinates by using the method. They are then used for GDI+ method calls. - A relative Y coordinate can be obtained from an axis value using the method. + A relative Y coordinate can be obtained from an axis value using the method. ]]> @@ -252,11 +252,11 @@ **Note** This Z property may be less than zero (located behind a chart area) or greater than 100 (located in front of a chart area). - Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z (3D) coordinates into X and Y (2D) coordinates using the method. This method takes an array of Point3D objects as its only parameter. By calling the method, the X and Y property values are changed to reflect the 3-dimensional space. + Any point used in custom 3D drawing - which is accomplished using GDI+ - must be transformed from X, Y and Z (3D) coordinates into X and Y (2D) coordinates using the method. This method takes an array of Point3D objects as its only parameter. By calling the method, the X and Y property values are changed to reflect the 3-dimensional space. - These new X and Y coordinates are then converted to absolute coordinates by using the method. They are then used for GDI+ method calls. + These new X and Y coordinates are then converted to absolute coordinates by using the method. They are then used for GDI+ method calls. - Relative Z coordinates can be obtained for series by using the and methods. + Relative Z coordinates can be obtained for series by using the and methods. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.xml index f80c138cb54..84d8adaa9be 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.xml @@ -276,7 +276,7 @@ property, when the and properties are used. + This secondary color is used with a primary color, defined with the property, when the and properties are used. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.xml index a9aae078dba..860334a1a17 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.xml @@ -391,7 +391,7 @@ method call. + This method ends an annotation placement operation previously started by a method call. You are not required to call this method, because placement will automatically end when an end user enters all required points. However, it is useful when an annotation placement operation needs to be aborted for some reason. @@ -620,7 +620,7 @@ method is called. Set the property to `true` to switch from the default mode to free-draw mode, which allows the user to free draw while moving the mouse cursor. + Two different placement modes are supported when the method is called. Set the property to `true` to switch from the default mode to free-draw mode, which allows the user to free draw while moving the mouse cursor. To allow the user to free draw the annotation, you must also set the property to `true`. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.xml index 5e561af9b79..8573388dda6 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.xml @@ -179,7 +179,7 @@ and a secondary color that is specified with the . + Two colors are used to draw the gradient, a primary color that is specified the and a secondary color that is specified with the . ]]> @@ -283,7 +283,7 @@ when the or property is used. + This color is used with when the or property is used. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.xml index b436d284f7a..561de704ba8 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.xml @@ -106,7 +106,7 @@ - determine the type of axis - X, X2, Y or Y2 - that the event is being raised for, using the property. -- get and set axis properties, such as . +- get and set axis properties, such as . ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Series.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Series.xml index d995dc66ef9..d5403e7a5dd 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Series.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Series.xml @@ -96,7 +96,7 @@ > [!NOTE] > This series is only capable of storing objects that have one Y-value. If a data point that has multiple Y-values is added to this series, an exception will be thrown. - To create a series at run time, use the method. + To create a series at run time, use the method. ]]> @@ -398,7 +398,7 @@ Certain properties are only applicable for specific chart types. For example, the property does not apply to line charts but does apply to an area chart. - To display an image that indicates an empty point, use the and properties, and not the property. + To display an image that indicates an empty point, use the and properties, and not the property. The property determines the axis label for empty points. Note that for stacked chart types, the axis label is determined by the property of the first plotted series that has this property set. @@ -699,7 +699,7 @@ This property has precedence over the property of the root object, with respect to the display of data. - NOTE: If the `Palette` property for both the and objects is set to None, and no color is assigned to the relevant data series/data points, the default palette "BrightPastel" or is used. + NOTE: If the `Palette` property for both the and objects is set to None, and no color is assigned to the relevant data series/data points, the default palette "BrightPastel" or is used. ]]> @@ -749,7 +749,7 @@ collection property allows you to add and remove data points to a series. This property also provides methods and properties that can be used to manipulate this collection, such as finding data points, performing data-binding, and so forth. + The collection property allows you to add and remove data points to a series. This property also provides methods and properties that can be used to manipulate this collection, such as finding data points, performing data-binding, and so forth. ]]> @@ -1099,7 +1099,7 @@ ## Remarks The property determines the type of data stored by the series. - Set this property to to allow the X-value to be entered as a value, and not as a . Date and time values are internally stored by .NET Framework as values. The same holds true for the and properties of objects. + Set this property to to allow the X-value to be entered as a value, and not as a . Date and time values are internally stored by .NET Framework as values. The same holds true for the and properties of objects. The `IntervalType` property found in axis label, tick mark, and grid classes determines the interval type. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/SeriesCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/SeriesCollection.xml index 2c3a5e9afbf..29f5e84d4c2 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/SeriesCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/SeriesCollection.xml @@ -19,15 +19,15 @@ Represents a collection of objects. - class represents a collection of objects, which in turn represent a grouping of related data points and attributes for the series. This collection class is implemented as the collection property of the root object. - - Series objects can be appended, inserted or removed from the collection at both design time and run time. - - When a series is added to the collection, it is automatically assigned to the object named "Default" or, if "Default" does not exist, to the first available chart area in the chart area collection. - + class represents a collection of objects, which in turn represent a grouping of related data points and attributes for the series. This collection class is implemented as the collection property of the root object. + + Series objects can be appended, inserted or removed from the collection at both design time and run time. + + When a series is added to the collection, it is automatically assigned to the object named "Default" or, if "Default" does not exist, to the first available chart area in the chart area collection. + ]]> @@ -55,15 +55,15 @@ Adds a object to the end of the collection. The new object appended to the collection. - objects to the class, the associated objects of the newly added object cannot have more than one Y-value per data point. - + objects to the class, the associated objects of the newly added object cannot have more than one Y-value per data point. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.xml b/xml/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.xml index c7e314f44e2..73fa73c7357 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.xml @@ -31,15 +31,15 @@ ## Remarks When smart labels are enabled, the chart repositions overlapping data point labels, based on a set of user-defined rules. - Callout lines will be drawn to link the label with its data point. The visual attributes of the callout line can be controlled. These visual attributes include color, line style, and line width. The and properties control the embellishments, such as arrowheads, that appear at the end of the callout line. + Callout lines will be drawn to link the label with its data point. The visual attributes of the callout line can be controlled. These visual attributes include color, line style, and line width. The and properties control the embellishments, such as arrowheads, that appear at the end of the callout line. - The property can be set to any object. If you set the color of the callout line, you will also automatically set the color of the and the embellishment defined by the . + The property can be set to any object. If you set the color of the callout line, you will also automatically set the color of the and the embellishment defined by the . - The property controls the pixel width of the callout line. Use of this property will also scale the embellishments of the and the . + The property controls the pixel width of the callout line. Use of this property will also scale the embellishments of the and the . - The movement of smart labels can be controlled through the use of several motion-related properties. These define the rules of movement for the direction, distance and whether the data point label is allowed to leave the plotting area. The default movement rules will normally resolve most issues. The defines a value that specifies the maximum distance in pixels from the data point that data point labels are allowed to be moved in case of overlapping. The property defines a value that specifies the minimum distance in pixels from the data point that data point labels will be moved in case of overlapping. When a data point label needs to be repositioned, the label will be moved by at least the number of pixels specified. + The movement of smart labels can be controlled through the use of several motion-related properties. These define the rules of movement for the direction, distance and whether the data point label is allowed to leave the plotting area. The default movement rules will normally resolve most issues. The defines a value that specifies the maximum distance in pixels from the data point that data point labels are allowed to be moved in case of overlapping. The property defines a value that specifies the minimum distance in pixels from the data point that data point labels will be moved in case of overlapping. When a data point label needs to be repositioned, the label will be moved by at least the number of pixels specified. - The property indicates whether the labels are hidden when overlapping issues cannot be resolved. If the property is `true`, and the data point cannot be drawn within the area specified by and in the directions allowed by , the data point label will not be drawn. + The property indicates whether the labels are hidden when overlapping issues cannot be resolved. If the property is `true`, and the data point cannot be drawn within the area specified by and in the directions allowed by , the data point label will not be drawn. The property defines the direction(s) in which the data point label can be moved. This property accepts one value or a bitwise-OR of multiple values. The default is the bitwise-OR of all values, to allow repositioning in all possible directions except to the center of the data point. @@ -463,7 +463,7 @@ and , in the directions allowed by the , property, and this property is `true`, the data point label will not be drawn. + If the point cannot be drawn within the area specified by the properties and , in the directions allowed by the , property, and this property is `true`, the data point label will not be drawn. > [!NOTE] > Smart labels only work when the property is set to zero. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.xml b/xml/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.xml index f9573506b45..57c190d1e1e 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.xml @@ -16,11 +16,11 @@ Calculates statistical formulas. - @@ -50,15 +50,15 @@ Performs an ANOVA test to determine whether there is a statistically significant difference between the mean values of two or more groups of data. An object. - at the time of the method call, an exception will be thrown. - + at the time of the method call, an exception will be thrown. + ]]> @@ -88,11 +88,11 @@ Returns the beta function value for two given values. A value that represents the beta function for the two given values. - @@ -122,15 +122,15 @@ Returns the correlation value for two data series. A value that represents the correlation between two data series. - method returns the covariance of two data sets divided by the product of their standard deviations, and always ranges from -1 to 1. - - Use correlation to determine whether two ranges of data move together; that is, whether large values of one set are associated with large values of the other (positive correlation), whether small values of one set are associated with large values of the other (negative correlation), or whether values in both sets are unrelated (correlation near zero). - - If a specified input series does not exist in the series collection at the time of the method call, an exception will be thrown. An exception will also be raised if the specified series do not have the same number of data points. - + method returns the covariance of two data sets divided by the product of their standard deviations, and always ranges from -1 to 1. + + Use correlation to determine whether two ranges of data move together; that is, whether large values of one set are associated with large values of the other (positive correlation), whether small values of one set are associated with large values of the other (negative correlation), or whether values in both sets are unrelated (correlation near zero). + + If a specified input series does not exist in the series collection at the time of the method call, an exception will be thrown. An exception will also be raised if the specified series do not have the same number of data points. + ]]> @@ -272,15 +272,15 @@ Returns the inverse of the F cumulative distribution. A value from the inverse F distribution function. - Condition: Cannot continue calculation using specified parameter values because of limitation. @@ -309,13 +309,13 @@ Returns the inverse of the standard normal cumulative distribution. A value from the inverse standard normal cumulative distribution function. - @@ -345,11 +345,11 @@ Returns the inverse t-value of the Students t-distribution as a function of probability and degree of freedom. A value that represents the inverse T distribution. - @@ -377,13 +377,13 @@ Returns the average of all data points stored in the specified series. A value that represents the average of all data points. - at the time of the method call, an exception will be thrown. - + at the time of the method call, an exception will be thrown. + ]]> @@ -411,15 +411,15 @@ Returns the median of all data points in the specified series. A value that represents the median. - at the time of the method call, an exception will be thrown. - + at the time of the method call, an exception will be thrown. + ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/StripLine.xml b/xml/System.Windows.Forms.DataVisualization.Charting/StripLine.xml index e8b2d34f47f..9d38997fdd6 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/StripLine.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/StripLine.xml @@ -37,11 +37,11 @@ - Add a threshold line at a specific constant value. - A single object can either be drawn once, or repeatedly, for a given interval. This action is controlled by the property. When a value of zero is assigned to the property, one strip line will be drawn. When a non-zero value is assigned to the property, a strip line will be drawn repeatedly at each given interval. The location where a strip line is drawn is also affected by the and properties of the strip line. + A single object can either be drawn once, or repeatedly, for a given interval. This action is controlled by the property. When a value of zero is assigned to the property, one strip line will be drawn. When a non-zero value is assigned to the property, a strip line will be drawn repeatedly at each given interval. The location where a strip line is drawn is also affected by the and properties of the strip line. Strip lines are always associated with an object. They can be added at both design time and run time. - To add a horizontal or vertical line to display a threshold, set the property to a value of 0.0. This will result in a line being drawn. You can use the , and properties for the color, width and style of the line. No chart background properties (`Back*`) are used when the property is set to 0.0. + To add a horizontal or vertical line to display a threshold, set the property to a value of 0.0. This will result in a line being drawn. You can use the , and properties for the color, width and style of the line. No chart background properties (`Back*`) are used when the property is set to 0.0. Use the property of the strip line to associate text with a strip line. The placement and orientation of this text can be controlled by the property. @@ -120,7 +120,7 @@ ## Remarks You can set this property to any valid ARGB (alpha, red, green, blue) value. - To set a gradient for the strip line, set the and properties. + To set a gradient for the strip line, set the and properties. If you set this color to "transparent" - in other words, set the alpha value to 0 - no color will be assigned to the background of the element. As a result, the background will be transparent. @@ -234,7 +234,7 @@ and properties. This property is not applicable if the property is set to a value of 0.0. + The hatch pattern consists of a solid background color and lines drawn over the background. The two colors used in the hatch style are set by the and properties. This property is not applicable if the property is set to a value of 0.0. ]]> @@ -290,7 +290,7 @@ ## Remarks The property defines a path to a background image for many chart elements, and is an absolute or relative URL. - To position this image, use the and properties. + To position this image, use the and properties. You can also specify that one color will be displayed by the image as "transparent" by setting the property. @@ -458,7 +458,7 @@ If the property is set to , the location where the image is drawn will be determined by the property setting. - This property is not applicable if is set to a value of 0.0. + This property is not applicable if is set to a value of 0.0. ]]> @@ -834,7 +834,7 @@ property to a value of zero, one strip line will be displayed, with a width specified by the property. When you set to a value of other than zero, multiple strip lines will be shown. The unit that is used for the property is defined by the property. + When you set the property to a value of zero, one strip line will be displayed, with a width specified by the property. When you set to a value of other than zero, multiple strip lines will be shown. The unit that is used for the property is defined by the property. ]]> @@ -884,7 +884,7 @@ The property setting defines the units of measurement of the offset. - The can be a negative value. + The can be a negative value. The default value is `Auto` (`0`). @@ -1063,9 +1063,9 @@ ## Remarks This property cannot be set to a value less than zero, otherwise an exception will be raised. - A setting of 0.0 will result in a line being drawn; this line will use the , and property settings for its color, width and style. None of the `Back*` properties in this class are utilized when the value of is 0.0. + A setting of 0.0 will result in a line being drawn; this line will use the , and property settings for its color, width and style. None of the `Back*` properties in this class are utilized when the value of is 0.0. - If you set the property to a value greater than zero, a strip will be created. The , and properties only apply to the border of the strip; all of the `Back*` properties are then used for the background properties of the strip. + If you set the property to a value greater than zero, a strip will be created. The , and properties only apply to the border of the strip; all of the `Back*` properties are then used for the background properties of the strip. If the value of the property is greater than 0.0, the units are determined by the relevant axis scale. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.xml b/xml/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.xml index 9f6eac75df9..9f2d2935c63 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.xml @@ -320,7 +320,7 @@ ## Remarks After calling this method, the annotation displays an editing box that allows the user to edit the annotation text. - Call the method to cancel this mode programmatically. Note that editing also ends when the end-user hits the Enter key if the value of the property is `false`, or when the end-user clicks outside the editing box if the value is `true`. + Call the method to cancel this mode programmatically. Note that editing also ends when the end-user hits the Enter key if the value of the property is `false`, or when the end-user clicks outside the editing box if the value is `true`. ]]> @@ -348,7 +348,7 @@ method call. You are not required to call this method, because placement will automatically end when an end-user enters all required points. However, it is useful when an annotation placement operation needs to be aborted for some reason. + Ends an annotation placement operation previously started by a method call. You are not required to call this method, because placement will automatically end when an end-user enters all required points. However, it is useful when an annotation placement operation needs to be aborted for some reason. ]]> @@ -568,9 +568,9 @@ method. + Call this method to cancel a text editing operation that was started with a call to the method. - Note that if the end user double-clicks the annotation, the method will be automatically called. + Note that if the end user double-clicks the annotation, the method will be automatically called. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/TickMark.xml b/xml/System.Windows.Forms.DataVisualization.Charting/TickMark.xml index db7b0c47782..e1adae70fbc 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/TickMark.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/TickMark.xml @@ -27,11 +27,11 @@ ## Remarks The class encapsulates the functionality for all chart tick marks. - The class is exposed as the and properties of objects. + The class is exposed as the and properties of objects. By default, major tick marks are displayed at the major grid lines, whereas minor tick marks must be explicitly displayed. - MajorTickMark.Interval is not set (`Double.NaN`) by default, and the tick marks are drawn according to . MinorTickMark.Interval is set to `Auto` (`0`) by default, and the Chart control automatically determines the interval. + MajorTickMark.Interval is not set (`Double.NaN`) by default, and the tick marks are drawn according to . MinorTickMark.Interval is set to `Auto` (`0`) by default, and the Chart control automatically determines the interval. A developer can use this class to: diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/Title.xml b/xml/System.Windows.Forms.DataVisualization.Charting/Title.xml index 3a62d77ed29..c2789e0484e 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/Title.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/Title.xml @@ -23,7 +23,7 @@ class encapsulates all the functionality of a title for the control. This class is exposed using the collection property of the root object. + The class encapsulates all the functionality of a title for the control. This class is exposed using the collection property of the root object. There can be any number of titles for an entire chart image. @@ -180,7 +180,7 @@ property has no effect on alignment if the property is not set to . + The property has no effect on alignment if the property is not set to . ]]> @@ -240,7 +240,7 @@ ## Remarks You can set this property to any valid ARGB (alpha, red, green, blue) value. - The value will be the first color used if you have specified gradient colors for the background. + The value will be the first color used if you have specified gradient colors for the background. The alpha value controls the opacity of a color. If you set this color to "transparent" - that is, if you use an alpha value of 0 - no color will be assigned to the background of the title. As a result, the background will be transparent. @@ -420,7 +420,7 @@ ## Remarks This property defines a path to a background image for a title, and can be an absolute or relative URL. - To position the image, use the and properties. + To position the image, use the and properties. You can also specify one of the colors displayed by the image as "transparent", by setting the property. @@ -642,7 +642,7 @@ ## Remarks This property is one of several related properties that determine the secondary background color of objects, and is used when gradient colors are being applied. - You can set to any valid ARGB (alpha, red, green, blue) value. + You can set to any valid ARGB (alpha, red, green, blue) value. If hatching is used, the property determines the color of the hatching lines for the title. @@ -913,7 +913,7 @@ ## Remarks The can be docked to the top, left, bottom or right of either the entire chart image, or the inside or outside of a chart area. If the property is set to `false`, docking applies to the entire chart image. If the property is set to `true`, docking applies to the object specified by the property - This property has no effect if the property is not set to . + This property has no effect if the property is not set to . ]]> @@ -1105,7 +1105,7 @@ ## Remarks If the property is set to `false`, the title is docked to the outside edge of the plotted chart areas; if this property is set to `true`, the title will be docked to the inside edge of the chart area. This property will have no effect if the name of a object is not assigned to the property. - **Note** This behavior only applies if the property is set to . If this is not the case, setting the property has no effect, because the position of the title is then determined by the property value. + **Note** This behavior only applies if the property is set to . If this is not the case, setting the property has no effect, because the position of the title is then determined by the property value. ]]> @@ -1193,9 +1193,9 @@ property is automatic (that is, Title.Position.Auto = `true`) the title position is calculated automatically by the control, taking into account the , and property settings. + If the property is automatic (that is, Title.Position.Auto = `true`) the title position is calculated automatically by the control, taking into account the , and property settings. - If it is not automatic, the , and properties are ignored, and the title position is solely determined by the value of the returned object. + If it is not automatic, the , and properties are ignored, and the title position is solely determined by the value of the returned object. ]]> diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/TitleCollection.xml b/xml/System.Windows.Forms.DataVisualization.Charting/TitleCollection.xml index b35f2801163..d4a932b8846 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/TitleCollection.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/TitleCollection.xml @@ -19,13 +19,13 @@ Represents a collection of objects. - class is implemented as the collection property of the root object. - - objects can be appended, inserted or removed from the collection at design time and run time. - + class is implemented as the collection property of the root object. + + objects can be appended, inserted or removed from the collection at design time and run time. + ]]> @@ -53,11 +53,11 @@ Adds a object with the specified name to the end of the collection. Index of the added object. - diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.xml index 04c02326170..3f3284f7280 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.xml @@ -25,7 +25,7 @@ The class contains the following properties: -- The and properties, which are used to get the mouse coordinates. +- The and properties, which are used to get the mouse coordinates. - The property, which is used to get the tooltip for the chart element that the event is raised for. Note that many of the chart elements have a `ToolTip`, `LegendToolTip`, and/or `LabelToolTip` property that you can use to assign a tooltip. These elements include legends, annotations, data points, series, axes, titles, custom labels, and strip lines. This property can also be used to override the tooltip for a chart element, or to set a tooltip for a chart element that doesn't have a `ToolTip` property. diff --git a/xml/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.xml b/xml/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.xml index c712456b302..26a6c4a79de 100644 --- a/xml/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.xml +++ b/xml/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.xml @@ -132,7 +132,7 @@ - Determine the type of axis - X, X2, Y or Y2 - that the event is being raised for, using the property. -- Get and set axis properties, such as . +- Get and set axis properties, such as . ]]> @@ -204,7 +204,7 @@ The property can be set to a new value in the event, but cannot be set to a new value for the event because in this case the view is already created. - The is always measured as an axis value. + The is always measured as an axis value. ]]> diff --git a/xml/System.Windows.Forms.Design.Behavior/Adorner.xml b/xml/System.Windows.Forms.Design.Behavior/Adorner.xml index 57a253ddd83..70e145023df 100644 --- a/xml/System.Windows.Forms.Design.Behavior/Adorner.xml +++ b/xml/System.Windows.Forms.Design.Behavior/Adorner.xml @@ -100,7 +100,7 @@ constructor creates a new and is enabled, by default. + The constructor creates a new and is enabled, by default. diff --git a/xml/System.Windows.Forms.Design.Behavior/Behavior.xml b/xml/System.Windows.Forms.Design.Behavior/Behavior.xml index e85d6830950..7d0cecc3952 100644 --- a/xml/System.Windows.Forms.Design.Behavior/Behavior.xml +++ b/xml/System.Windows.Forms.Design.Behavior/Behavior.xml @@ -256,12 +256,12 @@ ## Remarks A `true` value for the property indicates to the that all objects the designer receives should have their state disabled when this behavior is active. - The property works in conjunction with the method so you can customize the interaction between glyphs and behaviors. The following table summarizes the results of a call to for a particular . + The property works in conjunction with the method so you can customize the interaction between glyphs and behaviors. The following table summarizes the results of a call to for a particular . | Hit-tested glyph has an assigned behavior | is `true`| is `false`| | - | - | - | -| Yes | If the with the specified `command ID` is found in the , that is disabled and returned. Otherwise, `null` is returned. | is called on the behavior and, if found, the behavior's is returned. Otherwise, the result of with the specified `command ID` is returned. | -| No | The result of with the specified `command ID` is returned. | The result of with the specified `command ID` is returned. | +| Yes | If the with the specified `command ID` is found in the , that is disabled and returned. Otherwise, `null` is returned. | is called on the behavior and, if found, the behavior's is returned. Otherwise, the result of with the specified `command ID` is returned. | +| No | The result of with the specified `command ID` is returned. | The result of with the specified `command ID` is returned. | ]]> @@ -315,7 +315,7 @@ method is called from the . It provides an opportunity for the to return its own custom , thereby intercepting this message. + The method is called from the . It provides an opportunity for the to return its own custom , thereby intercepting this message. ]]> @@ -637,7 +637,7 @@ method. If it does so, it will be notified through the method when capture is lost. Generally the behavior removes itself from the stack at this time. Capture is lost when one of the following actions occurs: + A behavior can request mouse capture through the behavior service by pushing itself onto the behavior stack with the method. If it does so, it will be notified through the method when capture is lost. Generally the behavior removes itself from the stack at this time. Capture is lost when one of the following actions occurs: - Someone else requests capture. @@ -645,7 +645,7 @@ - This behavior is removed. - In each of these cases, will be called on the behavior. + In each of these cases, will be called on the behavior. ]]> @@ -699,7 +699,7 @@ method is called when any double-click message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. + The method is called when any double-click message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. @@ -761,7 +761,7 @@ method is called when any mouse-down message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. + The method is called when any mouse-down message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. ]]> @@ -811,7 +811,7 @@ method is called when any mouse-enter message enters the `WndProc` of the adorner window of the . From here, the message is sent to the appropriate behavior. + The method is called when any mouse-enter message enters the `WndProc` of the adorner window of the . From here, the message is sent to the appropriate behavior. When the mouse pointer's location is positively hit-tested with a different than previous hit tests, this method is called on the associated with the . @@ -865,7 +865,7 @@ method is called when any mouse-hover message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. + The method is called when any mouse-hover message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. ]]> @@ -915,7 +915,7 @@ method is called when any mouse-leave message enters the `WndProc` of the adorner window of the . From here, the message is sent to the appropriate behavior. + The method is called when any mouse-leave message enters the `WndProc` of the adorner window of the . From here, the message is sent to the appropriate behavior. When the mouse pointer leaves a positively hit-tested with a valid , this method is invoked. @@ -971,7 +971,7 @@ method is called when any mouse-move message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. + The method is called when any mouse-move message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. ]]> @@ -1023,7 +1023,7 @@ method is called when any mouse-up message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. + The method is called when any mouse-up message enters the `WndProc` of the adorner window of the . The message is first passed here, to the top-most in the behavior stack. Returning `true` from this method signifies that the message was handled by the and should not continue to be processed. From here, the message is sent to the appropriate behavior. ]]> diff --git a/xml/System.Windows.Forms.Design.Behavior/BehaviorService.xml b/xml/System.Windows.Forms.Design.Behavior/BehaviorService.xml index 8648e6d69a2..525d877ca45 100644 --- a/xml/System.Windows.Forms.Design.Behavior/BehaviorService.xml +++ b/xml/System.Windows.Forms.Design.Behavior/BehaviorService.xml @@ -480,10 +480,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> @@ -622,7 +622,7 @@ method forces a refresh of all objects and, in turn, all objects. + Calling the method forces a refresh of all objects and, in turn, all objects. ]]> @@ -669,7 +669,7 @@ method will force a refresh of all and, in turn, all . + The method will force a refresh of all and, in turn, all . ]]> @@ -716,7 +716,7 @@ method will force a refresh of all and, in turn, all . + The method will force a refresh of all and, in turn, all . ]]> @@ -856,7 +856,7 @@ method is often performed by means of a hit-tested . + The method is often performed by means of a hit-tested . ]]> @@ -905,7 +905,7 @@ . If a behavior calls the method and mouse capture is lost, the behavior's method is called. + Pushing a capture behavior is often done through a hit-tested . If a behavior calls the method and mouse capture is lost, the behavior's method is called. ]]> diff --git a/xml/System.Windows.Forms.Design.Behavior/Glyph.xml b/xml/System.Windows.Forms.Design.Behavior/Glyph.xml index 384d70ac085..b75ced9a810 100644 --- a/xml/System.Windows.Forms.Design.Behavior/Glyph.xml +++ b/xml/System.Windows.Forms.Design.Behavior/Glyph.xml @@ -44,22 +44,22 @@ Represents a single user interface (UI) entity managed by an . - is to paint and hit test. A does not have a window handle (HWND), as it is rendered on the adorner window control of the . Each can have a associated with it. A successfully hit-tested has the opportunity to push a new or different onto the behavior stack of the . - - For more information, see [Behavior Service Overview](https://msdn.microsoft.com/library/7c60cc41-4324-46b5-b444-b39eda7cb33f). - - - -## Examples - The following example demonstrates how to create your own based class with associated with it. This code example is part of a larger example provided for the class. - + is to paint and hit test. A does not have a window handle (HWND), as it is rendered on the adorner window control of the . Each can have a associated with it. A successfully hit-tested has the opportunity to push a new or different onto the behavior stack of the . + + For more information, see [Behavior Service Overview](https://msdn.microsoft.com/library/7c60cc41-4324-46b5-b444-b39eda7cb33f). + + + +## Examples + The following example demonstrates how to create your own based class with associated with it. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Design.Behavior.BehaviorService/cpp/Form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet5"::: + ]]> @@ -107,15 +107,15 @@ The associated with the . Can be . Initializes a new instance of the class. - class. This code example is part of a larger example provided for the class. - + class. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Design.Behavior.BehaviorService/cpp/Form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet4"::: + ]]> @@ -205,15 +205,15 @@ Gets the bounds of the . A representing the bounds of the . - to create a glyph with the specific dimensions and position. This code example is part of a larger example provided for the class. - + to create a glyph with the specific dimensions and position. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Design.Behavior.BehaviorService/cpp/Form1.cpp" id="Snippet8"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet8"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet8"::: + ]]> @@ -258,20 +258,20 @@ Provides hit test logic. A if the is associated with ; otherwise, . - method is an `abstract` method that forces implementations to provide hit test logic. Given any point, if the has decided to be involved with that location, it will need to return a valid . Otherwise, returning `null` will cause the to ignore the location. - - - -## Examples - The following example demonstrates how to override the to see if the point is within this glyph. This code example is part of a larger example provided for the class. - + method is an `abstract` method that forces implementations to provide hit test logic. Given any point, if the has decided to be involved with that location, it will need to return a valid . Otherwise, returning `null` will cause the to ignore the location. + + + +## Examples + The following example demonstrates how to override the to see if the point is within this glyph. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Design.Behavior.BehaviorService/cpp/Form1.cpp" id="Snippet9"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet9"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet9"::: + ]]> @@ -315,20 +315,20 @@ A that contains the event data. Provides paint logic. - method is an `abstract` method that forces implementations to provide paint logic. The `pe` parameter contains the related to the adorner window of the . - - - -## Examples - The following example demonstrates how to override the to draw a glyph. This code example is part of a larger example provided for the class. - + method is an `abstract` method that forces implementations to provide paint logic. The `pe` parameter contains the related to the adorner window of the . + + + +## Examples + The following example demonstrates how to override the to draw a glyph. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Design.Behavior.BehaviorService/cpp/Form1.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.cs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet10"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design.Behavior/Adorner/Overview/Form1.vb" id="Snippet10"::: + ]]> diff --git a/xml/System.Windows.Forms.Design.Behavior/SnapLine.xml b/xml/System.Windows.Forms.Design.Behavior/SnapLine.xml index 4c219ee8a28..d4e9aed1acc 100644 --- a/xml/System.Windows.Forms.Design.Behavior/SnapLine.xml +++ b/xml/System.Windows.Forms.Design.Behavior/SnapLine.xml @@ -63,15 +63,15 @@ |Property|Description| |--------------|-----------------| -||Specifies the location and direction of the line with respect to its associated control. Typically, only snaplines of similar types will auto-align to each other.| -||Specifies the distance in pixels from the origin, which is the upper-left corner of the control, to where the snapline starts.| -||Specifies the relative importance of the snapline. During any given layout decision point, only the snaplines that are active and have the highest priority are displayed.| -||Defines custom categories of snaplines. This is an optional string.| -| and |Indicates whether a snapline has horizontal or vertical orientation, respectively.| +||Specifies the location and direction of the line with respect to its associated control. Typically, only snaplines of similar types will auto-align to each other.| +||Specifies the distance in pixels from the origin, which is the upper-left corner of the control, to where the snapline starts.| +||Specifies the relative importance of the snapline. During any given layout decision point, only the snaplines that are active and have the highest priority are displayed.| +||Defines custom categories of snaplines. This is an optional string.| +| and |Indicates whether a snapline has horizontal or vertical orientation, respectively.| The class stores snaplines for its corresponding control type in the property. This base class handling of snaplines will suffice for the majority of controls, as it defines the , , , and snaplines, which are aligned along the edges of the control. When you are developing a custom control, if this default organization does not suffice, override the property of the class derived from . For example, you may want to align the horizontal snaplines of text-based controls, such as labels, with the top and base lines of the text (instead of the top and bottom edges of the control). - The class cannot be derived from. + The class cannot be derived from. There is extensive support for this feature in Visual Studio, see [Walkthrough: Arranging Controls on Windows Forms Using Snaplines](/dotnet/desktop/winforms/controls/walkthrough-arranging-controls-on-windows-forms-using-snaplines). @@ -540,7 +540,7 @@ ## Remarks The origin of a control is the upper-left point of the control. A single offset can describe the position of a snapline, because vertical snaplines may have only a nonzero x-axis offset, whereas horizontal snaplines may only have a nonzero y-axis offset. - The property is initialized at construction time, but it can be changed thereafter with the method. + The property is initialized at construction time, but it can be changed thereafter with the method. ]]> diff --git a/xml/System.Windows.Forms.Design/AxImporter.xml b/xml/System.Windows.Forms.Design/AxImporter.xml index 6a81f3f53c0..abd567cdda7 100644 --- a/xml/System.Windows.Forms.Design/AxImporter.xml +++ b/xml/System.Windows.Forms.Design/AxImporter.xml @@ -45,11 +45,11 @@ Imports ActiveX controls and generates a wrapper that can be accessed by a designer. - class. The constructor accepts an object, which sets options for the importer, such as the filename for the wrapper .dll to generate and the output directory to generate the wrapper to. To generate the ActiveX wrapper, call the appropriate Generate method. To generate from a file, call . To generate from a type library, call . The string that is returned will consist of an assembly qualified name (example: "Namespace.Type,Assembly") for the type an ActiveX wrapper was generated for. The wrapper for the ActiveX control will be generated in the .dll file specified in the property of the passed to the constructor. The type can be loaded or queried using and treated as an ordinary managed type. You can also call the `GetOcx` method of the type to retrieve a COM interface to the object, if the object supports this. - + class. The constructor accepts an object, which sets options for the importer, such as the filename for the wrapper .dll to generate and the output directory to generate the wrapper to. To generate the ActiveX wrapper, call the appropriate Generate method. To generate from a file, call . To generate from a type library, call . The string that is returned will consist of an assembly qualified name (example: "Namespace.Type,Assembly") for the type an ActiveX wrapper was generated for. The wrapper for the ActiveX control will be generated in the .dll file specified in the property of the passed to the constructor. The type can be loaded or queried using and treated as an ordinary managed type. You can also call the `GetOcx` method of the type to retrieve a COM interface to the object, if the object supports this. + ]]> diff --git a/xml/System.Windows.Forms.Design/ComponentEditorForm.xml b/xml/System.Windows.Forms.Design/ComponentEditorForm.xml index 4796a5131e7..5a4385254d9 100644 --- a/xml/System.Windows.Forms.Design/ComponentEditorForm.xml +++ b/xml/System.Windows.Forms.Design/ComponentEditorForm.xml @@ -43,11 +43,11 @@ Provides a user interface for a . - shows a view of available component editor pages along with a user interface for selection. - + shows a view of available component editor pages along with a user interface for selection. + ]]> @@ -207,15 +207,15 @@ An that contains the event data. Raises the event. - method is executed, it shows the first component editor page in the list. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method is executed, it shows the first component editor page in the list. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -254,15 +254,15 @@ A that contains the event data. Raises the event. - method shows the Help page that is associated with the component editor page, if there is one. - - Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method shows the Help page that is associated with the component editor page, if there is one. + + Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). + + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -347,11 +347,11 @@ if the specified message is for a component editor page; otherwise, . - is called by the application's message loop to preprocess input messages before they are dispatched. - + is called by the application's message loop to preprocess input messages before they are dispatched. + ]]> diff --git a/xml/System.Windows.Forms.Design/ComponentEditorPage.xml b/xml/System.Windows.Forms.Design/ComponentEditorPage.xml index 0d974ffc9a9..3c89dc05b0a 100644 --- a/xml/System.Windows.Forms.Design/ComponentEditorPage.xml +++ b/xml/System.Windows.Forms.Design/ComponentEditorPage.xml @@ -417,7 +417,7 @@ method to indicate that it will load something before the editor can display the loaded editor page. When a loading procedure that called completes, it should call the method to indicate that its part of the load process is completed. + Each procedure that performs loading or initialization should first call the method to indicate that it will load something before the editor can display the loaded editor page. When a loading procedure that called completes, it should call the method to indicate that its part of the load process is completed. The property is used as a counter to determine when loading is complete. A page is in loading mode if the value of the property is non-zero. @@ -456,7 +456,7 @@ method to indicate that it will load something before the editor can display the loaded editor page. When a loading procedure that called completes, it should call the method to indicate that its part of the load process is completed. + Each procedure that performs loading or initialization should first call the method to indicate that it will load something before the editor can display the loaded editor page. When a loading procedure that called completes, it should call the method to indicate that its part of the load process is completed. The property is used as a counter to determine when loading is complete. A page is in loading mode if the value of the property is non-zero. @@ -1118,7 +1118,7 @@ returns `true`. The Help system calls the method to provide Help for the page. is usually called in response to F1 or when the Help button is clicked to allow the page to bring up its associated Help topic. + This is only called if returns `true`. The Help system calls the method to provide Help for the page. is usually called in response to F1 or when the Help button is clicked to allow the page to bring up its associated Help topic. ]]> diff --git a/xml/System.Windows.Forms.Design/ComponentTray.xml b/xml/System.Windows.Forms.Design/ComponentTray.xml index abd7e958023..cbb6ff5e672 100644 --- a/xml/System.Windows.Forms.Design/ComponentTray.xml +++ b/xml/System.Windows.Forms.Design/ComponentTray.xml @@ -522,7 +522,7 @@ is an accessor method for the location extender property that is added to each component in the component tray. + is an accessor method for the location extender property that is added to each component in the component tray. ]]> @@ -662,7 +662,7 @@ . If `receiver` does not have a component view, the returned value is an empty . + The `Location` extender property is offered to all non-visual components. The returned value takes into account the value of . If `receiver` does not have a component view, the returned value is an empty . ]]> @@ -1341,7 +1341,7 @@ . + The `Location` extender property is offered to all non-visual components. The actual value takes into account the value of . ]]> diff --git a/xml/System.Windows.Forms.Design/ControlDesigner.xml b/xml/System.Windows.Forms.Design/ControlDesigner.xml index d5c079c4913..a2df3d30525 100644 --- a/xml/System.Windows.Forms.Design/ControlDesigner.xml +++ b/xml/System.Windows.Forms.Design/ControlDesigner.xml @@ -626,7 +626,7 @@ : it has two panels, `Panel1` and `Panel2`. These panels are exposed through read only and properties on the control. The control's designer calls for each panel, which allows other components to be dropped on them. But, in order for the contents of and to be saved, the control itself must expose the panels as public properties. + The child control specified by `child` is a child of this control designer's control. The child does not directly participate in persistence, but it will if it is exposed as a property of the main control. Consider a control like the : it has two panels, `Panel1` and `Panel2`. These panels are exposed through read only and properties on the control. The control's designer calls for each panel, which allows other components to be dropped on them. But, in order for the contents of and to be saved, the control itself must expose the panels as public properties. Control names must be unique within a control designer, but they are not required to be unique with respect to the children of other control designers. @@ -845,12 +845,12 @@ method determines whether a click at the specified point should be passed to the control, while the control is in design mode. You can override and implement this method to enable your control to receive clicks in the design-time environment. + The method determines whether a click at the specified point should be passed to the control, while the control is in design mode. You can override and implement this method to enable your control to receive clicks in the design-time environment. > [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. - The method is called in response to the WM_NCHITTEST message, so it is called on each mouse move. + The method is called in response to the WM_NCHITTEST message, so it is called on each mouse move. ]]> @@ -1132,7 +1132,7 @@ collection of the . is an example of one such control. + An internal control is a control that is not in the collection of the . is an example of one such control. ]]> @@ -1172,7 +1172,7 @@ has an and property set to the minimum value for the integer data type. + has an and property set to the minimum value for the integer data type. ]]> @@ -1213,7 +1213,7 @@ collection of the . is an example of one such control. + An internal control is a control that is not in the collection of the . is an example of one such control. ]]> @@ -1563,7 +1563,7 @@ This method is called at the start of a drag-and-drop operation. > [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. ]]> @@ -1649,7 +1649,7 @@ ## Remarks > [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. ]]> @@ -1920,7 +1920,7 @@ returns its parent. + The default implementation simply checks to see if the component being designed is a control and if it is, returns its parent. ]]> @@ -2173,10 +2173,10 @@ ## Remarks This method is called for each message the control would usually receive. This allows the designer to preprocess messages before optionally routing them to the control. - To send the message to the control's method, call on the control's designer. + To send the message to the control's method, call on the control's designer. > [!NOTE] -> The designer filters messages, so some messages will not be sent to the control. For example, mouse messages are intercepted by the designer. If this is not the behavior you want, call instead. +> The designer filters messages, so some messages will not be sent to the control. For example, mouse messages are intercepted by the designer. If this is not the behavior you want, call instead. Pass `m` as a parameter. Optionally, you can alter or create a new to pass to the control's method. @@ -2184,9 +2184,9 @@ |Without a designer|With a designer| |------------------------|---------------------| -|USER32





USER32|USER32

`Control.Designer.`







USER32| +|USER32





USER32|USER32

`Control.Designer.`







USER32| - The designer intercepts messages by replacing the property on the control. Usually, points to the contained within the control. During design time, the designer replaces this with its own window target, and caches the original value. + The designer intercepts messages by replacing the property on the control. Usually, points to the contained within the control. During design time, the designer replaces this with its own window target, and caches the original value. ]]>
diff --git a/xml/System.Windows.Forms.Design/DocumentDesigner.xml b/xml/System.Windows.Forms.Design/DocumentDesigner.xml index 9cdac962ab6..01936e5046b 100644 --- a/xml/System.Windows.Forms.Design/DocumentDesigner.xml +++ b/xml/System.Windows.Forms.Design/DocumentDesigner.xml @@ -762,7 +762,7 @@ is called when the user double-clicks on a toolbox item. The document designer should create a component for the specified tool. Only tools that are enabled in the toolbox will be passed to this method. + is called when the user double-clicks on a toolbox item. The document designer should create a component for the specified tool. Only tools that are enabled in the toolbox will be passed to this method. ]]> diff --git a/xml/System.Windows.Forms.Design/FileNameEditor.xml b/xml/System.Windows.Forms.Design/FileNameEditor.xml index a32af6f0a04..3459159befc 100644 --- a/xml/System.Windows.Forms.Design/FileNameEditor.xml +++ b/xml/System.Windows.Forms.Design/FileNameEditor.xml @@ -59,20 +59,20 @@ Provides a user interface for selecting a file name. - provides a file selection dialog box for file name selection and editing. - - - -## Examples - The following code example uses an to associate the with a property. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/EditorAttributesExample/CPP/class1.cpp" id="Snippet5"::: - :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/CollectionEditor/Overview/class1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/CollectionEditor/Overview/class1.vb" id="Snippet5"::: - + provides a file selection dialog box for file name selection and editing. + + + +## Examples + The following code example uses an to associate the with a property. + + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/EditorAttributesExample/CPP/class1.cpp" id="Snippet5"::: + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/CollectionEditor/Overview/class1.cs" id="Snippet5"::: + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/CollectionEditor/Overview/class1.vb" id="Snippet5"::: + ]]> @@ -170,11 +170,11 @@ Edits the specified object using the editor style provided by the method. The new value of the object. If the value of the object hasn't changed, this should return the same object it was passed. - @@ -219,11 +219,11 @@ Gets the editing style used by the method. One of the values indicating the provided editing style. - method is not supported, this method will return . - + method is not supported, this method will return . + ]]> @@ -268,11 +268,11 @@ The to use to select a file name. Initializes the open file dialog when it is created. - diff --git a/xml/System.Windows.Forms.Design/FolderNameEditor.xml b/xml/System.Windows.Forms.Design/FolderNameEditor.xml index 3883fe365d4..1689147c690 100644 --- a/xml/System.Windows.Forms.Design/FolderNameEditor.xml +++ b/xml/System.Windows.Forms.Design/FolderNameEditor.xml @@ -55,11 +55,11 @@ Provides a user interface for choosing a folder from the file system. - . - + . + ]]> @@ -196,11 +196,11 @@ Gets the editing style used by the method. A enumeration value indicating the provided editing style. - method is not supported, this will return . - + method is not supported, this will return . + ]]> @@ -245,11 +245,11 @@ A to choose a folder. Initializes the folder browser dialog. - diff --git a/xml/System.Windows.Forms.Design/IUIService.xml b/xml/System.Windows.Forms.Design/IUIService.xml index 0f9da21b656..91d19f13cdd 100644 --- a/xml/System.Windows.Forms.Design/IUIService.xml +++ b/xml/System.Windows.Forms.Design/IUIService.xml @@ -29,20 +29,20 @@ Enables interaction with the user interface of the development environment object that is hosting the designer. - can display error messages, show dialog boxes, and get ambient properties of the host, such as the font for dialog boxes and color schemes, through the dictionary property. - - - -## Examples - The following code example creates a designer that provides designer verb menu commands that call methods of the . To use the example, compile the sample code to an assembly, and add a reference to the assembly in a Windows Forms application. If you are using Visual Studio, the `IUIServiceExampleControl` is automatically added to the **Toolbox**. Add an instance of the `IUIServiceExampleControl` to a . To access the designer verb commands that invoke methods, either right-click on the control's surface or click on the control's smart tag glyph and select an item from the smart tag panel. - + can display error messages, show dialog boxes, and get ambient properties of the host, such as the font for dialog boxes and color schemes, through the dictionary property. + + + +## Examples + The following code example creates a designer that provides designer verb menu commands that call methods of the . To use the example, compile the sample code to an assembly, and add a reference to the assembly in a Windows Forms application. If you are using Visual Studio, the `IUIServiceExampleControl` is automatically added to the **Toolbox**. Add an instance of the `IUIServiceExampleControl` to a . To access the designer verb commands that invoke methods, either right-click on the control's surface or click on the control's smart tag glyph and select an item from the smart tag panel. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IUIServiceExample/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/StandardToolWindows/Overview/class1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet1"::: + ]]> @@ -80,13 +80,13 @@ if the specified component can display a component editor form; otherwise, . - that can display a . - + that can display a . + ]]> @@ -121,11 +121,11 @@ Gets the window that should be used as the owner when showing dialog boxes. An that indicates the window to own any child dialog boxes. - that indicates the window that should be the owner for dialog boxes of this sort that are spawned from an integrated development environment. - + that indicates the window that should be the owner for dialog boxes of this sort that are spawned from an integrated development environment. + ]]> @@ -158,11 +158,11 @@ Sets a flag indicating the UI has changed. - @@ -202,13 +202,13 @@ if the attempt is successful; otherwise, . - is similar to a property page from the Component Object Model (COM). - - If the component does not support component editors, an is thrown. To avoid this, be sure to call first. - + is similar to a property page from the Component Object Model (COM). + + If the component does not support component editors, an is thrown. To avoid this, be sure to call first. + ]]> The component does not support component editors. @@ -247,15 +247,15 @@ Attempts to display the specified form in a dialog box. One of the values indicating the result code returned by the dialog box. - class and invoke the service's method. - + class and invoke the service's method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IUIServiceExample/CPP/class1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/StandardToolWindows/Overview/class1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet4"::: + ]]> @@ -301,11 +301,11 @@ The to display. Displays the specified exception and information about the exception in a message box. - @@ -341,11 +341,11 @@ The error message to display. Displays the specified error message in a message box. - @@ -383,20 +383,20 @@ A message to display that provides information about the exception. Displays the specified exception and information about the exception in a message box. - and invoke the service's method. - + and invoke the service's method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IUIServiceExample/CPP/class1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/StandardToolWindows/Overview/class1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet3"::: + ]]> @@ -441,20 +441,20 @@ The message to display. Displays the specified message in a message box. - method to display a message box. - + method to display a message box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IUIServiceExample/CPP/class1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/StandardToolWindows/Overview/class1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet2"::: + ]]> @@ -492,20 +492,20 @@ The caption for the message box. Displays the specified message in a message box with the specified caption. - and invoke the service's method. - + and invoke the service's method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IUIServiceExample/CPP/class1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/StandardToolWindows/Overview/class1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet2"::: + ]]> @@ -546,20 +546,20 @@ Displays the specified message in a message box with the specified caption and buttons to place on the dialog box. One of the values indicating the result code returned by the dialog box. - method to display a message box. - + method to display a message box. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IUIServiceExample/CPP/class1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/StandardToolWindows/Overview/class1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet2"::: + ]]> @@ -599,15 +599,15 @@ if the tool window was successfully shown; if it could not be shown or found. - and invoke the service's method. - + and invoke the service's method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IUIServiceExample/CPP/class1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.ComponentModel.Design/StandardToolWindows/Overview/class1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel.Design/StandardToolWindows/Overview/class1.vb" id="Snippet5"::: + ]]> @@ -641,22 +641,22 @@ Gets the collection of styles that are specific to the host's environment. An containing style settings. - ).Styles[(style name string in quotes)]. - - - -## Examples - The following code example gets the dialog box font from the host environment. - + ).Styles[(style name string in quotes)]. + + + +## Examples + The following code example gets the dialog box font from the host environment. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic IUIService.Styles Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design/IUIService/Styles/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design/IUIService/Styles/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design/IUIService/Styles/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms.Design/IWindowsFormsEditorService.xml b/xml/System.Windows.Forms.Design/IWindowsFormsEditorService.xml index ec3e3d19bf1..c619bbb409b 100644 --- a/xml/System.Windows.Forms.Design/IWindowsFormsEditorService.xml +++ b/xml/System.Windows.Forms.Design/IWindowsFormsEditorService.xml @@ -23,28 +23,28 @@ Provides an interface for a to display Windows Forms or to display a control in a drop-down area from a property grid control in design mode. - is only available through the method of the control. - - This service is typically used to display a form from the method of a . When a invokes the method of a to provide a user interface for editing the value of a property, the method is passed a reference to an that can typically provide an instance of the . The methods of this service can be used to display dialog boxes and forms, or to show a within a drop down container that is shown on top of the property grid near the area of the value field whose value is being edited. - - - -## Examples - The following example provides an example that uses an to display a for user input. - + is only available through the method of the control. + + This service is typically used to display a form from the method of a . When a invokes the method of a to provide a user interface for editing the value of a property, the method is passed a reference to an that can typically provide an instance of the . The methods of this service can be used to display dialog boxes and forms, or to show a within a drop down container that is shown on top of the property grid near the area of the value field whose value is being edited. + + + +## Examples + The following example provides an example that uses an to display a for user input. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/WinFormsEditorServiceDialogExample/CPP/winformsedserviceeditordialogexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design/IWindowsFormsEditorService/Overview/winformsedserviceeditordialogexample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design/IWindowsFormsEditorService/Overview/winformsedserviceeditordialogexample.vb" id="Snippet1"::: - - The following example provides an example that uses an to display a drop-down for user input. - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design/IWindowsFormsEditorService/Overview/winformsedserviceeditordialogexample.vb" id="Snippet1"::: + + The following example provides an example that uses an to display a drop-down for user input. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/WinFormsEditorServiceDropDownExample/CPP/winformsedserviceeditordropdownexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Design/IWindowsFormsEditorService/Overview/winformsedserviceeditordropdownexample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design/IWindowsFormsEditorService/Overview/winformsedserviceeditordropdownexample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Design/IWindowsFormsEditorService/Overview/winformsedserviceeditordropdownexample.vb" id="Snippet1"::: + ]]> @@ -77,11 +77,11 @@ Closes any previously opened drop down control area. - method, and releases the drop down container's reference to the control. - + method, and releases the drop down container's reference to the control. + ]]> @@ -118,13 +118,13 @@ The drop down list to open. Displays the specified control in a drop down area below a value field of the property grid that provides this service. - method of a can call this method to display a specified control in a drop down area over the property grid hosting the editor which uses this service. - - When possible, the dimensions of the control will be maintained. If this is not possible due to the screen layout, the control may be resized. To ensure that the control resizes neatly, you should implement docking and anchoring, and possibly any resize event-handler update code. If the user performs an action that causes the drop down to close, the control will be hidden and disposed by garbage collection if there is no other stored reference to the control. - + method of a can call this method to display a specified control in a drop down area over the property grid hosting the editor which uses this service. + + When possible, the dimensions of the control will be maintained. If this is not possible due to the screen layout, the control may be resized. To ensure that the control resizes neatly, you should implement docking and anchoring, and possibly any resize event-handler update code. If the user performs an action that causes the drop down to close, the control will be hidden and disposed by garbage collection if there is no other stored reference to the control. + ]]> @@ -161,11 +161,11 @@ Shows the specified . A indicating the result code returned by the . - diff --git a/xml/System.Windows.Forms.Design/ImageListCodeDomSerializer.xml b/xml/System.Windows.Forms.Design/ImageListCodeDomSerializer.xml index 24022f5c5e8..b754d899ca0 100644 --- a/xml/System.Windows.Forms.Design/ImageListCodeDomSerializer.xml +++ b/xml/System.Windows.Forms.Design/ImageListCodeDomSerializer.xml @@ -119,11 +119,11 @@ Deserializes the specified serialized Code Document Object Model (CodeDOM) object into an object. The deserialized CodeDOM object. - method uses the serialization manager to create objects and resolve data types. - + method uses the serialization manager to create objects and resolve data types. + ]]> diff --git a/xml/System.Windows.Forms.Design/MaskDescriptor.xml b/xml/System.Windows.Forms.Design/MaskDescriptor.xml index 87ad49c8080..7a9cf82804b 100644 --- a/xml/System.Windows.Forms.Design/MaskDescriptor.xml +++ b/xml/System.Windows.Forms.Design/MaskDescriptor.xml @@ -92,7 +92,7 @@ is a compiler-supplied parameterless constructor. A parameterless constructor is required by the service provider. + is a compiler-supplied parameterless constructor. A parameterless constructor is required by the service provider. ]]> @@ -181,7 +181,7 @@ method determines whether `maskDescriptor` and the current mask descriptor describe the same mask. + The method determines whether `maskDescriptor` and the current mask descriptor describe the same mask. This method returns `true` if the following conditions are met in both mask descriptors. @@ -290,7 +290,7 @@ method determines whether `maskDescriptor` is valid and can be added to the masks list. + The method determines whether `maskDescriptor` is valid and can be added to the masks list. A valid must meet the following conditions. @@ -304,7 +304,7 @@ - The sample is correct based on the mask and all required edit characters have been provided. This means the mask is completed but not necessarily full. -- The sample is valid based on the object, if any. +- The sample is valid based on the object, if any. ]]> @@ -366,7 +366,7 @@ method determines whether `maskDescriptor` is valid and can be added to the masks list. + The method determines whether `maskDescriptor` is valid and can be added to the masks list. A valid must meet the following conditions. @@ -380,7 +380,7 @@ - The sample is correct based on the mask and all required edit characters have been provided. This means the mask is completed but not necessarily full. -- The sample is valid based on the object, if any. +- The sample is valid based on the object, if any. ]]> @@ -424,7 +424,7 @@ method of the class. When a predefined mask is selected in Visual Studio, its property is displayed. + The mask must contain only valid characters, as defined by the method of the class. When a predefined mask is selected in Visual Studio, its property is displayed. ]]> diff --git a/xml/System.Windows.Forms.Design/MenuCommands.xml b/xml/System.Windows.Forms.Design/MenuCommands.xml index 86029087e07..6ccd2aa8d60 100644 --- a/xml/System.Windows.Forms.Design/MenuCommands.xml +++ b/xml/System.Windows.Forms.Design/MenuCommands.xml @@ -45,11 +45,11 @@ Defines a set of fields that each correspond to a command function provided by the host environment. - contains a set of fields that can be used to specify a command to link when adding a command using the method of the . - + contains a set of fields that can be used to specify a command to link when adding a command using the method of the . + ]]> diff --git a/xml/System.Windows.Forms.Design/ParentControlDesigner.xml b/xml/System.Windows.Forms.Design/ParentControlDesigner.xml index 15b7f48a946..e0d1bd6e230 100644 --- a/xml/System.Windows.Forms.Design/ParentControlDesigner.xml +++ b/xml/System.Windows.Forms.Design/ParentControlDesigner.xml @@ -178,7 +178,7 @@ method is called after the user selects a toolbox item that has a associated with it. It draws a reversible rectangle on a designer's surface. + The method is called after the user selects a toolbox item that has a associated with it. It draws a reversible rectangle on a designer's surface. ]]> @@ -489,7 +489,7 @@ ## Remarks The new component or control is positioned at the center of the currently selected control. This method uses the default size for the tool, if the tool has a default size specified. - To specify a location or location and size for the component or control, use one of the other overloaded methods. + To specify a location or location and size for the component or control, use one of the other overloaded methods. ]]> @@ -549,7 +549,7 @@ ## Remarks The new component or control is positioned around the location specified by the `location` parameter. This method uses the default size for the tool's component, if the component has a default size. - To specify a location and size for the component or control, use the appropriate overloaded method. + To specify a location and size for the component or control, use the appropriate overloaded method. ]]>
@@ -607,7 +607,7 @@ and values of the `bounds` parameter. The size of the new component or control will be set to the values specified by the and properties of the `bounds` parameter. + The new component or control is positioned with its upper left corner at the location specified by the and values of the `bounds` parameter. The size of the new component or control will be set to the values specified by the and properties of the `bounds` parameter. ]]> @@ -678,7 +678,7 @@ method that can be overridden. + This is the only method that can be overridden. ]]> @@ -1011,7 +1011,7 @@ method adds a container selector to the selection glyphs collection. + The method adds a container selector to the selection glyphs collection. ]]> @@ -1401,7 +1401,7 @@ is used to clean up any operations that were performed at the beginning of a drag-and-drop operation. + is used to clean up any operations that were performed at the beginning of a drag-and-drop operation. ]]> @@ -1662,7 +1662,7 @@ This method is called in response to the left mouse button being pressed on a component. The designer overrides the base form of this method to provide a "lasso" selection mechanism for components within the control. > [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. ]]>
@@ -1768,7 +1768,7 @@ This method is called at the start of a drag-and-drop operation. > [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. ]]> diff --git a/xml/System.Windows.Forms.Design/PropertyTab.xml b/xml/System.Windows.Forms.Design/PropertyTab.xml index 89b63ff0275..0bc0eb693ab 100644 --- a/xml/System.Windows.Forms.Design/PropertyTab.xml +++ b/xml/System.Windows.Forms.Design/PropertyTab.xml @@ -243,10 +243,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> diff --git a/xml/System.Windows.Forms.Design/ScrollableControlDesigner.xml b/xml/System.Windows.Forms.Design/ScrollableControlDesigner.xml index 33bd0338b40..b39996048a7 100644 --- a/xml/System.Windows.Forms.Design/ScrollableControlDesigner.xml +++ b/xml/System.Windows.Forms.Design/ScrollableControlDesigner.xml @@ -42,7 +42,7 @@ provides a base class for designers of controls that respond to scroll messages. In addition to the methods and functionality inherited from the , , and classes, provides a method override that passes WM_HSCROLL and WM_VSCROLL messages to the control at design time. + provides a base class for designers of controls that respond to scroll messages. In addition to the methods and functionality inherited from the , , and classes, provides a method override that passes WM_HSCROLL and WM_VSCROLL messages to the control at design time. > [!NOTE] > If a form has its property set to active, the scroll bars are always active in the design-time environment. @@ -136,10 +136,10 @@ method determines whether a click at the specified point should be passed to the control, while the control is in design mode. You can override and implement this method to enable your control to receive clicks in the design-time environment. + The method determines whether a click at the specified point should be passed to the control, while the control is in design mode. You can override and implement this method to enable your control to receive clicks in the design-time environment. > [!NOTE] -> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. +> You can pass a point in screen coordinates to the method of the class to obtain the coordinates of the point relative to the upper-left corner of the control. ]]> @@ -183,7 +183,7 @@ method passes any WM_HSCROLL and WM_VSCROLL messages to the control at design time. All messages are first passed to the base method. + This override of the method passes any WM_HSCROLL and WM_VSCROLL messages to the control at design time. All messages are first passed to the base method. ]]> diff --git a/xml/System.Windows.Forms.Design/WindowsFormsComponentEditor.xml b/xml/System.Windows.Forms.Design/WindowsFormsComponentEditor.xml index a893214fc6c..d4c085ec1a0 100644 --- a/xml/System.Windows.Forms.Design/WindowsFormsComponentEditor.xml +++ b/xml/System.Windows.Forms.Design/WindowsFormsComponentEditor.xml @@ -31,13 +31,13 @@ Provides a base class for editors that use a modal dialog to display a properties page similar to an ActiveX control's property page. - implementation. - + implementation. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/ComponentEditor/Overview/componenteditorexamplecomponent.cs" id="Snippet1"::: - + ]]> @@ -264,13 +264,13 @@ Gets the component editor pages associated with the component editor. An array of component editor pages. - method override. - + method override. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/ComponentEditor/Overview/componenteditorexamplecomponent.cs" id="Snippet2"::: - + ]]> @@ -307,13 +307,13 @@ Gets the index of the initial component editor page for the component editor to display. The index of the component editor page that the component editor will initially display. - method override. - + method override. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/ComponentEditor/Overview/componenteditorexamplecomponent.cs" id="Snippet3"::: - + ]]> diff --git a/xml/System.Windows.Forms.Design/WindowsFormsDesignerOptionService.xml b/xml/System.Windows.Forms.Design/WindowsFormsDesignerOptionService.xml index dab30d0f4b9..52498e68a97 100644 --- a/xml/System.Windows.Forms.Design/WindowsFormsDesignerOptionService.xml +++ b/xml/System.Windows.Forms.Design/WindowsFormsDesignerOptionService.xml @@ -148,11 +148,11 @@ The collection to populate. Populates a . - method is called on demand the first time a user asks for child options or properties of an options collection. - + method is called on demand the first time a user asks for child options or properties of an options collection. + ]]> diff --git a/xml/System.Windows.Forms.Integration/ChildChangedEventArgs.xml b/xml/System.Windows.Forms.Integration/ChildChangedEventArgs.xml index 3cd79c3cc18..5ccadcd836b 100644 --- a/xml/System.Windows.Forms.Integration/ChildChangedEventArgs.xml +++ b/xml/System.Windows.Forms.Integration/ChildChangedEventArgs.xml @@ -27,7 +27,7 @@ class is used by the and classes when the values of the or properties change. + The class is used by the and classes when the values of the or properties change. Use the property to get the previously assigned child control or element. diff --git a/xml/System.Windows.Forms.Integration/ElementHost.xml b/xml/System.Windows.Forms.Integration/ElementHost.xml index 7dcc5b395f4..4c5240476cc 100644 --- a/xml/System.Windows.Forms.Integration/ElementHost.xml +++ b/xml/System.Windows.Forms.Integration/ElementHost.xml @@ -310,7 +310,7 @@ can have any number of child elements. + Only one element can be hosted, but can have any number of child elements. @@ -615,7 +615,7 @@ property, see . + For more information about the property, see . ]]> @@ -934,7 +934,7 @@ method to forward all keyboard messages when a WPF window is opened modelessly. The method installs a message filter in the Windows Forms-based application. The filter forwards all keyboard messages when the modeless window is active. + Call the method to forward all keyboard messages when a WPF window is opened modelessly. The method installs a message filter in the Windows Forms-based application. The filter forwards all keyboard messages when the modeless window is active. ]]> @@ -1280,7 +1280,7 @@ , which is the parent container for the hosted element. The host container is always at the root of the WPF element hierarchy. To access the parent of the hosted element, access directly. + The host container is the WPF , which is the parent container for the hosted element. The host container is always at the root of the WPF element hierarchy. To access the parent of the hosted element, access directly. ]]> @@ -1397,7 +1397,7 @@ control processes it with the method. + If the hosted Windows Presentation Foundation (WPF) element does not process `charCode`, the control processes it with the method. ]]> @@ -2174,7 +2174,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2216,7 +2216,7 @@ method, see . + For more information about the method, see . ]]> @@ -2256,7 +2256,7 @@ method, see . + For more information about the method, see . ]]> @@ -2296,7 +2296,7 @@ method, see . + For more information about the method, see . ]]> @@ -2346,7 +2346,7 @@ implementation of the method forwards to the base class implementation. + The implementation of the method forwards to the base class implementation. ]]> @@ -2399,7 +2399,7 @@ method paints the parent control's background into an offscreen HBITMAP. This bitmap is used as the background in the hosted element to support transparency. + The method paints the parent control's background into an offscreen HBITMAP. This bitmap is used as the background in the hosted element to support transparency. This method supports the Microsoft .NET infrastructure and is not intended to be used directly from your code. @@ -2509,7 +2509,7 @@ method, see . + For more information about the method, see . ]]> @@ -3006,9 +3006,9 @@ method activates the hosted element. If more than one hosted element exists, either the first or last element is activated, depending on the `directed` and `forward` parameters. + The method activates the hosted element. If more than one hosted element exists, either the first or last element is activated, depending on the `directed` and `forward` parameters. - Repeated calls to the method do not traverse the hosted elements. To select subsequent elements, call the method on the property. + Repeated calls to the method do not traverse the hosted elements. To select subsequent elements, call the method on the property. This implementation forwards tab keys from Windows Forms to Windows Presentation Foundation (WPF). @@ -3143,7 +3143,7 @@ method, see . + For more information about the method, see . ]]> diff --git a/xml/System.Windows.Forms.Integration/PropertyMap.xml b/xml/System.Windows.Forms.Integration/PropertyMap.xml index 3683f8bd416..dc17edbff93 100644 --- a/xml/System.Windows.Forms.Integration/PropertyMap.xml +++ b/xml/System.Windows.Forms.Integration/PropertyMap.xml @@ -33,7 +33,7 @@ class to define translations between Windows Forms properties and Windows Presentation Foundation (WPF) properties in a hybrid application. The and properties on the and classes define mappings from one technology to the other. + Use the class to define translations between Windows Forms properties and Windows Presentation Foundation (WPF) properties in a hybrid application. The and properties on the and classes define mappings from one technology to the other. For more information, see [Walkthrough: Mapping Properties Using the ElementHost Control](/dotnet/desktop/wpf/advanced/walkthrough-mapping-properties-using-the-elementhost-control) and [Walkthrough: Mapping Properties Using the WindowsFormsHost Element](/dotnet/desktop/wpf/advanced/walkthrough-mapping-properties-using-the-windowsformshost-element). @@ -141,9 +141,9 @@ . The properties which are mapped in the must exist on . + `source` is the source of the properties which are translated by the . The properties which are mapped in the must exist on . - delegates are called using the current property values on . + delegates are called using the current property values on . ]]> @@ -535,7 +535,7 @@ event can optionally raise the exception by setting the flag on the . + Handlers for the event can optionally raise the exception by setting the flag on the . ]]> @@ -633,7 +633,7 @@ method has the following effects on the . + The method has the following effects on the . - A default property mapping that has been removed is restored. @@ -682,7 +682,7 @@ method has the following effects on the . + The method has the following effects on the . - Default property mappings that have been removed are restored. @@ -735,7 +735,7 @@ must exist on . + The properties which are mapped in the must exist on . ]]> diff --git a/xml/System.Windows.Forms.Integration/WindowsFormsHost.xml b/xml/System.Windows.Forms.Integration/WindowsFormsHost.xml index 11b257ba693..59b55ebfbee 100644 --- a/xml/System.Windows.Forms.Integration/WindowsFormsHost.xml +++ b/xml/System.Windows.Forms.Integration/WindowsFormsHost.xml @@ -165,7 +165,7 @@ The following code example demonstrates how to use a field. By default, this property is mapped to update the and properties of the hosted control. + This dependency property is identified by the field. By default, this property is mapped to update the and properties of the hosted control. For more information on mapping the property, see [Windows Forms and WPF Property Mapping](/dotnet/framework/wpf/advanced/windows-forms-and-wpf-property-mapping). @@ -187,7 +187,7 @@ The following code example demonstrates how to use a | -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -288,11 +288,11 @@ The following code example demonstrates how to use a can have any number of children. + Only one child control can be hosted, but can have any number of children. The child control cannot be a top-level form. - If is a , the form's property is set to `false`. + If is a , the form's property is set to `false`. ## XAML Text Usage @@ -435,7 +435,7 @@ The following code example demonstrates how to use a method disposes the base and the control. + Calling the method disposes the base and the control. ]]> @@ -471,7 +471,7 @@ The following code example demonstrates how to use a method to forward all keyboard messages when a is opened modelessly. The method installs a message filter that is required for modeless forms to function correctly when opened by WPF. You need to call this method only once for a particular instance. + Call the method to forward all keyboard messages when a is opened modelessly. The method installs a message filter that is required for modeless forms to function correctly when opened by WPF. You need to call this method only once for a particular instance. ]]> @@ -530,7 +530,7 @@ The following code example demonstrates how to use a | -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]> @@ -618,7 +618,7 @@ The following code example demonstrates how to use a | -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]> @@ -704,7 +704,7 @@ The following code example demonstrates how to use a | -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]> @@ -791,7 +791,7 @@ The following code example demonstrates how to use a | -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]> @@ -878,7 +878,7 @@ The following code example demonstrates how to use a | -|Metadata properties set to `true`|,

,

| +|Metadata properties set to `true`|,

,

| ]]> @@ -1071,7 +1071,7 @@ The following code example demonstrates how to use a method may be necessary when a property of an ancestor element has changed, but the local value of the element has not changed. For more information, see [Windows Forms and WPF Property Mapping](/dotnet/framework/wpf/advanced/windows-forms-and-wpf-property-mapping). + Calling the method may be necessary when a property of an ancestor element has changed, but the local value of the element has not changed. For more information, see [Windows Forms and WPF Property Mapping](/dotnet/framework/wpf/advanced/windows-forms-and-wpf-property-mapping). ]]> @@ -1137,7 +1137,7 @@ The following code example demonstrates how to use a | -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]> @@ -1259,7 +1259,7 @@ The following code example demonstrates how to use a method to provide custom scaling behavior for the hosted Windows Forms control. + Override the method to provide custom scaling behavior for the hosted Windows Forms control. ]]> @@ -1396,7 +1396,7 @@ The following code example demonstrates how to use a element receives a TAB command from the method, the first eligible control in receives focus. + When a element receives a TAB command from the method, the first eligible control in receives focus. The first control is specified by the `request` parameter. When `request` is , the behavior is similar to pressing the TAB key. When `request` is , the behavior is similar to pressing SHIFT+TAB. diff --git a/xml/System.Windows.Forms.Layout/ArrangedElementCollection.xml b/xml/System.Windows.Forms.Layout/ArrangedElementCollection.xml index c0934143634..d2b3e24ea90 100644 --- a/xml/System.Windows.Forms.Layout/ArrangedElementCollection.xml +++ b/xml/System.Windows.Forms.Layout/ArrangedElementCollection.xml @@ -99,7 +99,7 @@ ## Remarks The type of the specified array must be compatible with the source collection. - This method uses the method to copy the elements. + This method uses the method to copy the elements. ]]> diff --git a/xml/System.Windows.Forms.Layout/LayoutEngine.xml b/xml/System.Windows.Forms.Layout/LayoutEngine.xml index 04ffbd5fc2b..ddf976cb91c 100644 --- a/xml/System.Windows.Forms.Layout/LayoutEngine.xml +++ b/xml/System.Windows.Forms.Layout/LayoutEngine.xml @@ -30,20 +30,20 @@ Provides the base class for implementing layout engines. - class when you want to create custom layout behavior at run time. Derive your own class from the class and override the method to define your custom layout behavior. - - - -## Examples - The following code example demonstrates the use of the class to implement custom layout behavior. - + class when you want to create custom layout behavior at run time. Derive your own class from the class and override the method to define your custom layout behavior. + + + +## Examples + The following code example demonstrates the use of the class to implement custom layout behavior. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Layout.LayoutEngine/cpp/DemoFlowLayout.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Layout/LayoutEngine/Overview/DemoFlowLayout.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Layout/LayoutEngine/Overview/DemoFlowLayout.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Layout/LayoutEngine/Overview/DemoFlowLayout.vb" id="Snippet1"::: + ]]> How to: Implement a Custom Layout Engine @@ -121,11 +121,11 @@ The bounds defining the container's size and position. Initializes the layout engine. - method. - + method. + ]]> @@ -170,29 +170,29 @@ if layout should be performed again by the parent of ; otherwise, . - , , and properties on `layoutEventArgs` to decide if a layout operation is necessary. - - - -## Examples - The following code example demonstrates the use of the method to implement custom layout behavior. This code example is part of a larger example provided for the class. - + , , and properties on `layoutEventArgs` to decide if a layout operation is necessary. + + + +## Examples + The following code example demonstrates the use of the method to implement custom layout behavior. This code example is part of a larger example provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Layout.LayoutEngine/cpp/DemoFlowLayout.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.Layout/LayoutEngine/Overview/DemoFlowLayout.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Layout/LayoutEngine/Overview/DemoFlowLayout.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms.Layout/LayoutEngine/Overview/DemoFlowLayout.vb" id="Snippet4"::: + ]]> is not a type on which can perform layout. - Override the method to provide your custom layout behavior. - - When laying out the contents of the parameter, be sure to check the property of each child control. - + Override the method to provide your custom layout behavior. + + When laying out the contents of the parameter, be sure to check the property of each child control. + Return if your layout engine logic determines that layout should be performed again by the parent of the container. This might occur, for example, when the layout engine resizes child controls and determines that the container must be increased in size to accommodate the new layout. diff --git a/xml/System.Windows.Forms.VisualStyles/BackgroundType.xml b/xml/System.Windows.Forms.VisualStyles/BackgroundType.xml index 53649de0bb4..d97fdc1ca89 100644 --- a/xml/System.Windows.Forms.VisualStyles/BackgroundType.xml +++ b/xml/System.Windows.Forms.VisualStyles/BackgroundType.xml @@ -23,11 +23,11 @@ Specifies the source of a visual style element's background. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/BooleanProperty.xml b/xml/System.Windows.Forms.VisualStyles/BooleanProperty.xml index 366ed8dff8e..35448900f53 100644 --- a/xml/System.Windows.Forms.VisualStyles/BooleanProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/BooleanProperty.xml @@ -23,11 +23,11 @@ Identifies the Boolean properties of a visual style element. - enumeration represents a set of Boolean properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of Boolean properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/BorderType.xml b/xml/System.Windows.Forms.VisualStyles/BorderType.xml index 1b550554816..649cf67f68d 100644 --- a/xml/System.Windows.Forms.VisualStyles/BorderType.xml +++ b/xml/System.Windows.Forms.VisualStyles/BorderType.xml @@ -23,11 +23,11 @@ Specifies the border type of a visual style element with a filled-border background. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/CheckBoxState.xml b/xml/System.Windows.Forms.VisualStyles/CheckBoxState.xml index cacd1466257..706da37472f 100644 --- a/xml/System.Windows.Forms.VisualStyles/CheckBoxState.xml +++ b/xml/System.Windows.Forms.VisualStyles/CheckBoxState.xml @@ -23,11 +23,11 @@ Specifies the visual state of a check box that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ColorProperty.xml b/xml/System.Windows.Forms.VisualStyles/ColorProperty.xml index f192fdae9e0..35ff5a7a690 100644 --- a/xml/System.Windows.Forms.VisualStyles/ColorProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/ColorProperty.xml @@ -23,11 +23,11 @@ Identifies the color properties of a visual style element. - enumeration represents a set of color properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of color properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ComboBoxState.xml b/xml/System.Windows.Forms.VisualStyles/ComboBoxState.xml index f0420eaff02..0ec0377673a 100644 --- a/xml/System.Windows.Forms.VisualStyles/ComboBoxState.xml +++ b/xml/System.Windows.Forms.VisualStyles/ComboBoxState.xml @@ -23,11 +23,11 @@ Specifies the visual state of a combo box that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the and methods. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the and methods. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ContentAlignment.xml b/xml/System.Windows.Forms.VisualStyles/ContentAlignment.xml index 0b85b92f61a..8f5b04b08cb 100644 --- a/xml/System.Windows.Forms.VisualStyles/ContentAlignment.xml +++ b/xml/System.Windows.Forms.VisualStyles/ContentAlignment.xml @@ -23,11 +23,11 @@ Specifies how text is aligned in a window caption. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/EdgeEffects.xml b/xml/System.Windows.Forms.VisualStyles/EdgeEffects.xml index 12da9851909..b91096b48a9 100644 --- a/xml/System.Windows.Forms.VisualStyles/EdgeEffects.xml +++ b/xml/System.Windows.Forms.VisualStyles/EdgeEffects.xml @@ -29,11 +29,11 @@ Specifies the visual effects that can be applied to the edges of a visual style element. - values are used as argument values in the method. - + values are used as argument values in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/EdgeStyle.xml b/xml/System.Windows.Forms.VisualStyles/EdgeStyle.xml index f3f217ba10d..c38a7ed799d 100644 --- a/xml/System.Windows.Forms.VisualStyles/EdgeStyle.xml +++ b/xml/System.Windows.Forms.VisualStyles/EdgeStyle.xml @@ -23,11 +23,11 @@ Specifies the styles that can be applied to the edges of a visual style element. - values are used as argument values in the method. - + values are used as argument values in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/Edges.xml b/xml/System.Windows.Forms.VisualStyles/Edges.xml index c88e528232d..8810e5c49b9 100644 --- a/xml/System.Windows.Forms.VisualStyles/Edges.xml +++ b/xml/System.Windows.Forms.VisualStyles/Edges.xml @@ -29,11 +29,11 @@ Specifies which edges of a visual style element to draw. - values are used as argument values in the method. - + values are used as argument values in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/EnumProperty.xml b/xml/System.Windows.Forms.VisualStyles/EnumProperty.xml index 191b943c87b..9023e039668 100644 --- a/xml/System.Windows.Forms.VisualStyles/EnumProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/EnumProperty.xml @@ -23,11 +23,11 @@ Identifies the enumerated type properties of a visual style element. - enumeration represents a set of enumerated properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of enumerated properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/FilenameProperty.xml b/xml/System.Windows.Forms.VisualStyles/FilenameProperty.xml index 913bf5fe104..32a6a3cd56f 100644 --- a/xml/System.Windows.Forms.VisualStyles/FilenameProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/FilenameProperty.xml @@ -23,11 +23,11 @@ Identifies the names of the image files that are used to draw a visual style element. - enumeration represents the names of image files that are used to draw visual style elements. The values are used as an argument in the method to specify which file name property to retrieve for the element that the currently represents. - + enumeration represents the names of image files that are used to draw visual style elements. The values are used as an argument in the method to specify which file name property to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/FillType.xml b/xml/System.Windows.Forms.VisualStyles/FillType.xml index ad3ca16b45d..71754744c9b 100644 --- a/xml/System.Windows.Forms.VisualStyles/FillType.xml +++ b/xml/System.Windows.Forms.VisualStyles/FillType.xml @@ -23,11 +23,11 @@ Specifies the interior of visual style elements with a filled border background. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/FontProperty.xml b/xml/System.Windows.Forms.VisualStyles/FontProperty.xml index 8d41b602b82..91716283ec3 100644 --- a/xml/System.Windows.Forms.VisualStyles/FontProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/FontProperty.xml @@ -23,11 +23,11 @@ Identifies the font properties of a visual style element. - enumeration represents a set of font properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of font properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/GlyphFontSizingType.xml b/xml/System.Windows.Forms.VisualStyles/GlyphFontSizingType.xml index add5593a03d..7aaab409ead 100644 --- a/xml/System.Windows.Forms.VisualStyles/GlyphFontSizingType.xml +++ b/xml/System.Windows.Forms.VisualStyles/GlyphFontSizingType.xml @@ -23,11 +23,11 @@ Specifies when the visual style selects a different glyph font size. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/GlyphType.xml b/xml/System.Windows.Forms.VisualStyles/GlyphType.xml index 75fb7502328..85e77d012d4 100644 --- a/xml/System.Windows.Forms.VisualStyles/GlyphType.xml +++ b/xml/System.Windows.Forms.VisualStyles/GlyphType.xml @@ -23,11 +23,11 @@ Specifies the type of glyph for elements with a bitmap background. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/GroupBoxState.xml b/xml/System.Windows.Forms.VisualStyles/GroupBoxState.xml index d27e9cecf42..c5c9f9aa40d 100644 --- a/xml/System.Windows.Forms.VisualStyles/GroupBoxState.xml +++ b/xml/System.Windows.Forms.VisualStyles/GroupBoxState.xml @@ -23,11 +23,11 @@ Specifies the visual state of a group box that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/HitTestCode.xml b/xml/System.Windows.Forms.VisualStyles/HitTestCode.xml index 9c22684d770..b60d476e9a0 100644 --- a/xml/System.Windows.Forms.VisualStyles/HitTestCode.xml +++ b/xml/System.Windows.Forms.VisualStyles/HitTestCode.xml @@ -23,11 +23,11 @@ Describes the location of a point in the background specified by a visual style. - values represent the return values of the method. - + values represent the return values of the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/HitTestOptions.xml b/xml/System.Windows.Forms.VisualStyles/HitTestOptions.xml index 8829c567a2c..be706201b10 100644 --- a/xml/System.Windows.Forms.VisualStyles/HitTestOptions.xml +++ b/xml/System.Windows.Forms.VisualStyles/HitTestOptions.xml @@ -29,11 +29,11 @@ Specifies the options that can be used when performing a hit test on the background specified by a visual style. - values are used as an argument in the method. - + values are used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/HorizontalAlign.xml b/xml/System.Windows.Forms.VisualStyles/HorizontalAlign.xml index 716b16b8e5b..f78545ff41e 100644 --- a/xml/System.Windows.Forms.VisualStyles/HorizontalAlign.xml +++ b/xml/System.Windows.Forms.VisualStyles/HorizontalAlign.xml @@ -23,11 +23,11 @@ Specifies the horizontal alignment for visual style elements with a fixed size. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/IconEffect.xml b/xml/System.Windows.Forms.VisualStyles/IconEffect.xml index 2703844e235..ced7ef438b7 100644 --- a/xml/System.Windows.Forms.VisualStyles/IconEffect.xml +++ b/xml/System.Windows.Forms.VisualStyles/IconEffect.xml @@ -23,11 +23,11 @@ Specifies the visual effect that the visual style will apply to an icon. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ImageOrientation.xml b/xml/System.Windows.Forms.VisualStyles/ImageOrientation.xml index c96b5243fc9..e382555c02d 100644 --- a/xml/System.Windows.Forms.VisualStyles/ImageOrientation.xml +++ b/xml/System.Windows.Forms.VisualStyles/ImageOrientation.xml @@ -23,11 +23,11 @@ Specifies how multiple images are arranged in a single image file. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ImageSelectType.xml b/xml/System.Windows.Forms.VisualStyles/ImageSelectType.xml index c0e4c5ac696..c3a2404e11f 100644 --- a/xml/System.Windows.Forms.VisualStyles/ImageSelectType.xml +++ b/xml/System.Windows.Forms.VisualStyles/ImageSelectType.xml @@ -23,13 +23,13 @@ Specifies when the visual style selects a different multiple-image file to draw an element. - values through . The values indicate when the visual style selects a different image file to draw the element. - - The values represent the return values of the method when it is called with an argument value of . - + values through . The values indicate when the visual style selects a different image file to draw the element. + + The values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/IntegerProperty.xml b/xml/System.Windows.Forms.VisualStyles/IntegerProperty.xml index c0a99e6ad03..c33626bc6e6 100644 --- a/xml/System.Windows.Forms.VisualStyles/IntegerProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/IntegerProperty.xml @@ -23,11 +23,11 @@ Identifies the integer properties of a visual style element. - enumeration represents a set of integer properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of integer properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/MarginProperty.xml b/xml/System.Windows.Forms.VisualStyles/MarginProperty.xml index 3d8a57cfceb..565b9bc529d 100644 --- a/xml/System.Windows.Forms.VisualStyles/MarginProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/MarginProperty.xml @@ -23,11 +23,11 @@ Identifies the margin properties of a visual style element. - enumeration represents a set of margin properties that describe the placement of visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of margin properties that describe the placement of visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/OffsetType.xml b/xml/System.Windows.Forms.VisualStyles/OffsetType.xml index 776abd49930..2b412347eff 100644 --- a/xml/System.Windows.Forms.VisualStyles/OffsetType.xml +++ b/xml/System.Windows.Forms.VisualStyles/OffsetType.xml @@ -23,11 +23,11 @@ Specifies where an offset is applied to a window element. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/PointProperty.xml b/xml/System.Windows.Forms.VisualStyles/PointProperty.xml index 2319b076cc2..f9be65fc8d1 100644 --- a/xml/System.Windows.Forms.VisualStyles/PointProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/PointProperty.xml @@ -23,11 +23,11 @@ Identifies the point properties of a visual style element. - enumeration represents a set of point properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of point properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/PushButtonState.xml b/xml/System.Windows.Forms.VisualStyles/PushButtonState.xml index 716c8a51645..54658fe3a37 100644 --- a/xml/System.Windows.Forms.VisualStyles/PushButtonState.xml +++ b/xml/System.Windows.Forms.VisualStyles/PushButtonState.xml @@ -23,11 +23,11 @@ Specifies the visual state of a button that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/RadioButtonState.xml b/xml/System.Windows.Forms.VisualStyles/RadioButtonState.xml index e5e7a62eba0..6ca7957c40f 100644 --- a/xml/System.Windows.Forms.VisualStyles/RadioButtonState.xml +++ b/xml/System.Windows.Forms.VisualStyles/RadioButtonState.xml @@ -23,11 +23,11 @@ Specifies the visual state of an option button (also known as a radio button) that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ScrollBarArrowButtonState.xml b/xml/System.Windows.Forms.VisualStyles/ScrollBarArrowButtonState.xml index 1c930724c13..c93ad2a5044 100644 --- a/xml/System.Windows.Forms.VisualStyles/ScrollBarArrowButtonState.xml +++ b/xml/System.Windows.Forms.VisualStyles/ScrollBarArrowButtonState.xml @@ -23,11 +23,11 @@ Specifies the visual state of a scroll arrow that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ScrollBarSizeBoxState.xml b/xml/System.Windows.Forms.VisualStyles/ScrollBarSizeBoxState.xml index 80f8b137060..592c9f556df 100644 --- a/xml/System.Windows.Forms.VisualStyles/ScrollBarSizeBoxState.xml +++ b/xml/System.Windows.Forms.VisualStyles/ScrollBarSizeBoxState.xml @@ -23,11 +23,11 @@ Specifies the visual state of a scroll bar sizing handle that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/SizingType.xml b/xml/System.Windows.Forms.VisualStyles/SizingType.xml index 051ee3be57c..f4f44f6f33e 100644 --- a/xml/System.Windows.Forms.VisualStyles/SizingType.xml +++ b/xml/System.Windows.Forms.VisualStyles/SizingType.xml @@ -23,11 +23,11 @@ Specifies how elements with a bitmap background will adjust to fill a bounds. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/StringProperty.xml b/xml/System.Windows.Forms.VisualStyles/StringProperty.xml index d9c364f23da..556173d47c6 100644 --- a/xml/System.Windows.Forms.VisualStyles/StringProperty.xml +++ b/xml/System.Windows.Forms.VisualStyles/StringProperty.xml @@ -23,11 +23,11 @@ Identifies the string properties of a visual style element. - enumeration represents a set of string properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. - + enumeration represents a set of string properties that describe visual style elements. The values are used as an argument in the method to specify which property value to retrieve for the element that the currently represents. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/TabItemState.xml b/xml/System.Windows.Forms.VisualStyles/TabItemState.xml index 42fea22ebd4..8101c2daa88 100644 --- a/xml/System.Windows.Forms.VisualStyles/TabItemState.xml +++ b/xml/System.Windows.Forms.VisualStyles/TabItemState.xml @@ -23,25 +23,25 @@ Specifies the visual state of a tab item that is drawn with visual styles. - values correspond to the states of the objects exposed by the following classes: - -- - -- - -- - -- - -- - -- - - The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the following classes: + +- + +- + +- + +- + +- + +- + + The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/TextBoxState.xml b/xml/System.Windows.Forms.VisualStyles/TextBoxState.xml index 99e69b47de2..76cba2d5dc1 100644 --- a/xml/System.Windows.Forms.VisualStyles/TextBoxState.xml +++ b/xml/System.Windows.Forms.VisualStyles/TextBoxState.xml @@ -23,11 +23,11 @@ Specifies the visual state of a text box that is drawn with visual styles. - values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. - + values correspond to the states of the objects exposed by the class. The values are also used as an argument in the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/TextMetrics.xml b/xml/System.Windows.Forms.VisualStyles/TextMetrics.xml index 5b7bc6c4570..f1c92ac4eaf 100644 --- a/xml/System.Windows.Forms.VisualStyles/TextMetrics.xml +++ b/xml/System.Windows.Forms.VisualStyles/TextMetrics.xml @@ -36,11 +36,11 @@ Provides basic information about the font specified by a visual style for a particular element. - structure specifies the return values of the method. - + structure specifies the return values of the method. + ]]> @@ -89,11 +89,11 @@ Gets or sets the ascent of characters in the font. The ascent of characters in the font. - @@ -142,11 +142,11 @@ Gets or sets the average width of characters in the font. The average width of characters in the font. - @@ -333,11 +333,11 @@ Gets or sets the descent of characters in the font. The descent of characters in the font. - @@ -478,11 +478,11 @@ Gets or sets the amount of extra leading that the application adds between rows. The amount of extra leading (space) required between rows. - @@ -577,11 +577,11 @@ Gets or sets the height of characters in the font. The height of characters in the font. - plus the . - + plus the . + ]]> @@ -630,11 +630,11 @@ Gets or sets the amount of leading inside the bounds set by the property. The amount of leading inside the bounds set by the property. - diff --git a/xml/System.Windows.Forms.VisualStyles/TextShadowType.xml b/xml/System.Windows.Forms.VisualStyles/TextShadowType.xml index 642c44501a0..12bcf2afcd6 100644 --- a/xml/System.Windows.Forms.VisualStyles/TextShadowType.xml +++ b/xml/System.Windows.Forms.VisualStyles/TextShadowType.xml @@ -23,11 +23,11 @@ Specifies the type of shadow to add to text. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/ThemeSizeType.xml b/xml/System.Windows.Forms.VisualStyles/ThemeSizeType.xml index 44c47d101ea..10e39f944d3 100644 --- a/xml/System.Windows.Forms.VisualStyles/ThemeSizeType.xml +++ b/xml/System.Windows.Forms.VisualStyles/ThemeSizeType.xml @@ -35,11 +35,11 @@ Specifies the size of the visual style part to retrieve. - values are used as an argument for the method. - + values are used as an argument for the method. + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/TrueSizeScalingType.xml b/xml/System.Windows.Forms.VisualStyles/TrueSizeScalingType.xml index f4098f1c3d8..71cf5310832 100644 --- a/xml/System.Windows.Forms.VisualStyles/TrueSizeScalingType.xml +++ b/xml/System.Windows.Forms.VisualStyles/TrueSizeScalingType.xml @@ -23,11 +23,11 @@ Specifies the scaling type of a visual style element with a fixed size. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/VerticalAlignment.xml b/xml/System.Windows.Forms.VisualStyles/VerticalAlignment.xml index 19ccc62e958..d9586797869 100644 --- a/xml/System.Windows.Forms.VisualStyles/VerticalAlignment.xml +++ b/xml/System.Windows.Forms.VisualStyles/VerticalAlignment.xml @@ -23,11 +23,11 @@ Specifies the vertical alignment for visual style elements with a fixed size. - values represent the return values of the method when it is called with an argument value of . - + values represent the return values of the method when it is called with an argument value of . + ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/VisualStyleElement.xml b/xml/System.Windows.Forms.VisualStyles/VisualStyleElement.xml index 183710da381..a964bd73755 100644 --- a/xml/System.Windows.Forms.VisualStyles/VisualStyleElement.xml +++ b/xml/System.Windows.Forms.VisualStyles/VisualStyleElement.xml @@ -43,7 +43,7 @@ The namespace exposes hundreds of objects that represent the controls and user interface elements that can be defined by a visual style. These objects are exposed as `static` properties of nested classes of . For each property, the qualified name of the owning class represents the class and the part of the drawn element, and the property name represents the state of the element. For example, the property returns a that can be used to draw a button in the pressed state with visual styles. The `Pressed` property name corresponds to the state, `PushButton` corresponds to the part, and `Button` identifies the class of the visual style element. - To draw a visual style element, create a , set it to the you wish to draw, and then call the method. To determine whether the current visual style provides a definition for a particular element, call the method with the element as the argument. + To draw a visual style element, create a , set it to the you wish to draw, and then call the method. To determine whether the current visual style provides a definition for a particular element, call the method with the element as the argument. and wrap the functionality of the visual styles API from the Windows Shell portion of the Windows Platform SDK. For more information on visual styles, see [Visual Styles](https://learn.microsoft.com/windows/win32/controls/themes-overview). diff --git a/xml/System.Windows.Forms.VisualStyles/VisualStyleInformation.xml b/xml/System.Windows.Forms.VisualStyles/VisualStyleInformation.xml index b7f76e6c9ab..a5eccf6541e 100644 --- a/xml/System.Windows.Forms.VisualStyles/VisualStyleInformation.xml +++ b/xml/System.Windows.Forms.VisualStyles/VisualStyleInformation.xml @@ -188,7 +188,7 @@ and properties internally. + This property checks the values of the and properties internally. ]]> @@ -406,7 +406,7 @@ and properties internally. + This property checks the values of the and properties internally. ]]> @@ -479,7 +479,7 @@ and properties internally. + This property checks the values of the and properties internally. ]]> @@ -515,7 +515,7 @@ and . This property checks the values of the and properties internally. + This property specifies the border color of controls such as and . This property checks the values of the and properties internally. ]]> diff --git a/xml/System.Windows.Forms.VisualStyles/VisualStyleRenderer.xml b/xml/System.Windows.Forms.VisualStyles/VisualStyleRenderer.xml index 1c14eb4e6ee..208b7b2dcd6 100644 --- a/xml/System.Windows.Forms.VisualStyles/VisualStyleRenderer.xml +++ b/xml/System.Windows.Forms.VisualStyles/VisualStyleRenderer.xml @@ -33,11 +33,11 @@ namespace exposes objects that represent all of the controls and user interface (UI) elements that are supported by visual styles. To draw or get information about a particular element, you must set a to the element you are interested in. A is automatically set to a specified in the constructor, but you can also set an existing to a different element by calling the method. + The namespace exposes objects that represent all of the controls and user interface (UI) elements that are supported by visual styles. To draw or get information about a particular element, you must set a to the element you are interested in. A is automatically set to a specified in the constructor, but you can also set an existing to a different element by calling the method. - To draw an element, use the method. The class also includes methods, such as and , that provide information about how an element is defined by the current visual style. + To draw an element, use the method. The class also includes methods, such as and , that provide information about how an element is defined by the current visual style. - The constructor and many of the methods throw exceptions unless visual styles are enabled in the operating system and visual styles are applied to the client area of application windows. To check for these conditions, use the `static` property. + The constructor and many of the methods throw exceptions unless visual styles are enabled in the operating system and visual styles are applied to the client area of application windows. To check for these conditions, use the `static` property. The class wraps the functionality of the visual styles (UxTheme) API from the Windows Shell portion of the Windows Platform SDK. @@ -95,12 +95,12 @@ , , and properties of the `element` parameter to initialize the , , and properties. + This constructor uses the , , and properties of the `element` parameter to initialize the , , and properties. - Before using this constructor, you should call the `static` method to verify whether the current visual style provides a definition for the element specified by the `element` parameter. + Before using this constructor, you should call the `static` method to verify whether the current visual style provides a definition for the element specified by the `element` parameter. ## Examples - The following code example demonstrates how to use the constructor to create a . This code example is part of a larger code example provided for the class overview. + The following code example demonstrates how to use the constructor to create a . This code example is part of a larger code example provided for the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.VisualStyles/VisualStyleRenderer/Overview/form1.cs" id="Snippet40"::: @@ -155,9 +155,9 @@ , , and properties. + This constructor uses the `className`, `part`, and `state` parameters to initialize the , , and properties. - Before using this constructor, you should call the `static` method to verify whether the current visual style provides a definition for the element specified by the `className`, `part`, and `state` parameters. + Before using this constructor, you should call the `static` method to verify whether the current visual style provides a definition for the element specified by the `className`, `part`, and `state` parameters. ]]> @@ -260,16 +260,16 @@ , , and properties. + This method draws the background of the current visual style element specified by the , , and properties. - If the or of the rectangle specified by the `bounds` parameter is less than 0, the method will return without drawing the background. + If the or of the rectangle specified by the `bounds` parameter is less than 0, the method will return without drawing the background. - The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call the method with an argument value of . To determine whether the element background will scale to fit the specified bounds, call the method with an argument value of . + The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call the method with an argument value of . To determine whether the element background will scale to fit the specified bounds, call the method with an argument value of . ## Examples - The following code example demonstrates how to use the method to a draw a within a custom control's method. This code example is part of a larger example provided for the class overview. + The following code example demonstrates how to use the method to a draw a within a custom control's method. This code example is part of a larger example provided for the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.VisualStyles/VisualStyleRenderer/Overview/form1.cs" id="Snippet20"::: @@ -318,11 +318,11 @@ , , and properties. The background will be clipped to the area specified by the `clipRectangle` parameter. + This method draws the background of the current visual style element specified by the , , and properties. The background will be clipped to the area specified by the `clipRectangle` parameter. - If the or of the rectangle specified by either the `bounds` or `clipRectangle` parameters is less than 0, the method will return without drawing the background. + If the or of the rectangle specified by either the `bounds` or `clipRectangle` parameters is less than 0, the method will return without drawing the background. - The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call the method with an argument value of . To determine whether the element background will scale to fit the specified bounds, call the method with an argument value of . + The background of a visual style element can be a bitmap file or a filled border. To determine the background type, call the method with an argument value of . To determine whether the element background will scale to fit the specified bounds, call the method with an argument value of . ]]> @@ -817,7 +817,7 @@ ## Examples - The following code example demonstrates how to use the method in a custom control. This example uses to get the of the window title bar element returned by the property. This is used to set the property of the control, so that the window title bar will appear with the rounded corners defined by the standard Windows XP visual style. This code example is part of a larger example provided for the class overview. + The following code example demonstrates how to use the method in a custom control. This example uses to get the of the window title bar element returned by the property. This is used to set the property of the control, so that the window title bar will appear with the rounded corners defined by the standard Windows XP visual style. This code example is part of a larger example provided for the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp" id="Snippet30"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.VisualStyles/VisualStyleRenderer/Overview/form1.cs" id="Snippet30"::: @@ -1183,7 +1183,7 @@ ## Examples - The following code example demonstrates how to use the method in a custom control to get the sizes of a window title bar, **Close** button, borders, and sizing handle specified by the visual style. These sizes are used to calculate the sizes of the objects used to draw the objects that represent these window parts. This code example is part of a larger example provided for the class overview. + The following code example demonstrates how to use the method in a custom control to get the sizes of a window title bar, **Close** button, borders, and sizing handle specified by the visual style. These sizes are used to calculate the sizes of the objects used to draw the objects that represent these window parts. This code example is part of a larger example provided for the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.VisualStyles/VisualStyleRenderer/Overview/form1.cs" id="Snippet10"::: @@ -1277,7 +1277,7 @@ ## Examples - The following code example demonstrates how to use the method in a custom control to get the offset of the window **Close** button in relation to the upper-right corner of the title bar. This code example is part of a larger example provided for the class overview. + The following code example demonstrates how to use the method in a custom control to get the offset of the window **Close** button in relation to the upper-right corner of the title bar. This code example is part of a larger example provided for the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.VisualStyles/VisualStyleRenderer/Overview/form1.cs" id="Snippet10"::: @@ -1709,7 +1709,7 @@ ## Examples - The following code example demonstrates how to use the method to determine whether to initialize a to a given . This code example is part of a larger example provided for the class overview. + The following code example demonstrates how to use the method to determine whether to initialize a to a given . This code example is part of a larger example provided for the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.VisualStyles/VisualStyleRenderer/Overview/form1.cs" id="Snippet40"::: @@ -1897,12 +1897,12 @@ property internally. Before calling this method, you should call the method to verify that the current visual style provides a definition for the element specified by the `element` parameter. + This method checks the value of the property internally. Before calling this method, you should call the method to verify that the current visual style provides a definition for the element specified by the `element` parameter. ## Examples - The following code example demonstrates how to use the method to set a to a new . This code example is part of a larger example provided for the class overview. + The following code example demonstrates how to use the method to set a to a new . This code example is part of a larger example provided for the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.VisualStyles.VisualStyleRenderer/cpp/form1.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms.VisualStyles/VisualStyleRenderer/Overview/form1.cs" id="Snippet40"::: @@ -1960,7 +1960,7 @@ property internally. Before calling this method, you should call the method to verify that the current visual style provides a definition for the element specified by the `className`, `part`, and `state` parameters. + This method checks the value of the property internally. Before calling this method, you should call the method to verify that the current visual style provides a definition for the element specified by the `className`, `part`, and `state` parameters. ]]> @@ -2012,7 +2012,7 @@ and property values. For more information about the class, part, and state of a visual style element, see the class. + This property identifies the current visual state of the element identified by the current and property values. For more information about the class, part, and state of a visual style element, see the class. ]]> diff --git a/xml/System.Windows.Forms/AccessibleEvents.xml b/xml/System.Windows.Forms/AccessibleEvents.xml index c1194c4f2b0..87df7258fea 100644 --- a/xml/System.Windows.Forms/AccessibleEvents.xml +++ b/xml/System.Windows.Forms/AccessibleEvents.xml @@ -24,24 +24,24 @@ Specifies events that are reported by accessible applications. - and . - + and . + For more information, see [Microsoft Active Accessibility](/windows/win32/winauto/microsoft-active-accessibility). - -## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - - This example demonstrates using the enumeration with the method. See the class overview for the complete code example. - + +## Examples + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + + This example demonstrates using the enumeration with the method. See the class overview for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet5"::: + ]]> diff --git a/xml/System.Windows.Forms/AccessibleNavigation.xml b/xml/System.Windows.Forms/AccessibleNavigation.xml index 2a651064823..425b4e9c4d5 100644 --- a/xml/System.Windows.Forms/AccessibleNavigation.xml +++ b/xml/System.Windows.Forms/AccessibleNavigation.xml @@ -24,26 +24,26 @@ Specifies values for navigating among accessible objects. - uses this enumeration. - + uses this enumeration. + For more information, see [Microsoft Active Accessibility](/windows/win32/winauto/microsoft-active-accessibility). - - - -## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - - This example demonstrates using the enumeration with the method. See the class overview for the complete code example. - + + + +## Examples + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + + This example demonstrates using the enumeration with the method. See the class overview for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet4"::: + ]]> diff --git a/xml/System.Windows.Forms/AccessibleObject.xml b/xml/System.Windows.Forms/AccessibleObject.xml index 4c42f0fc45b..c7112f347c8 100644 --- a/xml/System.Windows.Forms/AccessibleObject.xml +++ b/xml/System.Windows.Forms/AccessibleObject.xml @@ -76,7 +76,7 @@ ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet1"::: @@ -299,7 +299,7 @@ method can return. + The following table describes the object types that the method can return. |Type|Description| |----------|-----------------| @@ -404,7 +404,7 @@ method can return. + The following table describes the object types that the method can return. |Type|Description| |----------|-----------------| @@ -606,12 +606,12 @@ property retrieves the object's bounding rectangle in screen coordinates. If the object has a nonrectangular shape, then this property represents the smallest rectangle that completely encompasses the entire object region. Therefore, for nonrectangular objects such as list view items, the coordinates of the object's bounding rectangle can fail, if tested, by calling the method, because determines the object's boundaries on a pixel-by-pixel basis. + The property retrieves the object's bounding rectangle in screen coordinates. If the object has a nonrectangular shape, then this property represents the smallest rectangle that completely encompasses the entire object region. Therefore, for nonrectangular objects such as list view items, the coordinates of the object's bounding rectangle can fail, if tested, by calling the method, because determines the object's boundaries on a pixel-by-pixel basis. ## Examples - The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code excerpt demonstrates overriding the property. See the class overview for the complete code example. @@ -781,7 +781,7 @@ property. A client can use automation (if supported) instead of to perform an object's default action. However, provides an easy way to perform an object's most commonly used action. + Clients can retrieve the object's default action by inspecting an object's property. A client can use automation (if supported) instead of to perform an object's default action. However, provides an easy way to perform an object's most commonly used action. ]]> @@ -827,9 +827,9 @@ and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code excerpt demonstrates overriding the method. See the class overview for the complete code example. + This code excerpt demonstrates overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet4"::: @@ -874,9 +874,9 @@ and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code demonstrates shows overriding the method. See the class overview for the complete code example. + This code demonstrates shows overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet4"::: @@ -971,7 +971,7 @@ using the Windows Help system, you can pass the file name and topic ID to the appropriate method of . + To display help for the using the Windows Help system, you can pass the file name and topic ID to the appropriate method of . ]]> @@ -1107,7 +1107,7 @@ can fail if tested with , because determines the object's boundaries on a pixel-by-pixel basis. + For nonrectangular objects such as list view items, the coordinates of the object's bounding rectangle retrieved by can fail if tested with , because determines the object's boundaries on a pixel-by-pixel basis. ]]> @@ -1212,12 +1212,12 @@ property is a string used by clients to identify, find, or announce an object for the user. To access the name of a child object, you must first call with the index of the child whose name you are retrieving. + The property is a string used by clients to identify, find, or announce an object for the user. To access the name of a child object, you must first call with the index of the child whose name you are retrieving. ## Examples - The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code excerpt demonstrates overriding the property. See the class overview for the complete code example. @@ -1280,14 +1280,14 @@ . The method retrieves only user interface elements that have a defined screen location. + Navigation, both spatial and logical, is always restricted to the user interface elements within a container. With spatial navigation, clients can navigate only to a sibling of the starting object. Depending on the navigational flag used with logical navigation, clients can navigate to either a child or to a sibling of the starting object. This method does not change the selection or focus. To change the focus or to select an object, use . The method retrieves only user interface elements that have a defined screen location. ## Examples - The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code demonstrates shows overriding the method. See the class overview for the complete code example. + This code demonstrates shows overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet6"::: @@ -1339,7 +1339,7 @@ and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code excerpt demonstrates overriding the property. See the class overview for the complete code example. @@ -1484,7 +1484,7 @@ This method must be overridden in derived classes that support the UI automation ## Examples - The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code excerpt demonstrates overriding the property. See the class overview for the complete code example. @@ -1544,7 +1544,7 @@ This method must be overridden in derived classes that support the UI automation ## Remarks Applications can use this method to perform complex selection operations. - The following describes which values to specify when calling to perform complex selection operations. + The following describes which values to specify when calling to perform complex selection operations. |Operation|Flag Combination| |---------------|----------------------| @@ -1552,15 +1552,15 @@ This method must be overridden in derived classes that support the UI automation |To select a target item by simulating CTRL + click| `OR` | |To cancel selection of a target item by simulating CTRL + click| `OR` | |To simulate SHIFT + click| `OR` | -|To select a range of objects and put focus on the last object|Specify on the starting object to set the selection anchor. Then call again and specify `OR` on the last object.| -|To deselect all objects|Specify on any object. This flag deselects all selected objects except the one just selected. Then call again and specify on the same object.| +|To select a range of objects and put focus on the last object|Specify on the starting object to set the selection anchor. Then call again and specify `OR` on the last object.| +|To deselect all objects|Specify on any object. This flag deselects all selected objects except the one just selected. Then call again and specify on the same object.| ## Examples - The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code demonstrates shows overriding the method. See the class overview for the complete code example. + This code demonstrates shows overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet6"::: @@ -1605,7 +1605,7 @@ This method must be overridden in derived classes that support the UI automation and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not have any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code excerpt demonstrates overriding the property. See the class overview for the complete code example. diff --git a/xml/System.Windows.Forms/AccessibleRole.xml b/xml/System.Windows.Forms/AccessibleRole.xml index 76467db1f2d..dfcf0257e0a 100644 --- a/xml/System.Windows.Forms/AccessibleRole.xml +++ b/xml/System.Windows.Forms/AccessibleRole.xml @@ -29,14 +29,14 @@ ## Remarks The role of the object describes the function of the object and is used by accessibility applications. - This enumeration is used by and + This enumeration is used by and For additional information about the accessibility application, search for "Microsoft Active Accessibility" in the Microsoft Developer Network (MSDN) library. ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This example demonstrates using the enumeration with the property. See the class overview for the complete code example. diff --git a/xml/System.Windows.Forms/AccessibleSelection.xml b/xml/System.Windows.Forms/AccessibleSelection.xml index 6950aef4f22..d2e5c43d83e 100644 --- a/xml/System.Windows.Forms/AccessibleSelection.xml +++ b/xml/System.Windows.Forms/AccessibleSelection.xml @@ -30,26 +30,26 @@ Specifies how an accessible object is selected or receives focus. - . - - For additional information on the accessibility application, search for "Microsoft Active Accessibility" in the Microsoft Developer Network (MSDN) library. - - - -## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - - This example demonstrates using the enumeration with the method. See the class overview for the complete code example. - + . + + For additional information on the accessibility application, search for "Microsoft Active Accessibility" in the Microsoft Developer Network (MSDN) library. + + + +## Examples + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + + This example demonstrates using the enumeration with the method. See the class overview for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet4"::: + ]]> diff --git a/xml/System.Windows.Forms/AccessibleStates.xml b/xml/System.Windows.Forms/AccessibleStates.xml index ca806709e5f..d51ab1c07cc 100644 --- a/xml/System.Windows.Forms/AccessibleStates.xml +++ b/xml/System.Windows.Forms/AccessibleStates.xml @@ -37,7 +37,7 @@ ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual control based on , but instead is drawn by the chart control, it does not contain any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual control based on , but instead is drawn by the chart control, it does not contain any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code excerpt demonstrates using the enumeration with the property. See the class overview for the complete code example. diff --git a/xml/System.Windows.Forms/AmbientProperties.xml b/xml/System.Windows.Forms/AmbientProperties.xml index f41abd7db11..6bb129a55e9 100644 --- a/xml/System.Windows.Forms/AmbientProperties.xml +++ b/xml/System.Windows.Forms/AmbientProperties.xml @@ -34,7 +34,7 @@ property. If the control is not sited, the site does not support ambient properties, or the property is not set on the object, the uses its own default values. Some objects derived from the class might set the property even if you do not. For example, the class always sets the and properties. + An ambient property is a property on a control that, if not set, is retrieved from the parent control. If the control does not have a parent and the property is not set, the control tries to find the value of the ambient property through the property. If the control is not sited, the site does not support ambient properties, or the property is not set on the object, the uses its own default values. Some objects derived from the class might set the property even if you do not. For example, the class always sets the and properties. ]]> diff --git a/xml/System.Windows.Forms/AnchorStyles.xml b/xml/System.Windows.Forms/AnchorStyles.xml index 51a4b2ae692..43120e66c24 100644 --- a/xml/System.Windows.Forms/AnchorStyles.xml +++ b/xml/System.Windows.Forms/AnchorStyles.xml @@ -50,7 +50,7 @@ ## Examples - The following example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example assumes you have an named `imageList1`. + The following example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example assumes you have an named `imageList1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet3"::: diff --git a/xml/System.Windows.Forms/Application+MessageLoopCallback.xml b/xml/System.Windows.Forms/Application+MessageLoopCallback.xml index 17104a24b25..2fa0e3d902b 100644 --- a/xml/System.Windows.Forms/Application+MessageLoopCallback.xml +++ b/xml/System.Windows.Forms/Application+MessageLoopCallback.xml @@ -35,11 +35,11 @@ if the hosting environment is still sending messages; otherwise, . - method. - + method. + ]]> diff --git a/xml/System.Windows.Forms/Application.xml b/xml/System.Windows.Forms/Application.xml index 5a8fa5554ee..09a310df11f 100644 --- a/xml/System.Windows.Forms/Application.xml +++ b/xml/System.Windows.Forms/Application.xml @@ -36,17 +36,17 @@ ## Remarks The class has methods to start and stop applications and threads, and to process Windows messages, as follows: -- starts an application message loop on the current thread and, optionally, makes a form visible. +- starts an application message loop on the current thread and, optionally, makes a form visible. -- or stops a message loop. +- or stops a message loop. -- processes messages while your program is in a loop. +- processes messages while your program is in a loop. -- adds a message filter to the application message pump to monitor Windows messages. +- adds a message filter to the application message pump to monitor Windows messages. - lets you stop an event from being raised or perform special operations before invoking an event handler. - This class has and properties to get or set culture information for the current thread. + This class has and properties to get or set culture information for the current thread. You cannot create an instance of this class. @@ -55,10 +55,10 @@ ## Examples The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. - The `Main` method calls to start the application, which creates the form, `listBox1` and `button1`. When the user clicks `button1`, the `button1_Click` method displays a . If the user clicks `No` on the , the `button1_Click` method adds a number to the list. If the user clicks `Yes`, the application calls to process all remaining messages in the queue and then to quit. + The `Main` method calls to start the application, which creates the form, `listBox1` and `button1`. When the user clicks `button1`, the `button1_Click` method displays a . If the user clicks `No` on the , the `button1_Click` method adds a number to the list. If the user clicks `Yes`, the application calls to process all remaining messages in the queue and then to quit. > [!NOTE] -> The call to will fail in partial trust. +> The call to will fail in partial trust. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/Overview/source.cs" id="Snippet1"::: @@ -105,7 +105,7 @@ ## Remarks Use a message filter to prevent specific events from being raised or to perform special operations for an event before it is passed to an event handler. Message filters are unique to a specific thread. - To prevent a message from being dispatched, the `value` parameter instance that you pass to this method must override the method with the code to handle the message. The method must return `false`. + To prevent a message from being dispatched, the `value` parameter instance that you pass to this method must override the method with the code to handle the message. The method must return `false`. > [!CAUTION] > Adding message filters to the message pump for an application can degrade performance. @@ -207,7 +207,7 @@ ## Examples The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates using the `ApplicationExit` event to know when the form positions should be persisted to the file, and when the `FileStream` should be closed. - The class `MyApplicationContext` inherits from and keeps track of when each form is closed, and exits the current thread when they both are. The class remembers the position of each form when it is closed. When the `ApplicationExit` event occurs, the class writes the positions of each for the user to the file. The form position data is stored in a file titled `appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + The class `MyApplicationContext` inherits from and keeps track of when each form is closed, and exits the current thread when they both are. The class remembers the position of each form when it is closed. When the `ApplicationExit` event occurs, the class writes the positions of each for the user to the file. The form position data is stored in a file titled `appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . This code is an excerpt from the example shown in the class overview. See for the whole code listing. @@ -283,9 +283,9 @@ ## Remarks If a path does not exist, one is created in the following format: - *Base Path*\\\\\\ + *Base Path*\\\\\\ - first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. + first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. The path will be different depending on whether the Windows Forms application is deployed using ClickOnce. ClickOnce applications are stored in a per-user application cache in the C:\Documents and Settings\\*username* directory. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). @@ -327,7 +327,7 @@ ## Remarks If the key does not exist, it is created in the following format: - LocalMachine\Software\\\\\\ + LocalMachine\Software\\\\\\ ]]> @@ -502,9 +502,9 @@ ## Remarks When you run a Windows Form, it creates the new form, which then waits for events to handle. Each time the form handles an event, it processes all the code associated with that event. All other events wait in the queue. While your code handles the event, your application does not respond. For example, the window does not repaint if another window is dragged on top. - If you call in your code, your application can handle the other events. For example, if you have a form that adds data to a and add to your code, your form repaints when another window is dragged over it. If you remove from your code, your form will not repaint until the click event handler of the button is finished executing. For more information on messaging, see [User Input in Windows Forms](/dotnet/desktop/winforms/user-input-in-windows-forms). + If you call in your code, your application can handle the other events. For example, if you have a form that adds data to a and add to your code, your form repaints when another window is dragged over it. If you remove from your code, your form will not repaint until the click event handler of the button is finished executing. For more information on messaging, see [User Input in Windows Forms](/dotnet/desktop/winforms/user-input-in-windows-forms). - Unlike Visual Basic 6.0, the method does not call the method. + Unlike Visual Basic 6.0, the method does not call the method. Typically, you use this method in a loop to process messages. @@ -514,7 +514,7 @@ ## Examples - The following code example demonstrates using the method. When the example runs, a user can select graphics files from an . The selected files are displayed in the form. The method forces a repaint of the form for each graphics file opened. To run this example, paste the following code in a form containing a named `PictureBox1`, an named `OpenFileDialog1`, and a button named `fileButton`. Call the `InitializePictureBox` and `InitializeOpenFileDialog` methods from the form's constructor or `Load` method. + The following code example demonstrates using the method. When the example runs, a user can select graphics files from an . The selected files are displayed in the form. The method forces a repaint of the form for each graphics file opened. To run this example, paste the following code in a form containing a named `PictureBox1`, an named `OpenFileDialog1`, and a button named `fileButton`. Call the `InitializePictureBox` and `InitializeOpenFileDialog` methods from the form's constructor or `Load` method. > [!NOTE] > In Visual Studio, if you add an to your form by using a drag operation, you will have to modify the following `InitializeOpenFileDialog` method by removing the line that creates a new instance of . @@ -575,7 +575,7 @@ > This method has no effect for controls hosted in Internet Explorer. ## Examples - The following code example demonstrates calling in the `Main` function to enable visual styles for the application. + The following code example demonstrates calling in the `Main` function to enable visual styles for the application. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Application.EnableVisualStyles/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/EnableVisualStyles/form1.cs" id="Snippet1"::: @@ -635,7 +635,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. @@ -724,21 +724,21 @@ method stops all running message loops on all threads and closes all windows of the application. This method does not necessarily force the application to exit. The method is typically called from within a message loop, and forces to return. To exit a message loop for the current thread only, call . + The method stops all running message loops on all threads and closes all windows of the application. This method does not necessarily force the application to exit. The method is typically called from within a message loop, and forces to return. To exit a message loop for the current thread only, call . - raises the following events and performs the associated conditional actions: + raises the following events and performs the associated conditional actions: - A event is raised for every form represented by the property. This event can be canceled by setting the property of their parameter to `true`. -- If one of more of the handlers cancels the event, then returns without further action. Otherwise, a event is raised for every open form, then all running message loops and forms are closed. +- If one of more of the handlers cancels the event, then returns without further action. Otherwise, a event is raised for every open form, then all running message loops and forms are closed. > [!NOTE] -> The method does not raise the and events, which are obsolete. +> The method does not raise the and events, which are obsolete. ## Examples The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. - The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls , to process all remaining messages in the queue and then to quit. + The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls , to process all remaining messages in the queue and then to quit. The example requires that `listBox1` and `button1` have been instantiated and placed on a form. @@ -826,7 +826,7 @@ for the current thread to return. To exit the entire application, call . + Use this method to exit the message loop of the current thread. This method causes the call to for the current thread to return. To exit the entire application, call . ]]> @@ -946,7 +946,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a Windows Form and make sure that the event handler is associated with the event. @@ -1033,7 +1033,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. @@ -1077,16 +1077,16 @@ ## Remarks A local user is one whose user profile is stored on the system on which the user logged on. If a path does not exist, one is created in the following format: - *Base Path*\\\\\\ + *Base Path*\\\\\\ A typical base path is C:\Documents and Settings\\*username*\Local Settings\Application Data. This path will be different, however, if the Windows Forms application is deployed by using ClickOnce. ClickOnce creates its own application data directory that is isolated from all other applications. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications). ## Examples - The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. Although this example demonstrates using the property to store application data for the user, the can be used instead. + The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. Although this example demonstrates using the property to store application data for the user, the can be used instead. - The `MyApplicationContext` class inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + The `MyApplicationContext` class inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. @@ -1130,7 +1130,7 @@ to instruct Windows Forms if the hosting environment still has an active message loop. + When hosting Windows Forms in other environments, such as unmanaged applications, this property will always return `false`. Use to instruct Windows Forms if the hosting environment still has an active message loop. ]]> @@ -1168,7 +1168,7 @@ first checks to see if OLE has been initialized on the current thread. If not, it initializes the thread for OLE. + Call this method before calling any `Microsoft.Win32` method that requires OLE. first checks to see if OLE has been initialized on the current thread. If not, it initializes the thread for OLE. > [!NOTE] > Unless a thread calls OLE methods directly, you do not need to call this method. @@ -1211,11 +1211,11 @@ to raise an exception that will halt processing of the application. + Call to raise an exception that will halt processing of the application. - The class has a event. You can attach an event handler to this event to do whatever custom processing you need for unhandled exceptions. If you do not attach an event handler, will execute the default behavior, which involves displaying a dialog box to inform the user that there has been an error. + The class has a event. You can attach an event handler to this event to do whatever custom processing you need for unhandled exceptions. If you do not attach an event handler, will execute the default behavior, which involves displaying a dialog box to inform the user that there has been an error. - only implements default exception behavior for unhandled exceptions that occur on threads owned by Windows Forms. Unhandled exceptions on other threads are handled by the event. + only implements default exception behavior for unhandled exceptions that occur on threads owned by Windows Forms. Unhandled exceptions on other threads are handled by the event. ]]> @@ -1257,7 +1257,7 @@ property represents a read-only collection of forms owned by the application. This collection can be searched by index position or by the of the . + The property represents a read-only collection of forms owned by the application. This collection can be searched by index position or by the of the . ]]> @@ -1354,7 +1354,7 @@ ## Remarks Typically, a version number displays as *major number*.*minor number*.*build number*.*private part number*. You can set it explicitly by setting the assembly version within your assembly manifest. For more information, see [Assembly Manifest](/dotnet/standard/assembly/manifest). - first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. + first looks to see if the assembly containing the main executable has the `AssemblyInformationalVersion` attribute on it. If this attribute exists, it is used for both and . If this attribute does not exist, both properties use the version of the executable file instead. @@ -1411,7 +1411,7 @@ when the hosting application enters an idle state. This enables some Windows Forms controls and components to do important background work while the user is not interacting with the application. + This method is used when hosting Windows Forms in another environment, such as an unmanaged application. You should call when the hosting application enters an idle state. This enables some Windows Forms controls and components to do important background work while the user is not interacting with the application. ]]> @@ -1548,7 +1548,7 @@ ## Remarks If you are drawing a custom control, use this property to decide whether to draw the control with or without visual styles, so that its appearance is consistent with other controls in the application. - The following table shows the four conditions that must exist for to return `true`. + The following table shows the four conditions that must exist for to return `true`. |Condition|Description| |---------------|-----------------| @@ -1595,7 +1595,7 @@ Applications are restarted in the context in which they were initially run. If your application was started using a URL pointing directly to the application's main executable file, it will be restarted using the same URL. If your application is a ClickOnce application, it will be restarted using ClickOnce. - If your application was originally supplied command-line options when it first executed, will launch the application again with the same options. + If your application was originally supplied command-line options when it first executed, will launch the application again with the same options. ]]> @@ -1642,9 +1642,9 @@ method is called, or when the method is called on the thread that is running the main message loop. + In a Win32-based or Windows Forms application, a message loop is a routine in code that processes user events, such as mouse clicks and keyboard strokes. Every running Windows-based application requires an active message loop, called the main message loop. When the main message loop is closed, the application exits. In Windows Forms, this loop is closed when the method is called, or when the method is called on the thread that is running the main message loop. - Most Windows Forms developers will not need to use this version of the method. You should use the overload to start an application with a main form, so that the application terminates when the main form is closed. For all other situations, use the overload, which supports supplying an object for better control over the lifetime of the application. + Most Windows Forms developers will not need to use this version of the method. You should use the overload to start an application with a main form, so that the application terminates when the main form is closed. For all other situations, use the overload, which supports supplying an object for better control over the lifetime of the application. ]]> @@ -1688,14 +1688,14 @@ or is called or the event is raised on the context object. + The message loop runs until or is called or the event is raised on the context object. ## Examples The example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates how to use an , along with the `Application.Run(context)` method, to display multiple forms when the application starts. - The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . The code for the `AppForm1` and `AppForm2` forms is not shown for the purpose of brevity. See the class overview for the whole code listing. @@ -1747,17 +1747,17 @@ ## Remarks Typically, the main function of an application calls this method and passes to it the main window of the application. - This method adds an event handler to the `mainForm` parameter for the event. The event handler calls to clean up the application. + This method adds an event handler to the `mainForm` parameter for the event. The event handler calls to clean up the application. > [!NOTE] -> The method of the class will be called prior to the return of this method. +> The method of the class will be called prior to the return of this method. ## Examples The following code example lists numbers in a list box on a form. Each time you click `button1`, the application adds another number to the list. - The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls to process all remaining messages in the queue and then to quit. + The `Main` method calls to start the application, which creates the form, `listBox1`, and `button1`. When the user clicks `button1`, the `button1_Click` method adds numbers one to three to the list box, and displays a . If the user clicks **No** on the , the `button1_Click` method adds another number to the list. If the user clicks **Yes**, the application calls to process all remaining messages in the queue and then to quit. The example requires that `listBox1` and `button1` have been created and placed on a form. @@ -1884,20 +1884,20 @@ class, which is based on the GDI graphics library, or the class, which is based on the GDI+ graphics library. This change was made in .NET Framework 2.0 because of performance and localization issues with GDI+. Use to set the default value of the `UseCompatibleTextRendering` property for controls that support that property. + Certain Windows Forms controls can render their text using either the class, which is based on the GDI graphics library, or the class, which is based on the GDI+ graphics library. This change was made in .NET Framework 2.0 because of performance and localization issues with GDI+. Use to set the default value of the `UseCompatibleTextRendering` property for controls that support that property. The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the class and apps that perform custom text rendering using the class. In most cases, it's recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. - The GDI-based class was introduced in .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true`. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with an argument of `true`. + The GDI-based class was introduced in .NET Framework 2.0 to improve performance, make text look better, and improve support for international fonts. In earlier versions of .NET Framework, the GDI+ based class was used to perform all text rendering. GDI calculates character spacing and word wrapping differently from GDI+. In a Windows Forms application that uses the class to render text, this could cause the text for controls that use to appear different from the other text in the application. To resolve this incompatibility, you can set the `UseCompatibleTextRendering` property to `true`. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with an argument of `true`. You should never call this method if your Windows Forms code is hosted in another application, such as Internet Explorer. Only call this method in stand-alone Windows Forms applications. ## Examples > [!IMPORTANT] -> To set the default value for `UseCompatibleTextRendering` in Visual Basic 2005 or later, see . +> To set the default value for `UseCompatibleTextRendering` in Visual Basic 2005 or later, see . -For C# apps, Visual Studio automatically adds a call to in the *Program.cs* file. To change the text rendering default, modify the generated code. +For C# apps, Visual Studio automatically adds a call to in the *Program.cs* file. To change the text rendering default, modify the generated code. ```csharp static class Program @@ -2074,7 +2074,7 @@ The high DPI mode is set once per process. For more information about setting th so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. This example assumes that you have defined two controls, `button1` and `button2`, on your class. @@ -2127,14 +2127,14 @@ The high DPI mode is set once per process. For more information about setting th ## Remarks It is often not feasible to catch all of the exceptions thrown by Windows Forms. Using this method, you can instruct your application whether it should catch all unhandled exceptions thrown by Windows Forms components and continue operating, or whether it should expose them to the user and halt execution. - Call before you instantiate the main form of your application using the method. + Call before you instantiate the main form of your application using the method. To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. ## Examples - The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. This example assumes that you have defined two controls, `button1` and `button2`, on your class. @@ -2186,7 +2186,7 @@ The high DPI mode is set once per process. For more information about setting th ## Remarks It is often not feasible to catch all of the exceptions thrown by Windows Forms. Using this method, you can instruct your application whether it should catch all unhandled exceptions thrown by Windows Forms components and continue operating, or whether it should expose them to the user and halt execution. - Call before you instantiate the main form of your application using the method. + Call before you instantiate the main form of your application using the method. When `threadScope` is `true`, the thread exception mode is set. The thread exception mode overrides the application exception mode if `mode` is not set to . @@ -2197,7 +2197,7 @@ The high DPI mode is set once per process. For more information about setting th ## Examples - The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. This example assumes that you have defined two controls, `button1` and `button2`, on your class. @@ -2329,10 +2329,10 @@ The high DPI mode is set once per process. For more information about setting th ## Remarks This event allows your Windows Forms application to handle otherwise unhandled exceptions that occur in Windows Forms threads. Attach your event handler to the event to deal with these exceptions, which will leave your application in an unknown state. Where possible, exceptions should be handled by a structured exception handling block. - You can change whether this callback is used for unhandled Windows Forms thread exceptions by setting . To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. + You can change whether this callback is used for unhandled Windows Forms thread exceptions by setting . To catch exceptions that occur in threads not created and owned by Windows Forms, use the event handler. > [!NOTE] -> To guarantee that no activations of this event are missed, you must attach a handler before you call . +> To guarantee that no activations of this event are missed, you must attach a handler before you call . > [!NOTE] > Only one handler can be attached to this event. If multiple handlers are added, only the most recently added handler will be called on an unhandled exception. @@ -2343,7 +2343,7 @@ The high DPI mode is set once per process. For more information about setting th ## Examples - The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. + The following code example sets event handlers for exceptions that occur on Windows Forms threads and exceptions that occur on other threads. It sets so that all exceptions are handled by the application, regardless of the settings in the application's user configuration file. It uses the event to handle UI thread exceptions, and the event to handle non-UI thread exceptions. Since cannot prevent an application from terminating, the example simply logs the error in the application event log before termination. This example assumes that you have defined two controls, `button1` and `button2`, on your class. @@ -2400,7 +2400,7 @@ The high DPI mode is set once per process. For more information about setting th ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a Windows Forms and ensure that the event handler is associated with the event. @@ -2480,7 +2480,7 @@ The high DPI mode is set once per process. For more information about setting th ## Remarks If a path does not exist, one is created in the following format: - *Base Path*\\\\\\ + *Base Path*\\\\\\ Data stored in this path is part of user profile that is enabled for roaming. A roaming user works on more than one computer in a network. The user profile for a roaming user is kept on a server on the network and is loaded onto a system when the user logs on. For a user profile to be considered for roaming, the operating system must support roaming profiles and it must be enabled. @@ -2491,7 +2491,7 @@ The high DPI mode is set once per process. For more information about setting th ## Examples The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates using the property to store application data for the user. - The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . + The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application given the . This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. @@ -2537,7 +2537,7 @@ The high DPI mode is set once per process. For more information about setting th ## Remarks If the key does not exist, it is created in the following format: - CurrentUser\Software\\\\\\ + CurrentUser\Software\\\\\\ Data stored in this key is part of user profile that is enabled for roaming. A roaming user works on more than one computer in a network. The user profile for a roaming user is kept on a server on the network and is loaded onto a system when the user logs on. For a user profile to be considered for roaming, the operating system must support roaming profiles and it must be enabled. diff --git a/xml/System.Windows.Forms/ApplicationContext.xml b/xml/System.Windows.Forms/ApplicationContext.xml index 049f3b193ae..a96b1de5f7f 100644 --- a/xml/System.Windows.Forms/ApplicationContext.xml +++ b/xml/System.Windows.Forms/ApplicationContext.xml @@ -50,7 +50,7 @@ ## Examples The following code example displays two forms and exits the application when both forms are closed. When the application starts and exits, the position of each form is remembered. This example demonstrates how to use an , along with the `Application.Run(context)` method, to display multiple forms when the application starts. - The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . + The class `MyApplicationContext` inherits from and keeps track when each form is closed, and exits the current thread when they both are. The class stores the positions of each form for the user. The form position data is stored in a file titled `Appdata.txt` that is created in the location determined by . The `Main` method calls `Application.Run(context)` to start the application, given the . @@ -135,7 +135,7 @@ is not overridden, the message loop of the thread terminates when is closed. + If is not overridden, the message loop of the thread terminates when is closed. ]]> @@ -231,7 +231,7 @@ method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. @@ -282,15 +282,15 @@ . + This method calls . > [!NOTE] -> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. +> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. ## Examples - The following code example is an excerpt from the example in the class overview. This example keeps track of open forms and exits the current thread when all forms are closed. The `OnFormClosed` method is an event handler for the event. When the number of open forms is equal to 0, then current thread is exited by calling the method. The number of forms is tracked by incrementing the `formCount` variable when a form is shown, and decrementing it when a form is closed. + The following code example is an excerpt from the example in the class overview. This example keeps track of open forms and exits the current thread when all forms are closed. The `OnFormClosed` method is an event handler for the event. When the number of open forms is equal to 0, then current thread is exited by calling the method. The number of forms is tracked by incrementing the `formCount` variable when a form is shown, and decrementing it when a form is closed. Some code is not shown for the purpose of brevity. See for the whole code listing. @@ -333,10 +333,10 @@ . + This method is called from . > [!NOTE] -> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. +> and do not actually cause the thread to terminate. These methods raise the event to which the object listens. The object then terminates the thread. ]]> @@ -373,9 +373,9 @@ and cleans up resources by calling `Dispose(false)`. Override `Dispose(Boolean)` to customize the cleanup. + This method overrides and cleans up resources by calling `Dispose(false)`. Override `Dispose(Boolean)` to customize the cleanup. - Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. + Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). @@ -421,7 +421,7 @@ for this context. This property can change at any time. If is not overridden, the message loop of the thread terminates when the `mainForm` parameter closes. + This property determines the main for this context. This property can change at any time. If is not overridden, the message loop of the thread terminates when the `mainForm` parameter closes. ]]> @@ -477,7 +477,7 @@ . + The default implementation of this method calls . ]]> @@ -580,7 +580,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ApplicationContext1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/AutoCompleteStringCollection.xml b/xml/System.Windows.Forms/AutoCompleteStringCollection.xml index baefda758af..f5d4e9173b7 100644 --- a/xml/System.Windows.Forms/AutoCompleteStringCollection.xml +++ b/xml/System.Windows.Forms/AutoCompleteStringCollection.xml @@ -373,11 +373,11 @@ Obtains the position of the specified string within the collection. The index for the specified item. - returns the index for the first occurrence of the string within the collection. - + returns the index for the first occurrence of the string within the collection. + ]]> @@ -678,11 +678,11 @@ The zero-based index in at which copying begins. Copies the strings of the collection to an , starting at a particular index. For a description of this member, see . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -722,11 +722,11 @@ Adds a string to the collection. For a description of this member, see . The index at which the has been added. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -767,11 +767,11 @@ if is found in the collection; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -811,11 +811,11 @@ Determines the index of a specified string in the collection. For a description of this member, see . The index of if found in the list; otherwise, -1. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -856,11 +856,11 @@ The string to insert into the collection. Inserts an item to the collection at the specified index. For a description of this member, see . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -896,11 +896,11 @@ if the collection has a fixed size; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -936,11 +936,11 @@ if the collection is read-only; otherwise, . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -990,11 +990,11 @@ Gets the element at a specified index. For a description of this member, see . The element at the specified index. - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -1033,11 +1033,11 @@ The string to remove from the collection. Removes the first occurrence of a specific string from the collection. For a description of this member, see . - instance is cast to an interface. - + instance is cast to an interface. + ]]> diff --git a/xml/System.Windows.Forms/AutoScaleMode.xml b/xml/System.Windows.Forms/AutoScaleMode.xml index e63a9fa51a1..74adf30e166 100644 --- a/xml/System.Windows.Forms/AutoScaleMode.xml +++ b/xml/System.Windows.Forms/AutoScaleMode.xml @@ -31,7 +31,7 @@ Most business applications should use the Font automatic scaling mode. The Dpi scaling mode is useful for graphics-based applications and is compatible with the default scaling used by the .NET Compact Framework. > [!IMPORTANT] -> In the .NET Framework versions 1.0 and 1.1, automatic scaling was supported using a simpler mechanism that always relied on the current system font. This mechanism is now obsolete but still supported for backward compatibility. You can obtain the older scaling behavior by setting the property of the containing to `true`, which will also implicitly set the property to None. Conversely, setting the property of a form will set to `false`, enabling the newer scaling mechanism introduced with the .NET Framework version 2.0. +> In the .NET Framework versions 1.0 and 1.1, automatic scaling was supported using a simpler mechanism that always relied on the current system font. This mechanism is now obsolete but still supported for backward compatibility. You can obtain the older scaling behavior by setting the property of the containing to `true`, which will also implicitly set the property to None. Conversely, setting the property of a form will set to `false`, enabling the newer scaling mechanism introduced with the .NET Framework version 2.0. Note that for Smartphone applications, this enumeration requires Windows Mobile Version 5.0 software for Smartphones. diff --git a/xml/System.Windows.Forms/AutoSizeMode.xml b/xml/System.Windows.Forms/AutoSizeMode.xml index c8ed1c5cc4f..dcc94121298 100644 --- a/xml/System.Windows.Forms/AutoSizeMode.xml +++ b/xml/System.Windows.Forms/AutoSizeMode.xml @@ -28,12 +28,12 @@ ## Remarks Setting the GrowAndShrink value produces the same behavior that you get for controls with the property enabled but which have no - `AutoSizeMode` property. The and properties are respected, but the current value of the property is ignored. + `AutoSizeMode` property. The and properties are respected, but the current value of the property is ignored. ## Examples - The following code example shows a form created using code that automatically resizes to fit its contents. When ran, the form will display a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The code example uses a to lay out the contained controls one after the other, and sets the and to grow and shrink to fit the contents of its form. + The following code example shows a form created using code that automatically resizes to fit its contents. When ran, the form will display a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The code example uses a to lay out the contained controls one after the other, and sets the and to grow and shrink to fit the contents of its form. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AutoSizeMode/Overview/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AutoSizeMode/Overview/Form1.vb" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/AutoValidate.xml b/xml/System.Windows.Forms/AutoValidate.xml index 6f097ad877d..eae8c31caff 100644 --- a/xml/System.Windows.Forms/AutoValidate.xml +++ b/xml/System.Windows.Forms/AutoValidate.xml @@ -26,7 +26,7 @@ to determine how to validate its data. This type of validation is called implicit validation, because it occurs without the application developer having to make an explicit call to or . + If a user switches focus off of a Windows Forms control, the control will use to determine how to validate its data. This type of validation is called implicit validation, because it occurs without the application developer having to make an explicit call to or . The property corresponding to this value will have different defaults based on the type of control. For more information, see [User Input Validation in Windows Forms](/dotnet/desktop/winforms/user-input-validation-in-windows-forms). diff --git a/xml/System.Windows.Forms/AxHost+ConnectionPointCookie.xml b/xml/System.Windows.Forms/AxHost+ConnectionPointCookie.xml index 8192063a081..8330199283d 100644 --- a/xml/System.Windows.Forms/AxHost+ConnectionPointCookie.xml +++ b/xml/System.Windows.Forms/AxHost+ConnectionPointCookie.xml @@ -31,11 +31,11 @@ Connects an ActiveX control to a client that handles the control's events. - class provides the link between the class and the ActiveX control. - + class provides the link between the class and the ActiveX control. + ]]> @@ -79,20 +79,20 @@ The outgoing interface whose connection point object is being requested. Initializes a new instance of the class. - constructor establishes a connection between the ActiveX control and the client. - + constructor establishes a connection between the ActiveX control and the client. + ]]> does not implement . - does not implement . - - -or- - + does not implement . + + -or- + does not implement . The connection point has already reached its limit of connections and cannot accept any more. @@ -157,13 +157,13 @@ Releases the unmanaged resources used by the class. - . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. - - For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). - + . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. + + For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + ]]> diff --git a/xml/System.Windows.Forms/AxHost+InvalidActiveXStateException.xml b/xml/System.Windows.Forms/AxHost+InvalidActiveXStateException.xml index ab19c9bd247..e15cdef3ecc 100644 --- a/xml/System.Windows.Forms/AxHost+InvalidActiveXStateException.xml +++ b/xml/System.Windows.Forms/AxHost+InvalidActiveXStateException.xml @@ -31,11 +31,11 @@ The exception that is thrown when the ActiveX control is referenced while in an invalid state. - exception is thrown. The exception class contains the name of the member that made the reference and the member type. The member type is one of the enumerated values. - + ]]> @@ -150,11 +150,11 @@ Creates and returns a string representation of the current exception. A string representation of the current exception. - constructor. - + constructor. + ]]> diff --git a/xml/System.Windows.Forms/AxHost+StateConverter.xml b/xml/System.Windows.Forms/AxHost+StateConverter.xml index 2a535463927..d7124675cdb 100644 --- a/xml/System.Windows.Forms/AxHost+StateConverter.xml +++ b/xml/System.Windows.Forms/AxHost+StateConverter.xml @@ -31,11 +31,11 @@ Converts objects from one data type to another. - class. Instead, call the method of the class. For more information, see the examples in the base class. - + class. Instead, call the method of the class. For more information, see the examples in the base class. + ]]> diff --git a/xml/System.Windows.Forms/AxHost.xml b/xml/System.Windows.Forms/AxHost.xml index 4939751a23e..2651319de8f 100644 --- a/xml/System.Windows.Forms/AxHost.xml +++ b/xml/System.Windows.Forms/AxHost.xml @@ -80,13 +80,13 @@ > [!NOTE] > If the name of a member of the ActiveX control matches a name defined in the .NET Framework, then the ActiveX Control Importer will prefix the member name with "Ctl" when it creates the derived class. For example, if your ActiveX control has a member named "Layout", it is renamed "CtlLayout" in the derived class because the `Layout` event is defined within the .NET Framework. - Most of the common properties of the class are only valid and used if the underlying ActiveX control exposes those properties. A few examples of the common properties are , , , and . + Most of the common properties of the class are only valid and used if the underlying ActiveX control exposes those properties. A few examples of the common properties are , , , and . > [!NOTE] > If you're using Visual Studio as your Windows Forms design environment, you can make an ActiveX control available to your application by adding the ActiveX control to your Toolbox. To accomplish this, right-click the **Toolbox**, select **Customize Toolbox**, then browse to the ActiveX control's *.ocx* file. For more information, see [How to: Add ActiveX Controls to Windows Forms](/dotnet/desktop/winforms/controls/how-to-add-activex-controls-to-windows-forms). ## Examples - The following code example overrides the constructor and the and methods of an -derived class that wraps the Microsoft Masked Edit ActiveX Control. This code requires that you've generated the source code by running the AxImp.exe tool on the *MSMask32.ocx* file with the `/source` switch. This code is only shown in C# syntax because that's the only language output by the AxImp.exe tool. + The following code example overrides the constructor and the and methods of an -derived class that wraps the Microsoft Masked Edit ActiveX Control. This code requires that you've generated the source code by running the AxImp.exe tool on the *MSMask32.ocx* file with the `/source` switch. This code is only shown in C# syntax because that's the only language output by the AxImp.exe tool. ```csharp public AxMaskEdBox() @@ -554,7 +554,7 @@ method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. + Design environments typically use this method to start the initialization of a component that is used on a form or used by another component. The method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. ]]> @@ -1697,7 +1697,7 @@ method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. + Design environments typically use this method to finish the initialization of a component that is used on a form or used by another component. The method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. ]]> @@ -2404,7 +2404,7 @@ does not work correctly at this time. + You can use this method to convert `IPictureDisp` objects in addition to `IPicture` objects. This works because the `IPictureDisp` OLE interface is a subset of the `IPicture` interface. Converting `IPictureDisp` objects with this method is necessary because the does not work correctly at this time. ]]> @@ -2452,7 +2452,7 @@ method to convert an `IPictureDisp` object into an , however, because the `IPictureDisp` OLE interface is a subset of the `IPicture` interface. + This method does not work correctly. You can use the method to convert an `IPictureDisp` object into an , however, because the `IPictureDisp` OLE interface is a subset of the `IPicture` interface. ]]> @@ -2913,9 +2913,9 @@ The **About** dialog box typically displays version and copyright information ab method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the ActiveX control. The preprocessing of a character includes checking whether the character is a mnemonic of another control. + The method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the ActiveX control. The preprocessing of a character includes checking whether the character is a mnemonic of another control. - As implemented in the class, the method always returns `true`, so the specified character is sent directly to the ActiveX control. + As implemented in the class, the method always returns `true`, so the specified character is sent directly to the ActiveX control. ]]> @@ -4672,7 +4672,7 @@ The **About** dialog box typically displays version and copyright information ab method also allows derived classes to handle the method without attaching a delegate. This is the preferred technique for handling the method in a derived class. + The method also allows derived classes to handle the method without attaching a delegate. This is the preferred technique for handling the method in a derived class. For an example, see . @@ -4794,7 +4794,7 @@ For an example, see . is `false`, no **About** dialog box is displayed. + If is `false`, no **About** dialog box is displayed. ]]> @@ -4843,7 +4843,7 @@ For an example, see . is `false`, no property pages are displayed. + If is `false`, no property pages are displayed. Property pages allow an ActiveX control user to view and change ActiveX control properties. These properties are accessed by invoking a control properties dialog box, which contains one or more property pages that provide a customized, graphical interface for viewing and editing the control properties. @@ -4887,7 +4887,7 @@ For an example, see . is `false`, no property pages are displayed. + If is `false`, no property pages are displayed. Property pages allow an ActiveX control user to view and change ActiveX control properties. These properties are accessed by invoking a control properties dialog box, which contains one or more property pages that provide a customized, graphical interface for viewing and editing the control properties. @@ -5065,7 +5065,7 @@ This member is an explicit interface member implementation. It can be used only method returns. + Use the type name instead of the value that the method returns. ]]> @@ -5113,7 +5113,7 @@ This member is an explicit interface member implementation. It can be used only method returns. + Use the default name instead of the value that the method returns. ]]> @@ -5165,7 +5165,7 @@ This member is an explicit interface member implementation. It can be used only method returns. + Use the default type converter instead of the value that the method returns. ]]> diff --git a/xml/System.Windows.Forms/BaseCollection.xml b/xml/System.Windows.Forms/BaseCollection.xml index 6801ac1bbc0..e605ebd0017 100644 --- a/xml/System.Windows.Forms/BaseCollection.xml +++ b/xml/System.Windows.Forms/BaseCollection.xml @@ -298,7 +298,7 @@ ## Remarks If a collection is thread safe, the property returns `true`, and the programmer does not have to do anything to keep the collection thread safe. - If, as is the case with the , the property returns `false`, then the property returns an object that can be used with the C# `lock` keyword. Use the static and methods of the class to manually lock and unlock the synchronization object. + If, as is the case with the , the property returns `false`, then the property returns an object that can be used with the C# `lock` keyword. Use the static and methods of the class to manually lock and unlock the synchronization object. ]]> diff --git a/xml/System.Windows.Forms/Binding.xml b/xml/System.Windows.Forms/Binding.xml index 580a204c674..fd30af01fdc 100644 --- a/xml/System.Windows.Forms/Binding.xml +++ b/xml/System.Windows.Forms/Binding.xml @@ -44,7 +44,7 @@ The class also enables you to format values for display through the event and to retrieve formatted values through the event. - When constructing a instance with constructor, you must specify three items: + When constructing a instance with constructor, you must specify three items: - The name of the control property to bind to. @@ -62,7 +62,7 @@ |Any class that implements to create an indexed collection of objects. The collection must be created and filled before creating the . The objects in the list must all be of the same type; otherwise, an exception will be thrown.|`ArrayList ar1 = new ArrayList; Customer1 cust1 = new Customer("Louis"); ar1.Add(cust1);`| |A strongly typed of strongly typed objects|`Customer [] custList = new Customer[3];`| - Third, you must specify the navigation path, which can be an empty string (""), a single property name, or a period-delimited hierarchy of names. If you set the navigation path to an empty string, the method will be called on the underlying data source object. + Third, you must specify the navigation path, which can be an empty string (""), a single property name, or a period-delimited hierarchy of names. If you set the navigation path to an empty string, the method will be called on the underlying data source object. If the data source is a , which can contain multiple objects, the navigation path must be used to resolve to a specific column. @@ -81,7 +81,7 @@ Each member of the path can return either a property that resolves to a single value (such as an integer), or a list of values (such as an array of strings). Although each member in the path can be a list or property, the final member must resolve to a property. Each member builds on the previous member: "Size.Height" resolves to the property for the current ; "Regions.regionsToCustomers.CustomerFirstName" resolves to the first name for the current customer, where the customer is one of the customers for the current region. - A returns a list of values by linking one to a second in a . If the contains objects, you can specify the data member as a followed by a , and then a . For example, if the named "Suppliers" contains a named "suppliers2products", the data member could be "Suppliers.suppliers2products.ProductName". + A returns a list of values by linking one to a second in a . If the contains objects, you can specify the data member as a followed by a , and then a . For example, if the named "Suppliers" contains a named "suppliers2products", the data member could be "Suppliers.suppliers2products.ProductName". The data source can consist of a set of related classes. For example, imagine a set of classes that catalogs solar systems. The class named `System` contains a property named `Stars` that returns a collection of `Star` objects. Each `Star` object has `Name` and `Mass` properties, as well as a `Planets` property that returns a collection of `Planet` objects. In this system, each planet also has `Mass` and `Name` properties. Each `Planet` object further has a `Moons` property that returns a collection of `Moon` objects, each of which also has `Name` and `Mass` properties. If you specify a `System` object as the data source, you can specify any of the following as the data member: @@ -97,7 +97,7 @@ - "Stars.Planets.Moons.Mass" - Controls that can be simple-bound feature a collection of objects in a , which you can access through the control's property. You add a to the collection by calling the method, thereby binding a property of the control to a property of an object (or to a property of the current object in a list). + Controls that can be simple-bound feature a collection of objects in a , which you can access through the control's property. You add a to the collection by calling the method, thereby binding a property of the control to a property of an object (or to a property of the current object in a list). You can simple-bind to any object that derives from the class, for example, the following Windows controls: @@ -150,9 +150,9 @@ > [!NOTE] > Only the property of the , , and control is simple bound. - The class is an abstract class that manages all the objects for a particular data source and data member. Classes that derive from are the and the classes. How a is managed depends on whether the is a list binding or a property binding. For example, if it is a list binding, you can use the to specify a in the list; the , therefore, determines which item (out of all items in the list) is actually bound to a control. To return the appropriate , use the . + The class is an abstract class that manages all the objects for a particular data source and data member. Classes that derive from are the and the classes. How a is managed depends on whether the is a list binding or a property binding. For example, if it is a list binding, you can use the to specify a in the list; the , therefore, determines which item (out of all items in the list) is actually bound to a control. To return the appropriate , use the . - To add a new row to a set of controls bound to the same , use the method of the class. Use the property of the class to return the appropriate . To escape the addition of the new row, use the method. + To add a new row to a set of controls bound to the same , use the method of the class. Use the property of the class to return the appropriate . To escape the addition of the new row, use the method. @@ -247,7 +247,7 @@ - An event named *PropertyName*`Changed` (for example, ) - If you attempt to bind to a property that does not exist, an will be thrown when the is added to the control's collection. + If you attempt to bind to a property that does not exist, an will be thrown when the is added to the control's collection. @@ -739,7 +739,7 @@ is `true`: + This event is raised under any of the following conditions when is `true`: - Data from the data source is pushed onto the control property. @@ -848,12 +848,12 @@ is created from the `dataMember` string passed to the constructor. + The is created from the `dataMember` string passed to the constructor. ## Examples - The following code example gets the of each on a form, and prints the , , and property values for that . + The following code example gets the of each on a form, and prints the , , and property values for that . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Binding.BindingMemberInfo Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Binding/BindingMemberInfo/source.cs" id="Snippet1"::: @@ -1135,11 +1135,11 @@ The and events allow you to create custom formats for displaying data. For example, if the data in a table is of type , you can display the data in the local currency format by setting the property of the to the formatted value in the event. You must consequently unformat the displayed value in the event. - The event occurs whenever the value of the changes, which includes: + The event occurs whenever the value of the changes, which includes: - The first time the property is bound. -- Any time the changes. +- Any time the changes. - Whenever the data-bound list is sorted or filtered, which is accomplished when a supplies the list. @@ -1150,7 +1150,7 @@ ## Examples - The following code example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrencyString` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyStringToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. + The following code example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrencyString` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyStringToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. This example assumes the presence of a named `ds`. @@ -1348,14 +1348,14 @@ - All its properties are set. -- The user did not call or on the that the belongs to. +- The user did not call or on the that the belongs to. - The control to which the belongs has been created. ## Examples - The following code example prints the and value for each on a form. + The following code example prints the and value for each on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Binding.IsBinding Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Binding/IsBinding/source.cs" id="Snippet1"::: @@ -1404,7 +1404,7 @@ ## Remarks The data source must contain for the property to be correctly applied. If the data source type is a type such as a string or integer the value of the property will be ignored. Also, the property is ignored if it is set to `null`. - A null value will be added to the data source when the control property is set to the object of . If is set to a string value, comparisons are case-insensitive. + A null value will be added to the data source when the control property is set to the object of . If is set to a string value, comparisons are case-insensitive. ]]> @@ -1445,7 +1445,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1490,7 +1490,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1538,7 +1538,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1587,16 +1587,16 @@ - After the event of the occurs. -- When the method of the is called. +- When the method of the is called. -- When the of the changes (in other words, when the changes). +- When the of the changes (in other words, when the changes). For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrencyString` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyStringToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. + The following code example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrencyString` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyStringToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Binding.Parse Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Binding/Parse/source.cs" id="Snippet1"::: @@ -1655,12 +1655,12 @@ to specify the control property that you want to bind to a list in a data source. Most commonly, you bind a display property such as the property of a control. However, because you can bind any property of a control, you can programmatically create controls at run time using data from a database. + Use the to specify the control property that you want to bind to a list in a data source. Most commonly, you bind a display property such as the property of a control. However, because you can bind any property of a control, you can programmatically create controls at run time using data from a database. ## Examples - The following code example prints the value of each for each control on a form. + The following code example prints the value of each for each control on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Binding.PropertyName Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Binding/PropertyName/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/BindingCompleteEventArgs.xml b/xml/System.Windows.Forms/BindingCompleteEventArgs.xml index 082fb90a0de..d3ae9b63c2e 100644 --- a/xml/System.Windows.Forms/BindingCompleteEventArgs.xml +++ b/xml/System.Windows.Forms/BindingCompleteEventArgs.xml @@ -283,7 +283,7 @@ might also be associated with the event of a or of a class that inherits from . + The might also be associated with the event of a or of a class that inherits from . @@ -380,12 +380,12 @@ to determine if the binding was successful, or an error or exception occurred. + Use the to determine if the binding was successful, or an error or exception occurred. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Binding1`. Then ensure that the event handler is associated with the event. @@ -441,7 +441,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Binding1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/BindingContext.xml b/xml/System.Windows.Forms/BindingContext.xml index fb0a8a61247..5a6f6e0b266 100644 --- a/xml/System.Windows.Forms/BindingContext.xml +++ b/xml/System.Windows.Forms/BindingContext.xml @@ -50,9 +50,9 @@ For each data source on a Windows Form, there is a single or . Because there may be multiple data sources associated with a Windows Form, the enables you to retrieve any particular associated with a data source. > [!NOTE] -> When using the property, the creates a new if one does not already exist. This can lead to some confusion, as the returned object may not manage the list (or any list) that you intend. To prevent returning an invalid , use the method to determine if the intended already exists. +> When using the property, the creates a new if one does not already exist. This can lead to some confusion, as the returned object may not manage the list (or any list) that you intend. To prevent returning an invalid , use the method to determine if the intended already exists. - If you use a container control, such as a , , or , to contain data-bound controls, you can create a for just that container control and its controls. Then, each part of your form can be managed by its own . See the constructor for more information about creating multiple objects for the same data source. + If you use a container control, such as a , , or , to contain data-bound controls, you can create a for just that container control and its controls. Then, each part of your form can be managed by its own . See the constructor for more information about creating multiple objects for the same data source. If you add a control to a form and bind it to a column of a table in a dataset, the control communicates with the of that form. The , in turn, talks to the specific for that data association. If you queried the `Position` property of the , it would report the current record for the binding of that control. In the following code example, a control is bound to the `FirstName` column of a `Customers` table on the `dataSet1` dataset through the for the form it is on. @@ -76,7 +76,7 @@ textBox2.DataBindings.Add("Text", dataSet1, "Customers.LastName"); If you bind `TextBox2` to a different dataset, the creates and manages a second . - It is important to be consistent about how you set the and properties; otherwise, the creates multiple currency managers for the same dataset, which results in errors. The following code example shows a few ways to set the properties and their associated objects. You can set the properties using either of the following methods, as long as you are consistent throughout your code. + It is important to be consistent about how you set the and properties; otherwise, the creates multiple currency managers for the same dataset, which results in errors. The following code example shows a few ways to set the properties and their associated objects. You can set the properties using either of the following methods, as long as you are consistent throughout your code. ```vb ComboBox1.DataSource = DataSet1 @@ -152,12 +152,12 @@ this.BindingContext[dataSet1.Customers].Position = 1; instances for the same data source, create a new and set it to the property of an object that inherits from the class. For example, if you have two objects (from two different objects), you can set the properties of each to different values. This causes each set of data-bound controls to display different values from the same data source. + If you want to have multiple instances for the same data source, create a new and set it to the property of an object that inherits from the class. For example, if you have two objects (from two different objects), you can set the properties of each to different values. This causes each set of data-bound controls to display different values from the same data source. ## Examples - The following code example creates two new objects and assigns each object to the property of a control. `GroupBox1` contains `TextBox1`, and `GroupBox2` contains `TextBox2` (which is accomplished by using the method of the class). The example then adds objects to the two controls, binding each to the same data source and data member. The example also shows two event handlers that use the from the controls to set the property on different objects. + The following code example creates two new objects and assigns each object to the property of a control. `GroupBox1` contains `TextBox1`, and `GroupBox2` contains `TextBox2` (which is accomplished by using the method of the class). The example then adds objects to the two controls, binding each to the same data source and data member. The example also shows two event handlers that use the from the controls to set the property on different objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingContext.BindingContext Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingContext/.ctor/source.cs" id="Snippet1"::: @@ -446,7 +446,7 @@ This method is obsolete and unused. ## Examples - The following code example uses the method to determine whether a exists for each control on a form. The example passes each in a to the method. + The following code example uses the method to determine whether a exists for each control on a form. The example passes each in a to the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingContext.Contains Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingContext/Contains/source.cs" id="Snippet1"::: @@ -510,7 +510,7 @@ This method is obsolete and unused. ## Examples - The following code example uses the method to test whether a specific exists before attempting to get it through the property. + The following code example uses the method to test whether a specific exists before attempting to get it through the property. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingContext.Contains1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingContext/Contains/source1.cs" id="Snippet1"::: @@ -609,7 +609,7 @@ This method is obsolete and unused. you want does not require a navigation path. For example, if the manages a set of objects that use an or as the , no navigation path is required. + Use this overload if the you want does not require a navigation path. For example, if the manages a set of objects that use an or as the , no navigation path is required. > [!NOTE] > The property will always return a , and never return `null`. @@ -619,7 +619,7 @@ This method is obsolete and unused. ## Examples - The following code example returns three objects: one for a , one for an , and one for the of a that belongs to a control. + The following code example returns three objects: one for a , one for an , and one for the of a that belongs to a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingContext.this Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingContext/Item/source.cs" id="Snippet1"::: @@ -689,7 +689,7 @@ This method is obsolete and unused. See the class for a list of possible data sources and for information about creating bindings between controls and data sources. - If the desired manages a list, the navigation path must also end with a list. For example, the following C# code binds a control to the order date in a table of orders. The navigation path includes the , the , and the . However, the must be retrieved using only the and (which resolves to a list). + If the desired manages a list, the navigation path must also end with a list. For example, the following C# code binds a control to the order date in a table of orders. The navigation path includes the , the , and the . However, the must be retrieved using only the and (which resolves to a list). ```csharp // The navigation path for a Binding ends with a property. @@ -702,12 +702,12 @@ BindingManagerBase bmOrders = this.BindingContext When returning a , you should use the same data source as the and modify only the navigation path. - Use the method to determine if the desired already exists. + Use the method to determine if the desired already exists. ## Examples - The following code example demonstrates how to use the to retrieve the for a particular binding. It also shows how to handle the event for the to ensure multiple controls bound to the same data source remain synchronized when one of the control values is changed. To run this example, paste the code into a Windows Form and call the `InitializeControlsAndData` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the to retrieve the for a particular binding. It also shows how to handle the event for the to ensure multiple controls bound to the same data source remain synchronized when one of the control values is changed. To run this example, paste the code into a Windows Form and call the `InitializeControlsAndData` method from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingCompleteEventArgs/Binding/Form1.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BindingCompleteEventArgs/Binding/Form1.vb" id="Snippet11"::: @@ -755,7 +755,7 @@ BindingManagerBase bmOrders = this.BindingContext ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1051,12 +1051,12 @@ This member is an explicit interface member implementation. It can be used only returned by the method allows you to iterate over the collection managed by the . + The returned by the method allows you to iterate over the collection managed by the . ## Examples - The following code example uses the method to return an for the . + The following code example uses the method to return an for the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingContext.IEnumerable.GetEnumerator Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingContext/System.Collections.IEnumerable.GetEnumerator/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/BindingManagerBase.xml b/xml/System.Windows.Forms/BindingManagerBase.xml index 63a84d38444..0741d45c600 100644 --- a/xml/System.Windows.Forms/BindingManagerBase.xml +++ b/xml/System.Windows.Forms/BindingManagerBase.xml @@ -38,7 +38,7 @@ The is necessary because data sources do not necessarily maintain a current-item pointer. For instance, arrays and objects can be data sources, but they do not have a property that returns the current item. To get the current item, use the property. - The also inherits from the , and it is used to maintain the current property of an object, rather than the property of a current object in a data source. For this reason, trying to set the or property for a has no effect. + The also inherits from the , and it is used to maintain the current property of an object, rather than the property of a current object in a data source. For this reason, trying to set the or property for a has no effect. To create a , use the class, which returns either a or a , depending on the data source being managed. @@ -47,7 +47,7 @@ ## Examples - The following code example uses the to return a for a specific data source. (The example assumes you have declared `myBindingManagerBase` in the Declarations section of the module.) The example then adds event delegates to the and events. Lastly, the example contains four methods (`MoveNext`, `MovePrevious`, `MoveFirst`, and `MoveLast`) that increment or decrement the property, and set the to the first or last row in the list. The last row in the list is determined by using the property. + The following code example uses the to return a for a specific data source. (The example assumes you have declared `myBindingManagerBase` in the Declarations section of the module.) The example then adds event delegates to the and events. Lastly, the example contains four methods (`MoveNext`, `MovePrevious`, `MoveFirst`, and `MoveLast`) that increment or decrement the property, and set the to the first or last row in the list. The last row in the list is determined by using the property. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingManagerBase Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/Overview/source.cs" id="Snippet1"::: @@ -135,15 +135,15 @@ method adds a new item to the underlying list by using the parameterless constructor for that item's type. is intended primarily to be used by programmers adding complex data-binding support to their custom component. + The method adds a new item to the underlying list by using the parameterless constructor for that item's type. is intended primarily to be used by programmers adding complex data-binding support to their custom component. - is commonly implemented using the following pattern that allows application programmers to inject their own code for creating customized items: + is commonly implemented using the following pattern that allows application programmers to inject their own code for creating customized items: -1. raises the event. +1. raises the event. 2. The programmer can supply a custom item by handling the event and setting the property of the parameter to the new item. Otherwise, the component should create an item using the parameterless constructor. -3. If the data source does not implement the interface, the item is immediately added to the data source and underlying list. If this interface is supported, then the addition is transacted by the and methods. +3. If the data source does not implement the interface, the item is immediately added to the data source and underlying list. If this interface is supported, then the addition is transacted by the and methods. ]]> @@ -289,12 +289,12 @@ ## Remarks This method is supported only if the data source implements the interface. If the object does not implement the interface, changes made to the data will not be discarded. - Calling the method causes the event to occur. + Calling the method causes the event to occur. ## Examples - The following code example demonstrates both the and the methods. When you call the methods, changes made to the data are discarded. When you call the method, the changes are kept. + The following code example demonstrates both the and the methods. When you call the methods, changes made to the data are discarded. When you call the method, the changes are kept. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BindingManagerBase.CancelCurrentEdit Example/CPP/canceledit.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/CancelCurrentEdit/canceledit.cs" id="Snippet1"::: @@ -393,15 +393,15 @@ object contains the value of the current item in the data source. To use the value of the current item, you must cast the item to the of the object contained by the . For example, a contains objects. To determine the type of the current object, use the and methods. + The object contains the value of the current item in the data source. To use the value of the current item, you must cast the item to the of the object contained by the . For example, a contains objects. To determine the type of the current object, use the and methods. > [!NOTE] -> When the is a , , or , you are actually binding to a . Consequently, each object is a object. +> When the is a , , or , you are actually binding to a . Consequently, each object is a object. ## Examples - The following code example prints the value of the object in a in the event. The example assumes the data source is a containing a named `CustName`. + The following code example prints the value of the object in a in the event. The example assumes the data source is a containing a named `CustName`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingManagerBase.Current Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/Current/source.cs" id="Snippet1"::: @@ -450,7 +450,7 @@ ## Examples - The following code example prints the value of the object in a in the event. The example assumes the data source is a containing a named `CustName`. + The following code example prints the value of the object in a in the event. The example assumes the data source is a containing a named `CustName`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingManagerBase.Current Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/Current/source.cs" id="Snippet1"::: @@ -498,7 +498,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `BindingManagerBase1` and ensure that the event handler is associated with the event. @@ -548,7 +548,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `BindingManagerBase1` and ensure that the event handler is associated with the event. @@ -595,7 +595,7 @@ ## Examples - The following code example demonstrates both the and the methods. When you call the methods, changes made to the data are discarded. When you call the method, the changes are kept. + The following code example demonstrates both the and the methods. When you call the methods, changes made to the data are discarded. When you call the method, the changes are kept. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BindingManagerBase.CancelCurrentEdit Example/CPP/canceledit.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/CancelCurrentEdit/canceledit.cs" id="Snippet1"::: @@ -657,7 +657,7 @@ method to return a . The example prints the and value of the current using the method of the . + The following code example uses the method to return a . The example prints the and value of the current using the method of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingManagerBase.GetItemProperties Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/GetItemProperties/source.cs" id="Snippet1"::: @@ -767,7 +767,7 @@ ## Examples - The following code example uses the method to return a for a . The example then prints out the and of each in the collection. + The following code example uses the method to return a for a . The example then prints out the and of each in the collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingManagerBase.GetItemProperties2 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/GetItemProperties/source1.cs" id="Snippet1"::: @@ -885,7 +885,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -930,7 +930,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1015,7 +1015,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1062,7 +1062,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1139,7 +1139,7 @@ property to iterate through the underlying list maintained by the . To go to the first item, set the to 0. To go to the end of the list, set the to the value of the property minus 1. + Use the property to iterate through the underlying list maintained by the . To go to the first item, set the to 0. To go to the end of the list, set the to the value of the property minus 1. The event occurs when the property value changes. @@ -1235,9 +1235,9 @@ method is a programmatic way to pull information from the data-bound control back into the data source. It is not required for standard operation of a control, since normally a control automatically updates its bound data source when focus leaves it. + The method is a programmatic way to pull information from the data-bound control back into the data source. It is not required for standard operation of a control, since normally a control automatically updates its bound data source when focus leaves it. - raises the event and change events on the data source as appropriate. + raises the event and change events on the data source as appropriate. ]]> @@ -1276,9 +1276,9 @@ method is a programmatic way to push information from the data source into the data-bound control. This method is not required if the data source implements the interface, because the event should automatically cause the control to be updated through its currency manager. + The method is a programmatic way to push information from the data source into the data-bound control. This method is not required if the data source implements the interface, because the event should automatically cause the control to be updated through its currency manager. - If this method is issued when a operation is being performed, the method returns immediately with a value of `true`. + If this method is issued when a operation is being performed, the method returns immediately with a value of `true`. ]]> @@ -1321,7 +1321,7 @@ method relies on the underlying data source to determine how the method behaves. (See the class for a list of supported data sources.) For classes that implement , , or , as well as strongly typed classes that implement , the method actually deletes the row in the underlying list instead of removing its contents. + The method relies on the underlying data source to determine how the method behaves. (See the class for a list of supported data sources.) For classes that implement , , or , as well as strongly typed classes that implement , the method actually deletes the row in the underlying list instead of removing its contents. If the underlying list implements the interface, the property must return `true`. If the underlying list implements the interface, the property must return `false`. @@ -1370,7 +1370,7 @@ and are two methods that allow the temporary suspension and resumption of data binding. You would typically suspend data binding if the user must be allowed to edit data fields before validation occurs. For example, the user might need to change a field to be in accordance with a second field; otherwise, validating the first field would cause the second field to be in error. + and are two methods that allow the temporary suspension and resumption of data binding. You would typically suspend data binding if the user must be allowed to edit data fields before validation occurs. For example, the user might need to change a field to be in accordance with a second field; otherwise, validating the first field would cause the second field to be in error. @@ -1418,7 +1418,7 @@ and are two methods that allow the temporary suspension and resumption of data binding. You would typically suspend data binding if the user must be allowed to edit data fields before validation occurs. For example, the user might need to change a field to be in accordance with a second field; otherwise, validating the first field would cause the second field to be in error. + and are two methods that allow the temporary suspension and resumption of data binding. You would typically suspend data binding if the user must be allowed to edit data fields before validation occurs. For example, the user might need to change a field to be in accordance with a second field; otherwise, validating the first field would cause the second field to be in error. @@ -1466,7 +1466,7 @@ method updates the data binding between the bound control and its data source. For complex data-binding scenarios, it also resets the current position to the beginning of the underlying list. + The method updates the data binding between the bound control and its data source. For complex data-binding scenarios, it also resets the current position to the beginning of the underlying list. ]]> diff --git a/xml/System.Windows.Forms/BindingManagerDataErrorEventArgs.xml b/xml/System.Windows.Forms/BindingManagerDataErrorEventArgs.xml index e46c06e890a..a23f9e8282e 100644 --- a/xml/System.Windows.Forms/BindingManagerDataErrorEventArgs.xml +++ b/xml/System.Windows.Forms/BindingManagerDataErrorEventArgs.xml @@ -30,21 +30,21 @@ Provides data for the event. - provides the that was caught in the binding process. - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `BindingManagerBase1` and ensure that the event handler is associated with the event. - + provides the that was caught in the binding process. + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `BindingManagerBase1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet83"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet83"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet83"::: + ]]> @@ -117,16 +117,16 @@ Gets the caught in the binding process that caused the event to be raised. The that caused the event to be raised. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `BindingManagerBase1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `BindingManagerBase1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet83"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet83"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet83"::: + ]]> diff --git a/xml/System.Windows.Forms/BindingMemberInfo.xml b/xml/System.Windows.Forms/BindingMemberInfo.xml index 17c535416c1..e5229590606 100644 --- a/xml/System.Windows.Forms/BindingMemberInfo.xml +++ b/xml/System.Windows.Forms/BindingMemberInfo.xml @@ -49,12 +49,12 @@ ## Remarks The is returned by the property of the class. - The is created from the string passed to the constructor. + The is created from the string passed to the constructor. ## Examples - The following code example prints the , , for each control on a form. + The following code example prints the , , for each control on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingMemberInfo Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingMemberInfo/Overview/source.cs" id="Snippet1"::: @@ -100,7 +100,7 @@ is created automatically when you call the constructor with a control-property name, data source, and navigation path. The `dataMember` parameter contains the string. + A is created automatically when you call the constructor with a control-property name, data source, and navigation path. The `dataMember` parameter contains the string. ]]> @@ -138,12 +138,12 @@ is the last item found in the navigation path returned by the property. For example, if a new is created that has a `dataMember` parameter of "Customers.custToOrders.OrderDate", will return "OrderDate". + The is the last item found in the navigation path returned by the property. For example, if a new is created that has a `dataMember` parameter of "Customers.custToOrders.OrderDate", will return "OrderDate". ## Examples - The following code example gets the of each on a form, and prints the , , and property values of . + The following code example gets the of each on a form, and prints the , , and property values of . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingMemberInfo.BindingPath Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingMemberInfo/BindingField/source.cs" id="Snippet1"::: @@ -187,14 +187,14 @@ is created automatically when you call the constructor with a control-property name, data source, and navigation path. The `dataMember` parameter contains the string. + A is created automatically when you call the constructor with a control-property name, data source, and navigation path. The `dataMember` parameter contains the string. - The is the period delimited combination of the and values. For example, when a new is created by using a `dataMember` parameter of "Customers.custToOrders.OrderDate", will return "Customers.custToOrders.OrderDate". + The is the period delimited combination of the and values. For example, when a new is created by using a `dataMember` parameter of "Customers.custToOrders.OrderDate", will return "Customers.custToOrders.OrderDate". ## Examples - The following code example gets the object of each on a form, and prints the , , and property values of . + The following code example gets the object of each on a form, and prints the , , and property values of . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingMemberInfo.BindingPath Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingMemberInfo/BindingField/source.cs" id="Snippet1"::: @@ -238,12 +238,12 @@ is the period delimited combination of property names that comes before the in the navigational path returned by the property. For example, when a new is created that has a `dataMember` parameter of "Customers.custToOrders.OrderDate", will return "Customers.custToOrders". + The is the period delimited combination of property names that comes before the in the navigational path returned by the property. For example, when a new is created that has a `dataMember` parameter of "Customers.custToOrders.OrderDate", will return "Customers.custToOrders". ## Examples - The following code example gets the of each on a form, and prints the , , and property values of . + The following code example gets the of each on a form, and prints the , , and property values of . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingMemberInfo.BindingPath Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingMemberInfo/BindingField/source.cs" id="Snippet1"::: @@ -293,7 +293,7 @@ strings are compared with a culture setting of . + The strings are compared with a culture setting of . ]]> @@ -398,7 +398,7 @@ if the strings for and are equal; otherwise . - ]]> + ]]> @@ -436,7 +436,7 @@ if the strings for and are not equal; otherwise . - ]]> + ]]> diff --git a/xml/System.Windows.Forms/BindingNavigator.xml b/xml/System.Windows.Forms/BindingNavigator.xml index 5038135b178..7a39f987a4f 100644 --- a/xml/System.Windows.Forms/BindingNavigator.xml +++ b/xml/System.Windows.Forms/BindingNavigator.xml @@ -67,22 +67,22 @@ |UI Control| member| member| |----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| -|**Move First**||| -|**Move Previous**||| -|**Current Position**||| -|**Count**||| -|**Move Next**||| -|**Move Last**||| -|**Add New**||| -|**Delete**||| +|**Move First**||| +|**Move Previous**||| +|**Current Position**||| +|**Count**||| +|**Move Next**||| +|**Move Last**||| +|**Add New**||| +|**Delete**||| Adding a control to a form and binding it to a data source, such as a , will automatically establish the relationships in this table. You can use one of the following techniques to customize this toolbar: -- Create the with the constructor, which accepts a Boolean `addStandardItems` parameter, and set this parameter to `false`. Then add the desired objects to the collection. +- Create the with the constructor, which accepts a Boolean `addStandardItems` parameter, and set this parameter to `false`. Then add the desired objects to the collection. -- If a great deal of customization is desired, or the custom design will be reused, derive a class from and override the method to define additional or alternate standard items. +- If a great deal of customization is desired, or the custom design will be reused, derive a class from and override the method to define additional or alternate standard items. @@ -143,7 +143,7 @@ property to `null`. This constructor is equivalent to calling the constructor with a parameter value of `false`. You can add the standard items by making a separate call to . + The parameterless constructor sets the property to `null`. This constructor is equivalent to calling the constructor with a parameter value of `false`. You can add the standard items by making a separate call to . ]]> @@ -182,7 +182,7 @@ property to `null`. If is `false`, , , , , , , and will also be `null`. + This constructor sets the property to `null`. If is `false`, , , , , , , and will also be `null`. ]]> @@ -265,7 +265,7 @@ property. It also adds the standard set of navigational buttons and sets their corresponding properties, such as and . + This constructor uses the `BindingSource` parameter to initialize the property. It also adds the standard set of navigational buttons and sets their corresponding properties, such as and . ]]> @@ -310,9 +310,9 @@ property generates the event handler for the **Add New** button. This event handler calls the method when the **Add New** button is clicked at run time. + When set, the property generates the event handler for the **Add New** button. This event handler calls the method when the **Add New** button is clicked at run time. - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. The control will disable the **Add New** button if the property is `null` or the property is `false`. @@ -357,12 +357,12 @@ method adds the standard set of user interface objects to the tool strip for basic navigation operations, such as **Move First**, **Move Last**, and **Add New**. + The method adds the standard set of user interface objects to the tool strip for basic navigation operations, such as **Move First**, **Move Last**, and **Add New**. - Override in derived classes to define additional or alternative tool strip items. To ensure optimal design-time support for your derived class, make sure each item has a meaningful value in its property. At design time, this will be used to generate a unique name for the corresponding member variable. The item's property will then be updated to match the name given to the member variable. + Override in derived classes to define additional or alternative tool strip items. To ensure optimal design-time support for your derived class, make sure each item has a meaningful value in its property. At design time, this will be used to generate a unique name for the corresponding member variable. The item's property will then be updated to match the name given to the member variable. > [!NOTE] -> This method does not explicitly remove any previously existing items from the , but does set new values for the , , , , , , and properties. Also does not suspend layout while items are being added. +> This method does not explicitly remove any previously existing items from the , but does set new values for the , , , , , , and properties. Also does not suspend layout while items are being added. ]]> @@ -404,7 +404,7 @@ and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. + The and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. ]]> @@ -516,7 +516,7 @@ property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + The property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. The count of items is accessed through the property of the . @@ -570,9 +570,9 @@ control is a that displays the total number of items in the . The property is the format string used to format the count. + The control is a that displays the total number of items in the . The property is the format string used to format the count. - For more information about format strings, see the method. + For more information about format strings, see the method. ]]> @@ -618,9 +618,9 @@ event handler for the **Delete** button. This event handler calls the method when the **Delete** button is clicked at run time. + When set, this property generates the event handler for the **Delete** button. This event handler calls the method when the **Delete** button is clicked at run time. - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. The control will disable the **Delete** button under the following run-time circumstances: the property is `null`, the property is 0, or the property is `false`. @@ -716,7 +716,7 @@ and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. + The and methods allow the control to optimize changes to multiple properties. Using this pair of methods, you can initialize co-dependent properties or batch set multiple properties at design time. Call the method to signal the control that initialization is starting; call the method to signal that initialization is complete. ]]> @@ -765,11 +765,11 @@ event handler for the **Move First** button. This event handler calls the method when the **Move First** button is clicked at run time. + When set, this property generates the event handler for the **Move First** button. This event handler calls the method when the **Move First** button is clicked at run time. - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. - The control will disable the **Move First** button under the following run-time circumstances: the property is `null`, the property is zero, or for the related is `false`. + The control will disable the **Move First** button under the following run-time circumstances: the property is `null`, the property is zero, or for the related is `false`. In the default implementation, this property represents a control of type . @@ -820,9 +820,9 @@ event handler for the **Move Last** button. This event handler calls the method when the **Move Last** button is clicked at run time. + When set, this property generates the event handler for the **Move Last** button. This event handler calls the method when the **Move Last** button is clicked at run time. - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. The control will disable the **Move Last** button under the following run-time circumstances: the property is `null` or the property is greater than or equal to the property. @@ -875,9 +875,9 @@ event handler for the **Move Next** button. This event handler calls the method when the **Move Next** button is clicked at run time. + When set, this property generates the event handler for the **Move Next** button. This event handler calls the method when the **Move Next** button is clicked at run time. - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. The control will disable the **Move Next** button under the following run-time circumstances: the property is `null` or the property is greater than or equal to the property. @@ -930,9 +930,9 @@ property generates the event handler for the **Move Previous** button. This event handler calls the method when the **Move Previous** button is clicked at run time. + When set, the property generates the event handler for the **Move Previous** button. This event handler calls the method when the **Move Previous** button is clicked at run time. - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. The control will disable the **Move Previous** button under the following run-time circumstances: the property is `null` or the property is less than or equal to 0. @@ -978,17 +978,17 @@ event, the method performs the following operations against the state of the associated . + In addition to raising the corresponding event, the method performs the following operations against the state of the associated . - Sets the internal members using the current state. - Enables or disables user interface (UI) items appropriately for the current state. -- Updates the and controls. +- Updates the and controls. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1038,7 +1038,7 @@ ## Remarks In the default implementation, the property is of type . - This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. + This property is `null` if it was not previously set and it is accessed before the method is implicitly or explicitly called. The current position calculated by obtaining the property of the , and adding 1 to transform the position into a 1-based count. @@ -1088,7 +1088,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `BindingNavigator1`. Then ensure that the event handler is associated with the event. @@ -1136,7 +1136,7 @@ in a derived class, you should also override to refresh any custom standard items you have added to the control. + If you have overridden in a derived class, you should also override to refresh any custom standard items you have added to the control. ]]> diff --git a/xml/System.Windows.Forms/BindingSource.xml b/xml/System.Windows.Forms/BindingSource.xml index acf254846c5..de57b65c177 100644 --- a/xml/System.Windows.Forms/BindingSource.xml +++ b/xml/System.Windows.Forms/BindingSource.xml @@ -88,11 +88,11 @@ component serves many purposes. First, it simplifies binding controls on a form to data by providing currency management, change notification, and other services between Windows Forms controls and data sources. This is accomplished by attaching the component to your data source using the property. For complex binding scenarios you can optionally set the property to a specific column or list in the data source. You then bind controls to the . All further interaction with the data is accomplished with calls to the component. For examples on how the can simplify the binding process, see [How to: Bind Windows Forms Controls to DBNull Database Values](/dotnet/desktop/winforms/controls/how-to-bind-windows-forms-controls-to-dbnull-database-values) and [How to: Handle Errors and Exceptions that Occur with Databinding](/dotnet/desktop/winforms/controls/how-to-handle-errors-and-exceptions-that-occur-with-databinding). Navigation and updating of the data source is accomplished through methods such as , , and . Operations such as sorting and filtering are handled through the and properties. For more information on using sorting and filtering with the , see [How to: Sort and Filter ADO.NET Data with the Windows Forms BindingSource Component](/dotnet/desktop/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component). + The component serves many purposes. First, it simplifies binding controls on a form to data by providing currency management, change notification, and other services between Windows Forms controls and data sources. This is accomplished by attaching the component to your data source using the property. For complex binding scenarios you can optionally set the property to a specific column or list in the data source. You then bind controls to the . All further interaction with the data is accomplished with calls to the component. For examples on how the can simplify the binding process, see [How to: Bind Windows Forms Controls to DBNull Database Values](/dotnet/desktop/winforms/controls/how-to-bind-windows-forms-controls-to-dbnull-database-values) and [How to: Handle Errors and Exceptions that Occur with Databinding](/dotnet/desktop/winforms/controls/how-to-handle-errors-and-exceptions-that-occur-with-databinding). Navigation and updating of the data source is accomplished through methods such as , , and . Operations such as sorting and filtering are handled through the and properties. For more information on using sorting and filtering with the , see [How to: Sort and Filter ADO.NET Data with the Windows Forms BindingSource Component](/dotnet/desktop/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component). In addition, the component can act as a strongly typed data source. Typically the type of the underlying data source is fixed through one of the following mechanisms: -- Use the method to add an item to the component. +- Use the method to add an item to the component. - Set the property to a list, single object, or type. @@ -101,19 +101,19 @@ > [!NOTE] > Because a handles both simple and complex data sources, terminology is problematic. Within this class documentation, the term *list* refers to a data collection within the hosted data source, and *item* denotes a single element. When discussing functionality associated with complex data sources, the equivalent terms *table* and *row* are used. - provides members for accessing the underlying data. The current item can be retrieved through the property, and the entire list can be retrieved through the property. Editing operations are supported on the current item through and the , , and and methods. Although currency management is handled automatically for all underlying data source types, this class exposes a number of events, such as and , that allow for customization. + provides members for accessing the underlying data. The current item can be retrieved through the property, and the entire list can be retrieved through the property. Editing operations are supported on the current item through and the , , and and methods. Although currency management is handled automatically for all underlying data source types, this class exposes a number of events, such as and , that allow for customization. Data sources that are bound to a component can also be navigated and managed with the class, which provides a VCR-like user interface (UI) for navigating items within a list. Although can be bound to any data source, it was designed to integrate with a component through its property. - The default property for the class is . The default event is . + The default property for the class is . The default event is . > [!CAUTION] -> Many of the members of the class operate on the underlying list represented by the property and simply refer their operation to the underlying list. Therefore, when the is bound to a custom implementation of , the exact behavior of these members may differ from the behavior described in the class documentation. For example, the method calls . The documentation describes the method with the understanding that the method for the underlying is correctly implemented. +> Many of the members of the class operate on the underlying list represented by the property and simply refer their operation to the underlying list. Therefore, when the is bound to a custom implementation of , the exact behavior of these members may differ from the behavior described in the class documentation. For example, the method calls . The documentation describes the method with the understanding that the method for the underlying is correctly implemented. ## Examples - The following code example demonstrates a bound to a . The is bound to a that contains a list of fonts. + The following code example demonstrates a bound to a . The is bound to a that contains a list of fonts. :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/BindingListT/FindCore/Form1.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/BindingListT/FindCore/Form1.vb" id="Snippet0"::: @@ -169,11 +169,11 @@ |Property|Default value| |--------------|-------------------| -||`null`| -||| -||`null`| -||`null`| -||`true`| +||`null`| +||| +||`null`| +||`null`| +||`true`| ]]> @@ -295,7 +295,7 @@ method refers the call to the underlying list's `Add` method. + The method refers the call to the underlying list's `Add` method. The internal list must contain homogenous types. If the property has not already been set, then the first object added to the list defines the type for the list. @@ -304,7 +304,7 @@ ## Examples - The following code example how to use the method. To run this example, paste the code into a Windows Form, and call the `PopulateBindingSourceWithFonts` method from the form's constructor. + The following code example how to use the method. To run this example, paste the code into a Windows Form, and call the `PopulateBindingSourceWithFonts` method from the form's constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/Add/Form1.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BindingSource/Add/Form1.vb" id="Snippet6"::: @@ -351,9 +351,9 @@ event occurs before a new object is added to the underlying list represented by the property. This event is fired after the method is called, but before the new item is created and added to the underlying list. By handling this event, the programmer can provide custom item creation and insertion behavior without being forced to derive from the class. This is accomplished in the event handler by setting the property of the parameter to the new item. The new object created in the event must be of the same type as the type contained in the list or an exception will occur. You cannot set the property when bound to a or because you cannot add a new to the list. + The event occurs before a new object is added to the underlying list represented by the property. This event is fired after the method is called, but before the new item is created and added to the underlying list. By handling this event, the programmer can provide custom item creation and insertion behavior without being forced to derive from the class. This is accomplished in the event handler by setting the property of the parameter to the new item. The new object created in the event must be of the same type as the type contained in the list or an exception will occur. You cannot set the property when bound to a or because you cannot add a new to the list. - For more information about supplying custom new item functionality, see the method. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + For more information about supplying custom new item functionality, see the method. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -408,15 +408,15 @@ method adds a new item to the underlying list represented by the property. This method sets up the following series of actions: + The method adds a new item to the underlying list represented by the property. This method sets up the following series of actions: -1. The method is automatically called to commit any pending edit operations. +1. The method is automatically called to commit any pending edit operations. 2. The event is automatically raised. This event can be programmatically handled to construct the new item. This is accomplished in the event handler by setting the property of the parameter to the new item. The new object created in the event must be of the same type as the type contained in the list or an exception will occur. - If the event is not handled, and the underlying list is an , then the request is passed to the list's method. If the underlying list is not an , the item is automatically created through its public parameterless constructor. In either case, the new item is added to the end of the list. + If the event is not handled, and the underlying list is an , then the request is passed to the list's method. If the underlying list is not an , the item is automatically created through its public parameterless constructor. In either case, the new item is added to the end of the list. -3. The new item is added immediately to the internal list unless the data source implements the interface. In this case, the new item is not committed until an explicit call to is made or until a new list operation is initiated. Before it is committed, the new item can be rolled back by calling , in which case the new item is discarded. +3. The new item is added immediately to the internal list unless the data source implements the interface. In this case, the new item is not committed until an explicit call to is made or until a new list operation is initiated. Before it is committed, the new item can be rolled back by calling , in which case the new item is discarded. This method raises the event. @@ -535,7 +535,7 @@ - The item's type does not have a parameterless constructor. > [!NOTE] -> Once the value of this property is set, the getter no longer refers the call to the underlying list. Instead, it simply returns the value that was previously set until the method is called. +> Once the value of this property is set, the getter no longer refers the call to the underlying list. Instead, it simply returns the value that was previously set until the method is called. Setting this property raises the event with set to . @@ -802,9 +802,9 @@ - The data source implements the interface. -- The method has not been called yet. +- The method has not been called yet. - This method calls the method of the underlying , and is scoped to row-level changes. + This method calls the method of the underlying , and is scoped to row-level changes. ]]> @@ -846,7 +846,7 @@ method removes all elements from the underlying list represented by the property and sets the property to zero. + The method removes all elements from the underlying list represented by the property and sets the property to zero. This method raises the event. @@ -898,11 +898,11 @@ ## Remarks Although the implementation is dependent on the underlying list's `Contains` method, typically the following characteristics apply: -- is searched starting at the first element and ending at the last element. +- is searched starting at the first element and ending at the last element. - The underlying method performs a linear search; therefore, the average execution time is proportional to the value of the property. -- The underlying method determines equality by calling the method. +- The underlying method determines equality by calling the method. ]]> @@ -1001,7 +1001,7 @@ ## Examples - The following code example demonstrates the , , and members. To run this example, paste the code into a form that contains a named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. + The following code example demonstrates the , , and members. To run this example, paste the code into a form that contains a named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/Count/form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BindingSource/Count/form1.vb" id="Snippet2"::: @@ -1053,7 +1053,7 @@ method. + If you want to access the currency manager for another binding to the same data member use the method. ]]> @@ -1096,9 +1096,9 @@ property to access the current item, but use the property to get the entire list. To determine the type of the current object, use the , or methods. + Use the property to access the current item, but use the property to get the entire list. To determine the type of the current object, use the , or methods. - To change the current item, set the property to a new integral value, or use one of the navigation methods such as . + To change the current item, set the property to a new integral value, or use one of the navigation methods such as . @@ -1147,11 +1147,11 @@ ## Remarks The event is raised whenever the property changes for any of the following reasons: -- The current position of the changes. +- The current position of the changes. -- The or properties change. +- The or properties change. -- The membership of the underlying changes, which causes to refer to a different item. Examples include adding or deleting an item before the current item, deleting or moving the current item itself, or moving an item to the current position. +- The membership of the underlying changes, which causes to refer to a different item. Examples include adding or deleting an item before the current item, deleting or moving the current item itself, or moving an item to the current position. - The underlying list is refreshed by a new sorting or filtering operation. @@ -1201,7 +1201,7 @@ event is raised in response to all of the circumstances that raise the event. Additionally, is also fired whenever the value of one of the properties of is changed. + The event is raised in response to all of the circumstances that raise the event. Additionally, is also fired whenever the value of one of the properties of is changed. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1308,7 +1308,7 @@ contains multiple lists (or tables) of data, you should set the property to the name of one of the sources. + If the contains multiple lists (or tables) of data, you should set the property to the name of one of the sources. Setting this property raises the event @@ -1414,13 +1414,13 @@ |DataSource property|List results| |-------------------------|------------------| |`null`|An empty of objects. Adding an item sets the list to the type of the added item.| -|`null` with set|Not supported, raises .| +|`null` with set|Not supported, raises .| |Non-list type or object of type "T"|Empty of type "T".| |Array instance| containing the array elements.| | instance|An containing the items.| |List instance containing type "T"| instance containing type "T".| - In addition, can be set to other list types such as and and the will handle them appropriately. In this case, the type contained in the list should have a parameterless constructor. + In addition, can be set to other list types such as and and the will handle them appropriately. In this case, the type contained in the list should have a parameterless constructor. When setting a data source, if the supplied reference contains more than one list or table, you must set the property to a string that specifies the list to bind to. Setting this property raises the event. @@ -1432,7 +1432,7 @@ ## Examples - The following code example assigns a list of customers to the of a component. This code example is part of a larger example provided at [How to: Raise Change Notifications Using the BindingSource ResetItem Method](/dotnet/desktop/winforms/controls/how-to-raise-change-notifications-using-the-bindingsource-resetitem-method). + The following code example assigns a list of customers to the of a component. This code example is part of a larger example provided at [How to: Raise Change Notifications Using the BindingSource ResetItem Method](/dotnet/desktop/winforms/controls/how-to-raise-change-notifications-using-the-bindingsource-resetitem-method). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ResetItem/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/DataSource/form1.cs" id="Snippet6"::: @@ -1564,7 +1564,7 @@ method is called, all pending changes are applied to the underlying data source. + When the method is called, all pending changes are applied to the underlying data source. This method has no effect unless the objects contained by the data source implement the interface. If the objects do not implement the interface, changes to the data are copied to the underlying data source immediately after each change. @@ -1626,13 +1626,13 @@ property allows you to view a subset of the . Only underlying lists that implement the interface support filtering. + Typically used in complex data-binding scenarios, the property allows you to view a subset of the . Only underlying lists that implement the interface support filtering. - When is not `null`, the passes this property to the underlying list. If you set this property during object initialization, the call will be deferred until after initialization is complete. + When is not `null`, the passes this property to the underlying list. If you set this property during object initialization, the call will be deferred until after initialization is complete. To form a filter value, specify the name of a column followed by an operator and a value to filter on. The accepted filter syntax depends on the underlying data source. If the underlying data source is a , , or , you can specify Boolean expressions using the syntax documented for the property. - The value of the property affects the value of the property. Additionally, the value will persist when the data source changes. To stop filtering the , call the method. + The value of the property affects the value of the property. Additionally, the value will persist when the data source changes. To stop filtering the , call the method. @@ -1701,12 +1701,12 @@ ## Remarks This method is typically used in complex data-binding cases to locate the first row where the value of the field specified by the `prop` parameter equals the value of the `key` parameter - This method simply refers the request to the underlying list's method. For example, if the underlying data source is a , , or , this method calls the method. The behavior of , such as the value returned if no matching item is found, depends on the implementation of the method in the underlying list. + This method simply refers the request to the underlying list's method. For example, if the underlying data source is a , , or , this method calls the method. The behavior of , such as the value returned if no matching item is found, depends on the implementation of the method in the underlying list. ## Examples - The following code example demonstrates how to use the method. For the complete example see the class overview topic. + The following code example demonstrates how to use the method. For the complete example see the class overview topic. :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/BindingListT/FindCore/Form1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/BindingListT/FindCore/Form1.vb" id="Snippet4"::: @@ -1758,14 +1758,14 @@ method can only be used when the underlying list is an with searching implemented. This method simply refers the request to the underlying list's method. For example, if the underlying data source is a , , or , this method converts `propertyName` to a and calls the method. The behavior of , such as the value returned if no matching item is found, depends on the implementation of the method in the underlying list. + The method can only be used when the underlying list is an with searching implemented. This method simply refers the request to the underlying list's method. For example, if the underlying data source is a , , or , this method converts `propertyName` to a and calls the method. The behavior of , such as the value returned if no matching item is found, depends on the implementation of the method in the underlying list. The property name comparison is case-insensitive. ## Examples - The following example shows how to use the method with a . To run this example, paste the code into a Windows Form and call `PopulateDataViewAndFind` from the form's constructor or event-handling method. Your form should import the and namespaces. + The following example shows how to use the method with a . To run this example, paste the code into a Windows Form and call `PopulateDataViewAndFind` from the form's constructor or event-handling method. Your form should import the and namespaces. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/Add/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BindingSource/Add/Form1.vb" id="Snippet1"::: @@ -1938,7 +1938,7 @@ returns the main currency manager; otherwise, it checks for another bound to the specified data member and returns its currency manager. + If `dataMember` is `null` or an empty string (""), returns the main currency manager; otherwise, it checks for another bound to the specified data member and returns its currency manager. ]]> @@ -1984,11 +1984,11 @@ ## Remarks Although the implementation is dependent on the underlying list's `IndexOf` method, typically the following characteristics apply: -- The is searched starting at the first element and ending at the last element. +- The is searched starting at the first element and ending at the last element. - The underlying method performs a linear search; therefore, the average execution time is proportional to the value of the property. -- The underlying method determines equality by calling the method. +- The underlying method determines equality by calling the method. ]]> @@ -2222,7 +2222,7 @@ always returns `false` if the list is not an . + always returns `false` if the list is not an . ]]> @@ -2367,26 +2367,26 @@ |Data source type|Underlying list description| |----------------------|---------------------------------| -| and are `null`|An empty .| -| is `null`, but is not `null`|None; an attempt to get the will throw an .| +| and are `null`|An empty .| +| is `null`, but is not `null`|None; an attempt to get the will throw an .| |An instance|An .| -|An instance|The return value from a call to the method of this instance.| +|An instance|The return value from a call to the method of this instance.| |An instance|An .| |An instance|An .| -|A non- instance of type "T"|A with one element.| +|A non- instance of type "T"|A with one element.| |An instance|An with one element.| |An |An with the elements copied over.| -|The type with of item type "T"|A .| -|A that represents an or |An instance created by a call to the method of the class. A may be thrown.| -|The type with of item type "T"

-or-

A non- type|A .| -|The type|None; an attempt to get the will throw an .| +|The type with of item type "T"|A .| +|A that represents an or |An instance created by a call to the method of the class. A may be thrown.| +|The type with of item type "T"

-or-

A non- type|A .| +|The type|None; an attempt to get the will throw an .| If the type retrieved is the interface, the underlying collection may be more complex, such as an or class. ## Examples - The following code example demonstrates the , , and members. To run this example, paste the code into a form that contains a named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. + The following code example demonstrates the , , and members. To run this example, paste the code into a form that contains a named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/Count/form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BindingSource/Count/form1.vb" id="Snippet2"::: @@ -2430,7 +2430,7 @@ event occurs when there is a change to the membership or metadata of the underlying list represented by the property. For example, this event is raised when items are added, removed, or moved, or the or properties change. The values of the and properties will persist when this event occurs. + The event occurs when there is a change to the membership or metadata of the underlying list represented by the property. For example, this event is raised when items are added, removed, or moved, or the or properties change. The values of the and properties will persist when this event occurs. This event can be completely suppressed by setting the property to `false`. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2494,7 +2494,7 @@ ## Examples - The following code example demonstrates the , , , and members. To run this example, paste the code into a form that imports the namespace and contains a named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the and events for the form, and associate the `button1_click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. + The following code example demonstrates the , , , and members. To run this example, paste the code into a form that imports the namespace and contains a named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the and events for the form, and associate the `button1_click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/cpp/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/MoveFirst/form1.cs" id="Snippet1"::: @@ -2589,7 +2589,7 @@ ## Examples - The following code example demonstrates the , , , and members. To run this example, paste the code into a form that imports the namespace and contains a named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the and events for the form, and associate the `button1_click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. + The following code example demonstrates the , , , and members. To run this example, paste the code into a form that imports the namespace and contains a named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the and events for the form, and associate the `button1_click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/cpp/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/MoveFirst/form1.cs" id="Snippet1"::: @@ -2684,7 +2684,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2731,7 +2731,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -2777,7 +2777,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -2824,7 +2824,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -2871,7 +2871,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -2915,7 +2915,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -2964,7 +2964,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -3011,7 +3011,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -3058,7 +3058,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -3114,14 +3114,14 @@ - Negative values are treated as 0. -- Values greater than or equal to are treated as minus 1. +- Values greater than or equal to are treated as minus 1. Changing the property will adjust the property likewise. ## Examples - The following code example demonstrates the , , , and members. To run this example, paste the code into a form that imports the namespace and contains a named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the and events for the form, and associate the `button1_click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. + The following code example demonstrates the , , , and members. To run this example, paste the code into a form that imports the namespace and contains a named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the and events for the form, and associate the `button1_click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/cpp/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/MoveFirst/form1.cs" id="Snippet1"::: @@ -3265,7 +3265,7 @@ method causes the list to be searched for the `value` parameter. If found, this method will attempt to remove the item from the . This attempt will fail if the list has a fixed size or is read-only. These two conditions can be tested with the and properties, respectively. + The method causes the list to be searched for the `value` parameter. If found, this method will attempt to remove the item from the . This attempt will fail if the list has a fixed size or is read-only. These two conditions can be tested with the and properties, respectively. This method raises the event. @@ -3318,14 +3318,14 @@ and properties, respectively. + These two conditions can be tested with the and properties, respectively. This method raises the event. ## Examples - The following code example demonstrates the , , and members. To run this example, paste the code into a form that contains a named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. + The following code example demonstrates the , , and members. To run this example, paste the code into a form that contains a named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the event for `button1`. Visual Basic users will need to add a reference to System.Data.dll. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/Count/form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BindingSource/Count/form1.vb" id="Snippet2"::: @@ -3376,7 +3376,7 @@ method is equivalent to the method. + The method is equivalent to the method. ]]> @@ -3426,7 +3426,7 @@ method refers the request to the underlying list's method. Only lists that implement support filtering. + The method refers the request to the underlying list's method. Only lists that implement support filtering. By default, a call to this method is equivalent to setting the property to `null`. @@ -3469,7 +3469,7 @@ method refers the request to the underlying list's method. Only lists that implement support sorting. + The method refers the request to the underlying list's method. Only lists that implement support sorting. By default, a call to this method is equivalent to setting the property to `null`. @@ -3515,7 +3515,7 @@ method reinitializes the property to reflect the value of the corresponding property in the underlying list. + The method reinitializes the property to reflect the value of the corresponding property in the underlying list. ]]> @@ -3556,20 +3556,20 @@ method informs all controls bound to the to refresh their values. The method does this by raising the event at least once; the `metaDataChanged` parameter indicates the nature of the underlying change. + The method informs all controls bound to the to refresh their values. The method does this by raising the event at least once; the `metaDataChanged` parameter indicates the nature of the underlying change. - A `metaDataChanged` value of `true` indicates that the data schema of has changed. A event is raised with set to . - A `metaDataChanged` value of `false` indicates that only the values of one or more items have changed. - Regardless of the value of `metaDataChanged`, a event is raised with set to . As a consequence, calling with a parameter of `true` will raise two events. + Regardless of the value of `metaDataChanged`, a event is raised with set to . As a consequence, calling with a parameter of `true` will raise two events. - is automatically called whenever another member makes major changes to the data-binding, such as setting the or properties. However, the programmer can also call this method explicitly. + is automatically called whenever another member makes major changes to the data-binding, such as setting the or properties. However, the programmer can also call this method explicitly. ## Examples - The following code example uses a component to bind an array list, which does not provide change notification. An item is removed from the list, and the bound controls are notified of the change by calling the method. This code example is part of a larger example provided in [How to: Reflect Data Source Updates in a Windows Forms Control with the BindingSource](/dotnet/desktop/winforms/controls/reflect-data-source-updates-in-a-wf-control-with-the-bindingsource). + The following code example uses a component to bind an array list, which does not provide change notification. An item is removed from the list, and the bound controls are notified of the change by calling the method. This code example is part of a larger example provided in [How to: Reflect Data Source Updates in a Windows Forms Control with the BindingSource](/dotnet/desktop/winforms/controls/reflect-data-source-updates-in-a-wf-control-with-the-bindingsource). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ResetBindings/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/ResetBindings/form1.cs" id="Snippet3"::: @@ -3652,14 +3652,14 @@ method notifies all controls bound to the item at the specified to refresh their values. The method does this by raising the event with set to . + The method notifies all controls bound to the item at the specified to refresh their values. The method does this by raising the event with set to . - is automatically called whenever changes are made to the value of an individual item. However, the programmer can also call this method explicitly. + is automatically called whenever changes are made to the value of an individual item. However, the programmer can also call this method explicitly. ## Examples - The following code example uses a component to bind a list to a control. The list does not raise change notifications, so the method on the is used to raise the event. This code example is part of a larger example provided in [How to: Raise Change Notifications Using the BindingSource ResetItem Method](/dotnet/desktop/winforms/controls/how-to-raise-change-notifications-using-the-bindingsource-resetitem-method). + The following code example uses a component to bind a list to a control. The list does not raise change notifications, so the method on the is used to raise the event. This code example is part of a larger example provided in [How to: Raise Change Notifications Using the BindingSource ResetItem Method](/dotnet/desktop/winforms/controls/how-to-raise-change-notifications-using-the-bindingsource-resetitem-method). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ResetItem/CPP/form1.cpp" id="Snippet7"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingSource/DataSource/form1.cs" id="Snippet7"::: @@ -3703,10 +3703,10 @@ and are two methods that allow the temporary suspension and resumption of data binding in a simple-binding scenario. You would typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. + and are two methods that allow the temporary suspension and resumption of data binding in a simple-binding scenario. You would typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. > [!NOTE] -> Using prevents changes from being pushed into the data source until is called, but does not actually prevent any events from occurring. Controls that use complex data binding, such as the control, update their values based on change events such as the event, so calling will not prevent them from receiving changes to the data source. For this reason, this and are designed for use with simple-bound controls, such as the control. Alternatively you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. +> Using prevents changes from being pushed into the data source until is called, but does not actually prevent any events from occurring. Controls that use complex data binding, such as the control, update their values based on change events such as the event, so calling will not prevent them from receiving changes to the data source. For this reason, this and are designed for use with simple-bound controls, such as the control. Alternatively you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. ]]> @@ -3760,7 +3760,7 @@ Setting the property will change the internal list depending on its type: -- If the list is of type , the and properties are set in the internal list. +- If the list is of type , the and properties are set in the internal list. - If the list is of type , the property is set. @@ -3937,7 +3937,7 @@ The is a read-only co , always returns `null`. + If the list is not an , always returns `null`. ]]> @@ -3983,7 +3983,7 @@ The is a read-only co , always returns `false`. + If the list is not an , always returns `false`. ]]> @@ -4068,7 +4068,7 @@ The is a read-only co , always returns `false`. + If the list is not an , always returns `false`. ]]> @@ -4114,12 +4114,12 @@ The is a read-only co , always returns `false`. + If the data source is not an , always returns `false`. ## Examples - The following code example demonstrates how to use the member. For the complete example see the class overview topic. + The following code example demonstrates how to use the member. For the complete example see the class overview topic. :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/BindingListT/FindCore/Form1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/BindingListT/FindCore/Form1.vb" id="Snippet4"::: @@ -4204,10 +4204,10 @@ The is a read-only co and are two methods that allow the temporary suspension and resumption of data binding in a simple-binding scenario. You would typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. + and are two methods that allow the temporary suspension and resumption of data binding in a simple-binding scenario. You would typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. > [!NOTE] -> Using and prevents changes from being pushed into the data source until is called, but does not actually prevent any events from occurring. Controls that use complex data binding, such as the control, update their values based on change events such as the event, so calling will not prevent them from receiving changes to the data source. For this reason, this and are designed for use with simple-bound controls, such as the control. Alternatively you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. +> Using and prevents changes from being pushed into the data source until is called, but does not actually prevent any events from occurring. Controls that use complex data binding, such as the control, update their values based on change events such as the event, so calling will not prevent them from receiving changes to the data source. For this reason, this and are designed for use with simple-bound controls, such as the control. Alternatively you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. ]]> @@ -4377,7 +4377,7 @@ The is a read-only co method rolls back a pending addition of an item previously added to the collection at the index specified by `position`. The `position` parameter is necessary because several new items can be simultaneously pending. + The method rolls back a pending addition of an item previously added to the collection at the index specified by `position`. The `position` parameter is necessary because several new items can be simultaneously pending. ]]> @@ -4420,7 +4420,7 @@ The is a read-only co method commits a pending addition of an item previously added to the collection at the index specified by `position`. The `position` parameter is necessary because several new items can be simultaneously pending. + The method commits a pending addition of an item previously added to the collection at the index specified by `position`. The `position` parameter is necessary because several new items can be simultaneously pending. ]]> diff --git a/xml/System.Windows.Forms/BindingsCollection.xml b/xml/System.Windows.Forms/BindingsCollection.xml index bd7ec30ad87..da03918791a 100644 --- a/xml/System.Windows.Forms/BindingsCollection.xml +++ b/xml/System.Windows.Forms/BindingsCollection.xml @@ -159,7 +159,7 @@ event occurs when you invoke the method. + The event occurs when you invoke the method. ]]> @@ -237,7 +237,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `BindingsCollection1`. Then ensure that the event handler is associated with the event. @@ -289,7 +289,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `BindingsCollection1`. Then ensure that the event handler is associated with the event. @@ -365,7 +365,7 @@ value of each in a control's . + The following example prints the value of each in a control's . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic BindingsCollection.this Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingsCollection/Item/source.cs" id="Snippet1"::: @@ -443,7 +443,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -490,7 +490,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/Border3DSide.xml b/xml/System.Windows.Forms/Border3DSide.xml index db2ff8b3a53..3d01275a653 100644 --- a/xml/System.Windows.Forms/Border3DSide.xml +++ b/xml/System.Windows.Forms/Border3DSide.xml @@ -34,11 +34,11 @@ Specifies the sides of a rectangle to apply a three-dimensional border to. - method of the class. - + method of the class. + ]]> diff --git a/xml/System.Windows.Forms/Border3DStyle.xml b/xml/System.Windows.Forms/Border3DStyle.xml index 609f8fb78f4..49708372ec0 100644 --- a/xml/System.Windows.Forms/Border3DStyle.xml +++ b/xml/System.Windows.Forms/Border3DStyle.xml @@ -30,20 +30,20 @@ Specifies the style of a three-dimensional border. - method of the class. - - - -## Examples - The following code example demonstrates the use of the method and the enumeration. To run this example paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Ensure the form's event is associated with the event-handling method in this example. - + method of the class. + + + +## Examples + The following code example demonstrates the use of the method and the enumeration. To run this example paste the following code in a form that imports the System.Windows.Forms and System.Drawing namespaces. Ensure the form's event is associated with the event-handling method in this example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Border3DStyle/Overview/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Border3DStyle/Overview/form1.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Windows.Forms/BorderStyle.xml b/xml/System.Windows.Forms/BorderStyle.xml index b1a5720401a..aec5629ced8 100644 --- a/xml/System.Windows.Forms/BorderStyle.xml +++ b/xml/System.Windows.Forms/BorderStyle.xml @@ -30,20 +30,20 @@ Specifies the border style for a control. - enumeration and the , and the properties. To run this example, paste the following code in a form and call the InitializeTreeView method in the form's constructor or Load method. - + enumeration and the , and the properties. To run this example, paste the following code in a form and call the InitializeTreeView method in the form's constructor or Load method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BorderStyle/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BorderStyle/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/BoundsSpecified.xml b/xml/System.Windows.Forms/BoundsSpecified.xml index ab4af1d70c3..d54d23a9420 100644 --- a/xml/System.Windows.Forms/BoundsSpecified.xml +++ b/xml/System.Windows.Forms/BoundsSpecified.xml @@ -30,18 +30,18 @@ Specifies the bounds of the control to use when defining a control's size and position. - and methods of the class. - - - -## Examples + and methods of the class. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.Layout/CPP/layout.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BoundsSpecified/Overview/layout.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BoundsSpecified/Overview/layout.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/BoundsSpecified/Overview/layout.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/Button.xml b/xml/System.Windows.Forms/Button.xml index 78b3a9a4d13..2724187ae39 100644 --- a/xml/System.Windows.Forms/Button.xml +++ b/xml/System.Windows.Forms/Button.xml @@ -56,9 +56,9 @@ ## Remarks A can be clicked by using the mouse, ENTER key, or SPACEBAR if the button has focus. - Set the or property of a to allow users to click a button by pressing the ENTER or ESC keys even if the button does not have focus. This gives the form the behavior of a dialog box. + Set the or property of a to allow users to click a button by pressing the ENTER or ESC keys even if the button does not have focus. This gives the form the behavior of a dialog box. - When you display a form using the method, you can use the property of a button to specify the return value of . + When you display a form using the method, you can use the property of a button to specify the return value of . You can change the button's appearance. For example, to make it appear flat for a Web look, set the property to . The property can also be set to , which appears flat until the mouse pointer passes over the button; then the button takes on the standard Windows button appearance. @@ -277,7 +277,7 @@ for this property is set to anything other than `None`, and if the parent form was displayed through the method, clicking the button closes the parent form without your having to hook up any events. The form's property is then set to the of the button when the button is clicked. + If the for this property is set to anything other than `None`, and if the parent form was displayed through the method, clicking the button closes the parent form without your having to hook up any events. The form's property is then set to the of the button when the button is clicked. For example, to create a "Yes/No/Cancel" dialog box, simply add three buttons and set their properties to `Yes`, `No`, and `Cancel`. @@ -347,7 +347,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Button1`. Then ensure that the event handler is associated with the event. @@ -409,7 +409,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Button1`. Then ensure that the event handler is associated with the event. @@ -460,7 +460,7 @@ ## Remarks This method is called by the parent form to notify the that it should be set as the default button and to allow it to adjust its appearance accordingly. Typically, a button that is the default button for a form has a thicker border than other buttons on the form. - Calling the method only draws the button as a default button; it does not change its behavior. To make the button behave like a default button, it must be assigned to the property of the . + Calling the method only draws the button as a default button; it does not change its behavior. To make the button behave like a default button, it must be assigned to the property of the . ]]> @@ -539,7 +539,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -650,7 +650,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -695,7 +695,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -794,7 +794,7 @@ in a derived class, be sure to call the base class's to ensure that basic functionality remains unchanged. + When overriding in a derived class, be sure to call the base class's to ensure that basic functionality remains unchanged. ]]> diff --git a/xml/System.Windows.Forms/ButtonBase.xml b/xml/System.Windows.Forms/ButtonBase.xml index 80c43ea2e93..eca016b0619 100644 --- a/xml/System.Windows.Forms/ButtonBase.xml +++ b/xml/System.Windows.Forms/ButtonBase.xml @@ -52,7 +52,7 @@ ## Remarks You do not typically inherit from . To create your own button class, inherit from the , , or class. - To have the derived button control display an image, set the property or the and properties. The image can be aligned on the button control by setting the property. Likewise, to align the displayed on the button control, set the property. + To have the derived button control display an image, set the property or the and properties. The image can be aligned on the button control by setting the property. Likewise, to align the displayed on the button control, set the property. The property determines the style and appearance of the control. If the property is set to , the user's operating system determines the appearance of the control. @@ -139,7 +139,7 @@ to `true` to display text that extends beyond the width of the control as a tooltip when the user passes over the control with the mouse. You must set the control's `AutoSize` property to `false` if you want to be `true`. If `AutoSize` is `true`, the control will grow to fit the text and an ellipsis will not appear. + Set to `true` to display text that extends beyond the width of the control as a tooltip when the user passes over the control with the mouse. You must set the control's `AutoSize` property to `false` if you want to be `true`. If `AutoSize` is `true`, the control will grow to fit the text and an ellipsis will not appear. ]]> @@ -238,7 +238,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ButtonBase1` and ensure that the event handler is associated with the event. @@ -820,7 +820,7 @@ differs by control. The might be unable to assign the returned size to the control. You can return a size larger than the constraints indicated in the `proposedSize` parameter, but `proposedSize` should decrease as the constraint decreases. For example, `GetPreferredSize(new Size(100, 0))` should not be wider than `GetPreferredSize(new Size(200, 0))`. The exception is a `proposedSize` of 0 or `Size.Empty`, which are defined as unconstrained. + The behavior of differs by control. The might be unable to assign the returned size to the control. You can return a size larger than the constraints indicated in the `proposedSize` parameter, but `proposedSize` should decrease as the constraint decreases. For example, `GetPreferredSize(new Size(100, 0))` should not be wider than `GetPreferredSize(new Size(200, 0))`. The exception is a `proposedSize` of 0 or `Size.Empty`, which are defined as unconstrained. ]]> @@ -1006,18 +1006,18 @@ or properties are set, the property is set to its default value, `null`. + When the or properties are set, the property is set to its default value, `null`. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). -If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. ## Examples - The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. + The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/ImageIndex/source.cs" id="Snippet1"::: @@ -1089,8 +1089,8 @@ For example, consider a button control whose property specifies the image from the image list to display on the control. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -1146,15 +1146,15 @@ If you set the property, the or property is set, the property is set `null`, which is its default value. + When the or property is set, the property is set `null`, which is its default value. > [!NOTE] -> If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (because the collection is a zero-based index), the property value is adjusted to one less than the property value. For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +> If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (because the collection is a zero-based index), the property value is adjusted to one less than the property value. For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. ## Examples - The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. + The following code example uses the derived class, and sets the and properties. This code requires that an has been created and a minimum of one has been assigned to it. This code also requires that you have a bitmap image named `MyBitMap.bmp` stored in the `C:\Graphics` directory. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ButtonBase.ImageIndex Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonBase/ImageIndex/source.cs" id="Snippet1"::: @@ -1576,7 +1576,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1622,10 +1622,10 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. > [!NOTE] -> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. +> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. ]]> @@ -1671,7 +1671,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1717,7 +1717,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1763,10 +1763,10 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. > [!NOTE] -> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. +> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. ]]>
@@ -1812,10 +1812,10 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. > [!NOTE] -> Do not call if the button is disabled (this includes call to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. +> Do not call if the button is disabled (this includes call to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. ]]>
@@ -1861,7 +1861,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1907,10 +1907,10 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. > [!NOTE] -> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. +> Do not call if the button is disabled (this includes calls to the base class's method when you override in a derived class). When disabling the button in an override of , call the base class's method before disabling the button, or do not call it at all. ]]>
@@ -1955,7 +1955,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -2001,7 +2001,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -2360,7 +2360,7 @@ If you set the property, the class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, it's recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. -You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. +You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. ]]>
diff --git a/xml/System.Windows.Forms/ButtonBorderStyle.xml b/xml/System.Windows.Forms/ButtonBorderStyle.xml index a3ac84d498c..801fc0f1ef3 100644 --- a/xml/System.Windows.Forms/ButtonBorderStyle.xml +++ b/xml/System.Windows.Forms/ButtonBorderStyle.xml @@ -24,13 +24,13 @@ Specifies the border style for a button control. - . - - updates the display of the button when controls are initially drawn or refreshed. - + . + + updates the display of the button when controls are initially drawn or refreshed. + ]]> diff --git a/xml/System.Windows.Forms/ButtonRenderer.xml b/xml/System.Windows.Forms/ButtonRenderer.xml index 0d52ae5841d..1c7020005c2 100644 --- a/xml/System.Windows.Forms/ButtonRenderer.xml +++ b/xml/System.Windows.Forms/ButtonRenderer.xml @@ -37,16 +37,16 @@ class provides a set of `static` methods that can be used to render a button control. Rendering a control refers to drawing the user interface of a control. To draw a button, use one of the methods. These methods provide a variety of options, such as drawing text or an image on the button. + The class provides a set of `static` methods that can be used to render a button control. Rendering a control refers to drawing the user interface of a control. To draw a button, use one of the methods. These methods provide a variety of options, such as drawing text or an image on the button. - If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the button with the current visual style. Otherwise, will draw the button with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. + If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the button with the current visual style. Otherwise, will draw the button with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. This class wraps the functionality of a that is set to one of the elements exposed by the class. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). ## Examples - The following code example demonstrates how to create a custom control that uses the method to draw a button. When the button is clicked, the control draws a smaller button inside the bounds of the original button, and the control uses the method to paint over the rest of the original button. + The following code example demonstrates how to create a custom control that uses the method to draw a button. When the button is clicked, the control draws a smaller button inside the bounds of the original button, and the control uses the method to paint over the rest of the original button. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ButtonRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonRenderer/Overview/form1.cs" id="Snippet0"::: @@ -274,7 +274,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a button in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a button in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ButtonRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonRenderer/Overview/form1.cs" id="Snippet2"::: @@ -530,7 +530,7 @@ method to paint over an area of a custom control. This code example is part of a larger example provided for the class. + The following code example uses the method to paint over an area of a custom control. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ButtonRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonRenderer/Overview/form1.cs" id="Snippet4"::: @@ -615,7 +615,7 @@ property is `true`, the uses the setting from the property to determine the rendering style. If is `false`, the renderer will always render using visual styles. + If the property is `true`, the uses the setting from the property to determine the rendering style. If is `false`, the renderer will always render using visual styles. ]]> diff --git a/xml/System.Windows.Forms/ButtonState.xml b/xml/System.Windows.Forms/ButtonState.xml index 6bbba5c9bc5..5a11aaf2887 100644 --- a/xml/System.Windows.Forms/ButtonState.xml +++ b/xml/System.Windows.Forms/ButtonState.xml @@ -30,20 +30,20 @@ Specifies the appearance of a button. - to specify the state of `button1`. To run the example, create two buttons, `button1` and `button2`. Then replace the `button2_Click` method with the example code. Click `button2` to redraw `button1` and change its state to `Flat`. - + to specify the state of `button1`. To run the example, create two buttons, `button1` and `button2`. Then replace the `button2_Click` method with the example code. Click `button2` to redraw `button1` and change its state to `Flat`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ButtonState/CPP/buttonstate1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ButtonState/Overview/buttonstate1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ButtonState/Overview/buttonstate1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ButtonState/Overview/buttonstate1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/CacheVirtualItemsEventArgs.xml b/xml/System.Windows.Forms/CacheVirtualItemsEventArgs.xml index bec53769e64..60a720976c1 100644 --- a/xml/System.Windows.Forms/CacheVirtualItemsEventArgs.xml +++ b/xml/System.Windows.Forms/CacheVirtualItemsEventArgs.xml @@ -24,21 +24,21 @@ Provides data for the event. - event occurs when a new area of a in virtual mode is exposed and the determines a new range of items is needed. - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event occurs when a new area of a in virtual mode is exposed and the determines a new range of items is needed. + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet465"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet465"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet465"::: + ]]> @@ -113,21 +113,21 @@ Gets the ending index for the range of values needed by a control in virtual mode. The index at the end of the range of values needed by the control. - and properties represents the range of values most likely needed by a virtual control for the next occurrence of a event. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + and properties represents the range of values most likely needed by a virtual control for the next occurrence of a event. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet465"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet465"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet465"::: + ]]> @@ -165,21 +165,21 @@ Gets the starting index for a range of values needed by a control in virtual mode. The index at the start of the range of values needed by the control. - and properties represents the range of values most likely needed by a virtual control for the next occurrence of a event. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + and properties represents the range of values most likely needed by a virtual control for the next occurrence of a event. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet465"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet465"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet465"::: + ]]> diff --git a/xml/System.Windows.Forms/CaptionButton.xml b/xml/System.Windows.Forms/CaptionButton.xml index a1934eb4be4..a7a5bad7d9d 100644 --- a/xml/System.Windows.Forms/CaptionButton.xml +++ b/xml/System.Windows.Forms/CaptionButton.xml @@ -24,22 +24,22 @@ Specifies the type of caption button to display. - . - - Caption buttons are the system buttons usually found on the rightmost side of a form's title bar. - - - -## Examples - The following code example demonstrates the use the method and the enumeration. To run this example paste the following code in a form containing a Button named Button1. The form should import the System.Windows.Forms and System.Drawing namespaces. Ensure the button's Paint event is associated with the event-handling method in this example. - + . + + Caption buttons are the system buttons usually found on the rightmost side of a form's title bar. + + + +## Examples + The following code example demonstrates the use the method and the enumeration. To run this example paste the following code in a form containing a Button named Button1. The form should import the System.Windows.Forms and System.Drawing namespaces. Ensure the button's Paint event is associated with the event-handling method in this example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Border3DStyle/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Border3DStyle/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/CheckBox+CheckBoxAccessibleObject.xml b/xml/System.Windows.Forms/CheckBox+CheckBoxAccessibleObject.xml index 35c2a5d59da..ee342d09605 100644 --- a/xml/System.Windows.Forms/CheckBox+CheckBoxAccessibleObject.xml +++ b/xml/System.Windows.Forms/CheckBox+CheckBoxAccessibleObject.xml @@ -40,9 +40,9 @@ ## Remarks Windows Forms has accessibility support built in and provides information about your application that allows it to work with accessibility client applications. Examples of accessibility client applications are screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. The class inherits from the class to provide information about the control to accessibility client applications. - There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. - If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. + If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. ]]>
diff --git a/xml/System.Windows.Forms/CheckBox.xml b/xml/System.Windows.Forms/CheckBox.xml index 95fea885fc1..2086c88b8ce 100644 --- a/xml/System.Windows.Forms/CheckBox.xml +++ b/xml/System.Windows.Forms/CheckBox.xml @@ -83,7 +83,7 @@ ## Examples - The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . + The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/Overview/source.cs" id="Snippet1"::: @@ -122,12 +122,12 @@ is instantiated, is set to `true`, is set to `false`, and is set to . + By default, when a new is instantiated, is set to `true`, is set to `false`, and is set to . ## Examples - The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . + The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/Overview/source.cs" id="Snippet1"::: @@ -183,12 +183,12 @@ value is set to , the has a typical appearance. If the value is set to `Button`, the appears like a toggle button, which can be toggled to an up or down state. + If value is set to , the has a typical appearance. If the value is set to `Button`, the appears like a toggle button, which can be toggled to an up or down state. ## Examples - The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . + The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/Overview/source.cs" id="Snippet1"::: @@ -242,7 +242,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CheckBox1`. Then ensure that the event handler is associated with the event. @@ -300,12 +300,12 @@ is set to false, you will need to add code to update the or values in the event handler. + If is set to false, you will need to add code to update the or values in the event handler. ## Examples - The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . + The following code example creates and initializes a , gives it the appearance of a toggle button, sets to `false`, and adds it to a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/Overview/source.cs" id="Snippet1"::: @@ -364,7 +364,7 @@ property alternates between `true` and `false` with alternating clicks of the control and the alternates between the `MiddleRight` and `MiddleLeft` values of . This example shows how the property values change as the property changes and the control is checked. This example requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. + The following code example displays the values of three properties in a label. The property alternates between `true` and `false` with alternating clicks of the control and the alternates between the `MiddleRight` and `MiddleLeft` values of . This example shows how the property values change as the property changes and the control is checked. This example requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckAlign Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/CheckAlign/source.cs" id="Snippet1"::: @@ -429,10 +429,10 @@ Note: If the property portion of the control displays a check mark. If the property is set to `Button`, the control will appear sunken when is `true` and raised like a standard button when `false`. + When the value is `true`, the portion of the control displays a check mark. If the property is set to `Button`, the control will appear sunken when is `true` and raised like a standard button when `false`. ## Examples - The following code example displays the values of three properties in a label. The property alternates between `true` and `false` with alternating clicks of the control and the alternates between a value of `MiddleRight` and `MiddleLeft`. This example shows how the property values change as the property changes and the control is checked. This example requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. + The following code example displays the values of three properties in a label. The property alternates between `true` and `false` with alternating clicks of the control and the alternates between a value of `MiddleRight` and `MiddleLeft`. This example shows how the property values change as the property changes and the control is checked. This example requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckAlign Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/CheckAlign/source.cs" id="Snippet1"::: @@ -486,7 +486,7 @@ Note: If the property ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CheckBox1`. Then ensure that the event handler is associated with the event. @@ -549,7 +549,7 @@ Note: If the property ## Remarks If the property is set to `false`, the property value can only be set to `CheckState.Indeterminate` in code and not by user interaction. - The following table describes the of the control in its different states for the `Normal` and `Button` style control . + The following table describes the of the control in its different states for the `Normal` and `Button` style control . |CheckState|Appearance.Normal|Appearance.Button| |----------------|-----------------------|-----------------------| @@ -560,7 +560,7 @@ Note: If the property ## Examples - The following code example displays the values of three properties in a label. The property alternates between `true` and `false` with alternating clicks of the control and the alternates between the `MiddleRight` and `MiddleLeft` values of . This example shows how the property values change as the property changes and the control is checked. This example requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. + The following code example displays the values of three properties in a label. The property alternates between `true` and `false` with alternating clicks of the control and the alternates between the `MiddleRight` and `MiddleLeft` values of . This example shows how the property values change as the property changes and the control is checked. This example requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckAlign Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/CheckAlign/source.cs" id="Snippet1"::: @@ -615,7 +615,7 @@ Note: If the property ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CheckBox1`. Then ensure that the event handler is associated with the event. @@ -659,7 +659,7 @@ Note: If the property method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. @@ -883,7 +883,7 @@ Note: If the property ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -929,7 +929,7 @@ Note: If the property ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -975,7 +975,7 @@ Note: If the property ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1019,11 +1019,11 @@ Note: If the property method changes the property. If the property is set to `true`, subsequent clicks of the will result in cycling through all the values of the enumeration. Otherwise, switches between and . + The method changes the property. If the property is set to `true`, subsequent clicks of the will result in cycling through all the values of the enumeration. Otherwise, switches between and . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1166,7 +1166,7 @@ Note: If the property method to determine whether the given character matches a mnemonic in the control's text. + This method is called to give a control the opportunity to process a mnemonic character. The method should determine whether the control is in a state to process mnemonics and if whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. Implementations of this method often use the method to determine whether the given character matches a mnemonic in the control's text. For example: @@ -1176,12 +1176,12 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { } ``` - This default implementation of the method simply returns `false` to indicate that the control has no mnemonic. + This default implementation of the method simply returns `false` to indicate that the control has no mnemonic. ## Examples - The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example, paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. + The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example, paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/ProcessMnemonic/form1.cs" id="Snippet1"::: @@ -1315,7 +1315,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Examples - The following code example displays the values of three properties in a label. The property alternates between `true` and `false` with alternating clicks of the control and the alternates between the `MiddleRight` and `MiddleLeft` values of . This example shows how the property values change as the property changes and the control is checked. This code requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. + The following code example displays the values of three properties in a label. The property alternates between `true` and `false` with alternating clicks of the control and the alternates between the `MiddleRight` and `MiddleLeft` values of . This example shows how the property values change as the property changes and the control is checked. This code requires that a , and have all been instantiated on a form and that the label is large enough to display three lines of text, as well as a reference to the namespace. This code should be called in the event handler of the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CheckBox.CheckAlign Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/CheckAlign/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/CheckBoxRenderer.xml b/xml/System.Windows.Forms/CheckBoxRenderer.xml index e86bda9754f..86701ee6817 100644 --- a/xml/System.Windows.Forms/CheckBoxRenderer.xml +++ b/xml/System.Windows.Forms/CheckBoxRenderer.xml @@ -37,16 +37,16 @@ class provides a set of `static` methods that can be used to render a check box control. Rendering a control refers to drawing the user interface of a control. To draw a check box, use one of the methods. These methods provide a variety of options, such as drawing text or an image with the check box. + The class provides a set of `static` methods that can be used to render a check box control. Rendering a control refers to drawing the user interface of a control. To draw a check box, use one of the methods. These methods provide a variety of options, such as drawing text or an image with the check box. - If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the check box with the current visual style. Otherwise, will draw the check box with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. + If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the check box with the current visual style. Otherwise, will draw the check box with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. This class wraps the functionality of a that is set to one of the elements exposed by the class. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). ## Examples - The following code example demonstrates how to write a custom control that uses the method to draw a check box that responds to mouse clicks. + The following code example demonstrates how to write a custom control that uses the method to draw a check box that responds to mouse clicks. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.CheckBoxRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBoxRenderer/Overview/form1.cs" id="Snippet0"::: @@ -241,7 +241,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a check box in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a check box in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.CheckBoxRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBoxRenderer/Overview/form1.cs" id="Snippet4"::: @@ -481,7 +481,7 @@ ## Examples - The following code example uses the method to determine the bounds of the check box text. This code example is part of a larger example provided for the class. + The following code example uses the method to determine the bounds of the check box text. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.CheckBoxRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBoxRenderer/Overview/form1.cs" id="Snippet2"::: @@ -567,7 +567,7 @@ property is `true`, the uses the setting from the property to determine the rendering style. If is `false`, the renderer will always render using visual styles. + If the property is `true`, the uses the setting from the property to determine the rendering style. If is `false`, the renderer will always render using visual styles. ]]> diff --git a/xml/System.Windows.Forms/CheckedListBox+CheckedIndexCollection.xml b/xml/System.Windows.Forms/CheckedListBox+CheckedIndexCollection.xml index c33b1330dcf..dccaaf5d2a1 100644 --- a/xml/System.Windows.Forms/CheckedListBox+CheckedIndexCollection.xml +++ b/xml/System.Windows.Forms/CheckedListBox+CheckedIndexCollection.xml @@ -64,16 +64,16 @@ |1|3| |2|4| - The class has two members that allow you to access the stored indexes, the property and the method. + The class has two members that allow you to access the stored indexes, the property and the method. - Based on the previous example, a call to the property with a parameter value of 1 returns a value of 3. A call to with a parameter of 3 returns a value of 1. + Based on the previous example, a call to the property with a parameter value of 1 returns a value of 3. A call to with a parameter of 3 returns a value of 1. ## Examples - The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the method to set the check state of an item. The example also demonstrates using the property to get the , and the property to get the . + The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the method to set the check state of an item. The example also demonstrates using the property to get the , and the property to get the . - The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. + The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet2"::: @@ -122,7 +122,7 @@ collection is in the collection. + You can use this method to determine whether an index from the collection is in the collection. ]]> @@ -499,7 +499,7 @@ class directly. To add an item to the , use the or method. + You cannot change the class directly. To add an item to the , use the or method. ]]> @@ -541,7 +541,7 @@ class directly. To clear the , use the or method. + You cannot change the class directly. To clear the , use the or method. ]]> @@ -672,7 +672,7 @@ class directly. To add an item to the , use the or method. + You cannot change the class directly. To add an item to the , use the or method. ]]> @@ -807,7 +807,7 @@ class directly. To remove an item from the , use the or method. + You cannot change the class directly. To remove an item from the , use the or method. ]]> @@ -851,7 +851,7 @@ class directly. To remove an item from the , use the or method. + You cannot change the class directly. To remove an item from the , use the or method. ]]> diff --git a/xml/System.Windows.Forms/CheckedListBox+CheckedItemCollection.xml b/xml/System.Windows.Forms/CheckedListBox+CheckedItemCollection.xml index c65ca61d990..d585d1e8830 100644 --- a/xml/System.Windows.Forms/CheckedListBox+CheckedItemCollection.xml +++ b/xml/System.Windows.Forms/CheckedListBox+CheckedItemCollection.xml @@ -64,16 +64,16 @@ |1|object 4| |2|object 5| - The class has two members that allow you to access the stored indexes, the property and the method. + The class has two members that allow you to access the stored indexes, the property and the method. - Based on the previous example, a call to the property with a parameter value of 1 returns object 4. A call to with a parameter of object 4 returns a value of 1. + Based on the previous example, a call to the property with a parameter value of 1 returns object 4. A call to with a parameter of object 4 returns a value of 1. ## Examples - The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the method to set the check state of an item. The example also demonstrates using the property to get the , and the property to get the . + The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the method to set the check state of an item. The example also demonstrates using the property to get the , and the property to get the . - The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. + The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet2"::: @@ -123,7 +123,7 @@ collection is in the collection. + This method determines if an object from the collection is in the collection. ]]> @@ -288,7 +288,7 @@ collection is a subset of the objects in the collection, representing only items that are checked. This collection is ordered in ascending order. + The collection is a subset of the objects in the collection, representing only items that are checked. This collection is ordered in ascending order. ]]> @@ -381,7 +381,7 @@ collection is a subset of the objects in the collection, representing only items that are checked. This collection is ordered in ascending order. + The collection is a subset of the objects in the collection, representing only items that are checked. This collection is ordered in ascending order. ]]> diff --git a/xml/System.Windows.Forms/CheckedListBox+ObjectCollection.xml b/xml/System.Windows.Forms/CheckedListBox+ObjectCollection.xml index e87a348c386..b800d0a693b 100644 --- a/xml/System.Windows.Forms/CheckedListBox+ObjectCollection.xml +++ b/xml/System.Windows.Forms/CheckedListBox+ObjectCollection.xml @@ -34,14 +34,14 @@ , by the property. To create a collection of objects to display in the control, you can add or remove the items individually by using the and methods. + The collection is accessed from the parent control, , by the property. To create a collection of objects to display in the control, you can add or remove the items individually by using the and methods. ## Examples - The following example enumerates the items in the and checks every other item in the list. The example demonstrates using the property to get the to get the of items. + The following example enumerates the items in the and checks every other item in the list. The example demonstrates using the property to get the to get the of items. - The example also demonstrates using the and methods to set the check state of an item. For every other item that is to be checked, is called to set the to `Indeterminate`, while is called on the other item to set the checked state to `Checked`. + The example also demonstrates using the and methods to set the check state of an item. For every other item that is to be checked, is called to set the to `Indeterminate`, while is called on the other item to set the checked state to `Checked`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet3"::: @@ -139,7 +139,7 @@ ## Examples - The following code example demonstrates initializing a control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. + The following code example demonstrates initializing a control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. To run the example, paste the following code in a form containing a named CheckedListBox1 and call the `InitializeCheckListBox` method from the form's constructor or `Load` method. diff --git a/xml/System.Windows.Forms/CheckedListBox.xml b/xml/System.Windows.Forms/CheckedListBox.xml index 2d8446791d6..72791acf2cc 100644 --- a/xml/System.Windows.Forms/CheckedListBox.xml +++ b/xml/System.Windows.Forms/CheckedListBox.xml @@ -49,11 +49,11 @@ ## Remarks This control presents a list of items that the user can navigate by using the keyboard or the scrollbar on the right side of the control. The user can place a check mark by one or more items and the checked items can be navigated with the and . - To add objects to the list at run time, assign an array of object references with the method. The list then displays the default string value for each object. You can add individual items to the list with the method. + To add objects to the list at run time, assign an array of object references with the method. The list then displays the default string value for each object. You can add individual items to the list with the method. The object supports three states through the enumeration: , , and . You must set the state of in the code because the user interface for a does not provide a mechanism to do so. - If is `true`, the will recognize and expand tab characters in an item's text, creating columns. These tab stops are preset and cannot be changed. To use custom tab stops, set to `false`, set to `true`, and add the custom values to the collection. + If is `true`, the will recognize and expand tab characters in an item's text, creating columns. These tab stops are preset and cannot be changed. To use custom tab stops, set to `false`, set to `true`, and add the custom values to the collection. > [!NOTE] > If the property is `false`, the property will be ignored and replaced with standard tab offsets. @@ -136,7 +136,7 @@ uses and the `ResizeRedraw` value of to specify that the control is redrawn when resized. + By default, uses and the `ResizeRedraw` value of to specify that the control is redrawn when resized. ]]> @@ -190,7 +190,7 @@ ## Examples The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the property to get the , and the property to get the . - The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. + The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet2"::: @@ -242,14 +242,14 @@ collection, representing only those items whose is `Checked` or `Indeterminate`. The indexes in this collection are in ascending order. + The collection is a subset of the objects in the collection, representing only those items whose is `Checked` or `Indeterminate`. The indexes in this collection are in ascending order. ## Examples The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the property to get the , and the property to get the . - The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. + The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. To run this example, perform the following steps: @@ -322,12 +322,12 @@ indicates whether the check box should be toggled whenever an item is selected. The default behavior is to change the selection on the first click, and then have the user click again to apply the check mark. In some instances, however, you might prefer have the item checked as soon as it is clicked. + indicates whether the check box should be toggled whenever an item is selected. The default behavior is to change the selection on the first click, and then have the user click again to apply the check mark. In some instances, however, you might prefer have the item checked as soon as it is clicked. ## Examples - The following code example demonstrates initializing a control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. + The following code example demonstrates initializing a control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. To run the example, paste the following code in a form containing a named `CheckedListBox1` and call the `InitializeCheckListBox` method from the form's constructor or Load method. @@ -399,7 +399,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CheckedListBox1`. Then ensure that the event handler is associated with the event. @@ -442,7 +442,7 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. @@ -518,7 +518,7 @@ ## Remarks -The property should not be overridden and used to adjust the properties of your derived control. Properties such as the , , and should be set by the corresponding properties in your control such as , and . The should only be extended when you are wrapping a standard Windows control class or to set styles not provided by the Windows Forms namespace. For more information about creating control parameters, see the `CreateWindow` and `CreateWindowEx` functions and the `CREATESTRUCT` structure documentation in the Windows Platform SDK reference at . +The property should not be overridden and used to adjust the properties of your derived control. Properties such as the , , and should be set by the corresponding properties in your control such as , and . The should only be extended when you are wrapping a standard Windows control class or to set styles not provided by the Windows Forms namespace. For more information about creating control parameters, see the `CreateWindow` and `CreateWindowEx` functions and the `CREATESTRUCT` structure documentation in the Windows Platform SDK reference at . @@ -666,14 +666,14 @@ The property should not be over displays the default string for the items it contains. However, the can display diverse types of objects and you may want to change the displayed string by specifying the property. If the specified property does not exist, or the value of the property is an empty string (""), the results of the object's method are displayed instead. + By default the displays the default string for the items it contains. However, the can display diverse types of objects and you may want to change the displayed string by specifying the property. If the specified property does not exist, or the value of the property is an empty string (""), the results of the object's method are displayed instead. - If the new value of the cannot be set, the previous value is maintained. + If the new value of the cannot be set, the previous value is maintained. ## Examples - The following code example demonstrates initializing a control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. + The following code example demonstrates initializing a control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. To run the example, paste the following code in a form containing a named `CheckedListBox1` and call the `InitializeCheckListBox` method from the form's constructor or Load method. @@ -774,7 +774,7 @@ The property should not be over . The event is raised only when the property is set to or . You can use this event to perform the tasks needed to draw items in the . If you have a variable-sized item (that is, is set to ), the event is raised before the item is drawn. You can create an event handler for the event to specify the size for the item that you are going to draw in your event handler for the event. + This event is used by an owner-drawn . The event is raised only when the property is set to or . You can use this event to perform the tasks needed to draw items in the . If you have a variable-sized item (that is, is set to ), the event is raised before the item is drawn. You can create an event handler for the event to specify the size for the item that you are going to draw in your event handler for the event. This event is not relevant to this class. @@ -869,7 +869,7 @@ The property should not be over returns `true` if the value of is `Checked` or `Indeterminate` for the item. To determine the specific state the item is in, use the method. + returns `true` if the value of is `Checked` or `Indeterminate` for the item. To determine the specific state the item is in, use the method. ]]> @@ -917,14 +917,14 @@ The property should not be over method provides the ability to get the value of an item, given the index. If you never set the check state of an item to `Indeterminate`, then use the method. + The method provides the ability to get the value of an item, given the index. If you never set the check state of an item to `Indeterminate`, then use the method. ## Examples - The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the method to set the check state of an item. The example also demonstrates using the property to get the and the property to get the . + The following example enumerates the checked items in the to see what check state an item is in. The example demonstrates using the method to set the check state of an item. The example also demonstrates using the property to get the and the property to get the . - The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. + The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet2"::: @@ -983,7 +983,7 @@ The property should not be over ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CheckedListBox1`. Then ensure that the event handler is associated with the event. @@ -1041,7 +1041,7 @@ The property should not be over ## Remarks This measurement is based on the font height plus a small margin to provide white space around the item. - The extenders of characters such as "g" and "y" do not display properly when the font is changed to 9.75-point Arial. To correct this, derive a class from and override to return `base.ItemHeight+2`. + The extenders of characters such as "g" and "y" do not display properly when the font is changed to 9.75-point Arial. To correct this, derive a class from and override to return `base.ItemHeight+2`. ]]> @@ -1109,9 +1109,9 @@ The property should not be over ## Examples - The following example enumerates the checked items in the to see what check state an item is in. The example uses the property to get the to retrieve the index of an item using the method. The example also demonstrates using the property to get the , and the property to get the . + The following example enumerates the checked items in the to see what check state an item is in. The example uses the property to get the to retrieve the index of an item using the method. The example also demonstrates using the property to get the , and the property to get the . - The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. + The first loop uses the method to get the of each checked item, given the index of the item. The second loop also uses , but uses the method to retrieve the index for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet2"::: @@ -1227,7 +1227,7 @@ The property should not be over ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CheckedListBox1`. Then ensure that the event handler is associated with the event. @@ -1306,11 +1306,11 @@ The property should not be over method selects or clears the check box of the item that is clicked. If the property is set to `true`, the check box is switched from a selected or cleared state the first time the item is clicked. Otherwise, the check box is switched only if the item is already selected. + The method selects or clears the check box of the item that is clicked. If the property is set to `true`, the check box is switched from a selected or cleared state the first time the item is clicked. Otherwise, the check box is switched only if the item is already selected. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1355,7 +1355,7 @@ The property should not be over ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1400,7 +1400,7 @@ The property should not be over ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1445,7 +1445,7 @@ The property should not be over ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1490,7 +1490,7 @@ The property should not be over ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1533,11 +1533,11 @@ The property should not be over property is not set to , the method switches the check state of the item currently selected. + If the spacebar is pressed and the property is not set to , the method switches the check state of the item currently selected. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1582,7 +1582,7 @@ The property should not be over ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1627,7 +1627,7 @@ The property should not be over ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1680,7 +1680,7 @@ The property should not be over that are reasonably close to Windows user interface guidelines. Some adjustments might still be necessary for particular applications. + Controls receive default values for that are reasonably close to Windows user interface guidelines. Some adjustments might still be necessary for particular applications. This property is not relevant to this class. @@ -1753,7 +1753,7 @@ The property should not be over ## Examples - The following code example demonstrates initializing a control by setting the to allow one item in the list to be selected. + The following code example demonstrates initializing a control by setting the to allow one item in the list to be selected. To run the example, paste the following code in a form containing a named `CheckedListBox1` and call the `InitializeCheckListBox` method from the form's constructor or Load method. @@ -1810,9 +1810,9 @@ The property should not be over ## Examples - The following example enumerates the items in the and checks every other item in the list. The example demonstrates using the and methods to set the check state of an item. For every other item that is to be checked, is called to set the to `Indeterminate`, while is called on the other item to set the checked state to `Checked`. + The following example enumerates the items in the and checks every other item in the list. The example demonstrates using the and methods to set the check state of an item. For every other item that is to be checked, is called to set the to `Indeterminate`, while is called on the other item to set the checked state to `Checked`. - The example also demonstrates using the property to get the to get the of items. + The example also demonstrates using the property to get the to get the of items. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet3"::: @@ -1863,16 +1863,16 @@ The property should not be over method raises the event. + The method raises the event. Items whose is set to `Indeterminate` appear with a check mark in the check box, but the box is grayed to indicate the indeterminate status of the checked item. ## Examples - The following example enumerates the items in the and checks every other item in the list. The example demonstrates using the and methods to set the check state of an item. For every other item that is to be checked, is called to set the to `Indeterminate`, while is called on the other item to set the checked state to `Checked`. + The following example enumerates the items in the and checks every other item in the list. The example demonstrates using the and methods to set the check state of an item. For every other item that is to be checked, is called to set the to `Indeterminate`, while is called on the other item to set the checked state to `Checked`. - The example also demonstrates using the property to get the to get the of items. + The example also demonstrates using the property to get the to get the of items. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+CheckedIndexCollection/Overview/source.cs" id="Snippet3"::: @@ -1927,7 +1927,7 @@ The property should not be over control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. + The following code example demonstrates initializing a control by setting the , , and properties. The example populates the with controls and sets the to the property of the control. To run the example, paste the following code in a form containing a named `CheckedListBox1` and call the `InitializeCheckListBox` method from the form's constructor or Load method. @@ -1979,7 +1979,7 @@ The property should not be over ## Remarks The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, it's recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. -You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. +You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. ]]> @@ -2151,7 +2151,7 @@ You can set the `UseCompatibleTextRendering` property to `true` for a specific c ## Examples -The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the Windows.h header file included in the Platform SDK (Core SDK section) download, which is also available at . +The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the Windows.h header file included in the Platform SDK (Core SDK section) download, which is also available at . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/Clipboard.xml b/xml/System.Windows.Forms/Clipboard.xml index aa980a55b06..5a7003c6f5b 100644 --- a/xml/System.Windows.Forms/Clipboard.xml +++ b/xml/System.Windows.Forms/Clipboard.xml @@ -40,19 +40,19 @@ ## Remarks For a list of predefined formats to use with the class, see the class. - Call to put data on the Clipboard, replacing its current contents. To place a persistent copy of the data on the Clipboard, set the `copy` parameter to `true`. + Call to put data on the Clipboard, replacing its current contents. To place a persistent copy of the data on the Clipboard, set the `copy` parameter to `true`. > [!NOTE] > To place data on the Clipboard in multiple formats, use the class or an implementation. Place data on the Clipboard in multiple formats to maximize the possibility that a target application, whose format requirements you might not know, can successfully retrieve the data. - Call to retrieve data from the Clipboard. The data is returned as an object that implements the interface. Use the methods specified by and fields in to extract the data from the object. If you do not know the format of the data you retrieved, call the method of the interface to get a list of all formats that data is stored in. Then call the method of the interface, and specify a format that your application can use. + Call to retrieve data from the Clipboard. The data is returned as an object that implements the interface. Use the methods specified by and fields in to extract the data from the object. If you do not know the format of the data you retrieved, call the method of the interface to get a list of all formats that data is stored in. Then call the method of the interface, and specify a format that your application can use. -The class provides additional methods that make it easier to work with the system Clipboard. Call the method to remove all data from the Clipboard. To add data of a particular format to the Clipboard, replacing the existing data, call the appropriate `Set`*Format* method, such as , or call the method to specify the format. To retrieve data of a particular format from the Clipboard, first call the appropriate `Contains`*Format* method (such as ) method to determine whether the Clipboard contains data in that format, and then call the appropriate `Get`*Format* method (such as ) to retrieve the data if the Clipboard contains it. To specify the format in these operations, call the and methods instead. +The class provides additional methods that make it easier to work with the system Clipboard. Call the method to remove all data from the Clipboard. To add data of a particular format to the Clipboard, replacing the existing data, call the appropriate `Set`*Format* method, such as , or call the method to specify the format. To retrieve data of a particular format from the Clipboard, first call the appropriate `Contains`*Format* method (such as ) method to determine whether the Clipboard contains data in that format, and then call the appropriate `Get`*Format* method (such as ) to retrieve the data if the Clipboard contains it. To specify the format in these operations, call the and methods instead. > [!NOTE] > All Windows-based applications share the system Clipboard, so the contents are subject to change when you switch to another application. > -> An object must be serializable for it to be put on the Clipboard. If you pass a non-serializable object to a Clipboard method, the method will fail without throwing an exception. See for more information on serialization. If your target application requires a very specific data format, the headers added to the data in the serialization process may prevent the application from recognizing your data. To preserve your data format, add your data as a array to a and pass the to the method. +> An object must be serializable for it to be put on the Clipboard. If you pass a non-serializable object to a Clipboard method, the method will fail without throwing an exception. See for more information on serialization. If your target application requires a very specific data format, the headers added to the data in the serialization process may prevent the application from recognizing your data. To preserve your data format, add your data as a array to a and pass the to the method. > > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. > @@ -63,9 +63,9 @@ The class provides additional methods that ## Examples The following code example uses methods to place data on and retrieve it from the system Clipboard. This code assumes `button1`, `button2`, `textBox1`, and `textBox2` have been created and placed on the form. - The `button1_Click` method calls to take selected text from the text box and place it on the system Clipboard. + The `button1_Click` method calls to take selected text from the text box and place it on the system Clipboard. - The `button2_Click` method calls to retrieve data from the system Clipboard. The code uses and to extract the data returned and displays the data in `textBox2`. + The `button2_Click` method calls to retrieve data from the system Clipboard. The code uses and to extract the data returned and displays the data in `textBox2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Clipboard Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Clipboard/Overview/source.cs" id="Snippet1"::: @@ -160,7 +160,7 @@ The class provides additional methods that method. + Use this method to determine whether the Clipboard contains audio data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -220,7 +220,7 @@ The class provides additional methods that ## Remarks The class contains pre-defined format names that you can use with this method. - Use this method to determine whether the Clipboard contains data in the specified format or a compatible format before retrieving it with the method. + Use this method to determine whether the Clipboard contains data in the specified format or a compatible format before retrieving it with the method. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -278,7 +278,7 @@ The class provides additional methods that ## Remarks A file drop list is a collection of strings containing path information for files. - Use this method to determine whether the Clipboard contains a file drop list before retrieving it with the method. + Use this method to determine whether the Clipboard contains a file drop list before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -332,7 +332,7 @@ The class provides additional methods that method. + Use this method to determine whether the Clipboard contains image data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -400,7 +400,7 @@ The class provides additional methods that ## Remarks This method checks for the presence of data in the format on Windows XP Home Edition, Windows XP Professional, Windows Server 2003 and Windows 2000. Otherwise, this method checks for the presence of data in the format. - Use this method to determine whether the Clipboard contains text data before retrieving it with the method. + Use this method to determine whether the Clipboard contains text data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -408,7 +408,7 @@ The class provides additional methods that ## Examples - The following example demonstrates an overload of the method that is similar to this overload. + The following example demonstrates an overload of the method that is similar to this overload. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Clipboard/Clear/form1.cs" id="Snippet50"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Clipboard/Clear/form1.vb" id="Snippet50"::: @@ -459,7 +459,7 @@ The class provides additional methods that method. + Use this method to determine whether the Clipboard contains text data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -515,9 +515,9 @@ The class provides additional methods that method to determine whether the Clipboard contains audio data before retrieving it with this method. + Use the method to determine whether the Clipboard contains audio data before retrieving it with this method. - Use the method to add audio data to the Clipboard. + Use the method to add audio data to the Clipboard. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -581,7 +581,7 @@ The class provides additional methods that method to determine whether the Clipboard contains data in the specified format or a compatible format before retrieving it with this method. + Use the method to determine whether the Clipboard contains data in the specified format or a compatible format before retrieving it with this method. If this method cannot find data in the specified format, it attempts to convert the data to the format. If the data cannot be converted to the specified format, or if the data was stored with automatic conversion set to `false`, this method returns `null`. @@ -590,7 +590,7 @@ The class provides additional methods that > > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. - Use the method to add data to the Clipboard in a particular format. + Use the method to add data to the Clipboard in a particular format. @@ -655,9 +655,9 @@ The class provides additional methods that ## Examples The following code example uses methods to place data on and retrieve it from the system Clipboard. This code assumes `button1`, `button2`, `textBox1`, and `textBox2` have been placed on the form. - The `button1_Click` method calls to take selected text from the text box and place it on the system Clipboard. + The `button1_Click` method calls to take selected text from the text box and place it on the system Clipboard. - The `button2_Click` method calls to retrieve data from the system Clipboard. The code uses and to extract the data returned. The data is displayed in `textBox2`. + The `button2_Click` method calls to retrieve data from the system Clipboard. The code uses and to extract the data returned. The data is displayed in `textBox2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Clipboard Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Clipboard/Overview/source.cs" id="Snippet1"::: @@ -708,9 +708,9 @@ The class provides additional methods that A file drop list is stored on the Clipboard as a array. This method converts this array to a and returns the collection. - Use the method to determine whether the Clipboard contains a file drop list before retrieving it with this method. + Use the method to determine whether the Clipboard contains a file drop list before retrieving it with this method. - Use the method to add a file drop list to the Clipboard. + Use the method to add a file drop list to the Clipboard. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -765,9 +765,9 @@ The class provides additional methods that method to determine whether the Clipboard contains image data before retrieving it with this method. + Use the method to determine whether the Clipboard contains image data before retrieving it with this method. - Use the method to add image data to the Clipboard. + Use the method to add image data to the Clipboard. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -835,9 +835,9 @@ The class provides additional methods that ## Remarks This method returns text data in the format on Windows XP Home Edition, Windows XP Professional, Windows Server 2003 and Windows 2000. Otherwise, this method returns text data in the format. - Use the method to determine whether the Clipboard contains text data before retrieving it with this method. + Use the method to determine whether the Clipboard contains text data before retrieving it with this method. - Use the method to add text data to the Clipboard. + Use the method to add text data to the Clipboard. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -845,7 +845,7 @@ The class provides additional methods that ## Examples - The following example demonstrates an overload of the method that is similar to this overload. + The following example demonstrates an overload of the method that is similar to this overload. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Clipboard/Clear/form1.cs" id="Snippet50"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Clipboard/Clear/form1.vb" id="Snippet50"::: @@ -893,9 +893,9 @@ The class provides additional methods that method to determine whether the Clipboard contains text data before retrieving it with this method. + Use the method to determine whether the Clipboard contains text data before retrieving it with this method. - Use the method to add text data to the Clipboard. + Use the method to add text data to the Clipboard. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -964,7 +964,7 @@ The class provides additional methods that method to determine whether the Clipboard contains audio data before retrieving it with the method. + To retrieve audio data from the Clipboard, first use the method to determine whether the Clipboard contains audio data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -972,7 +972,7 @@ The class provides additional methods that ## Examples - The following example demonstrates an overload of the method that is similar to this overload. + The following example demonstrates an overload of the method that is similar to this overload. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Clipboard/Clear/form1.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Clipboard/Clear/form1.vb" id="Snippet20"::: @@ -1021,7 +1021,7 @@ The class provides additional methods that method to determine whether the Clipboard contains audio data before retrieving it with the method. + To retrieve audio data from the Clipboard, first use the method to determine whether the Clipboard contains audio data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -1084,7 +1084,7 @@ The class provides additional methods that Data stored using this method can be converted to a compatible format when it is retrieved. - To retrieve data from the Clipboard in a particular format, first use the method to determine whether the Clipboard contains data in that format before retrieving it with the method. + To retrieve data from the Clipboard in a particular format, first use the method to determine whether the Clipboard contains data in that format before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -1211,7 +1211,7 @@ The class provides additional methods that ## Examples - The following code example uses to place nonpersistent text data onto the system Clipboard. In the `button1_Click` method, the selected text is copied from `textBox1` and pasted on the Clipboard. In the `button2_Click` method, the information is retrieved from the Clipboard and displayed in `textBox2`. This code assumes `button1`, `button2`, `textBox1`, and `textBox2` have been created and placed on a form. + The following code example uses to place nonpersistent text data onto the system Clipboard. In the `button1_Click` method, the selected text is copied from `textBox1` and pasted on the Clipboard. In the `button2_Click` method, the information is retrieved from the Clipboard and displayed in `textBox2`. This code assumes `button1`, `button2`, `textBox1`, and `textBox2` have been created and placed on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Clipboard Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Clipboard/Overview/source.cs" id="Snippet1"::: @@ -1410,7 +1410,7 @@ The class provides additional methods that A file drop list is stored on the Clipboard as a array. This method converts `filePaths` to a array before adding it to the Clipboard. - To retrieve a file drop list from the Clipboard, first use the method to determine whether the Clipboard contains data in that format before retrieving it with the method. + To retrieve a file drop list from the Clipboard, first use the method to determine whether the Clipboard contains data in that format before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -1475,7 +1475,7 @@ The class provides additional methods that method to determine whether the Clipboard contains image data before retrieving it with the method. + To retrieve image data from the Clipboard, first use the method to determine whether the Clipboard contains image data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -1546,7 +1546,7 @@ The class provides additional methods that ## Remarks This method adds text data in the format on Windows XP Home Edition, Windows XP Professional, Windows Server 2003 and Windows 2000. Otherwise, this method adds text data in the format. - To retrieve text data from the Clipboard, first use the method to determine whether the Clipboard contains text data before retrieving it with the method. + To retrieve text data from the Clipboard, first use the method to determine whether the Clipboard contains text data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. @@ -1554,7 +1554,7 @@ The class provides additional methods that ## Examples - The following example demonstrates an overload of the method that is similar to this overload. + The following example demonstrates an overload of the method that is similar to this overload. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Clipboard/Clear/form1.cs" id="Snippet50"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Clipboard/Clear/form1.vb" id="Snippet50"::: @@ -1605,7 +1605,7 @@ The class provides additional methods that method to determine whether the Clipboard contains text data before retrieving it with the method. + To retrieve text data from the Clipboard, first use the method to determine whether the Clipboard contains text data before retrieving it with the method. > [!NOTE] > The class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your `Main` method is marked with the attribute. diff --git a/xml/System.Windows.Forms/ColorDialog.xml b/xml/System.Windows.Forms/ColorDialog.xml index 39a2f80ff9c..b33c074325d 100644 --- a/xml/System.Windows.Forms/ColorDialog.xml +++ b/xml/System.Windows.Forms/ColorDialog.xml @@ -38,9 +38,9 @@ must be invoked to create this specific common dialog box. can be overridden to implement specific dialog box hook functionality. Use to retrieve the color selected by the user. + The inherited member must be invoked to create this specific common dialog box. can be overridden to implement specific dialog box hook functionality. Use to retrieve the color selected by the user. - When you create an instance of , some of the read/write properties are set to initial values. For a list of these values, see the constructor. + When you create an instance of , some of the read/write properties are set to initial values. For a list of these values, see the constructor. @@ -87,13 +87,13 @@ |Property|Initial Value| |--------------|-------------------| -||`true`| -||`false`| -||`Color.Black`| -||`null`| -||`false`| -||`false`| -||`false`| +||`true`| +||`false`| +||`Color.Black`| +||`null`| +||`false`| +||`false`| +||`false`| You can change the value for any of these properties through a separate call to the property. @@ -201,7 +201,7 @@ setting the , properties. The does not enable the user to set a custom color, but it enables the full set of basic colors be displayed. When you set the property to `false`, it enables the display of colors that are combinations of other colors on systems with 256 or less colors. The example also shows setting the property and handling a event for a dialog. To run the example, paste the following code in a form and call the `InitializeColorDialog` method in the form's constructor or `Load` method. This example requires that the `Click` event of the button is connected to the event-handler method defined in the example. + The following code example demonstrates initializing a setting the , properties. The does not enable the user to set a custom color, but it enables the full set of basic colors be displayed. When you set the property to `false`, it enables the display of colors that are combinations of other colors on systems with 256 or less colors. The example also shows setting the property and handling a event for a dialog. To run the example, paste the following code in a form and call the `InitializeColorDialog` method in the form's constructor or `Load` method. This example requires that the `Click` event of the button is connected to the event-handler method defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ColorDialogHelp/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColorDialog/AnyColor/form1.cs" id="Snippet1"::: @@ -308,12 +308,12 @@ ## Remarks Users can create their own set of custom colors. These colors are contained in an composed of the BGR (blue, green, red) values necessary to create the color. For more information on the structure of this data, see . - Custom colors can only be defined if is set to `true`. + Custom colors can only be defined if is set to `true`. ## Examples - The following code example shows how to add an array of type representing custom colors to . This example requires that the code is run from within a . + The following code example shows how to add an array of type representing custom colors to . This example requires that the code is run from within a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ColorDialog CustomColors Property Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColorDialog/CustomColors/form1.cs" id="Snippet1"::: @@ -373,7 +373,7 @@ By default, the custom color controls are not visible when the dialog box is first opened. You must click the `Custom Colors` button to display them. > [!NOTE] -> If is `false`, then has no effect. +> If is `false`, then has no effect. ]]> @@ -627,7 +627,7 @@ ## Examples - The following code example demonstrates initializing a setting the , properties. The does not enable the user to set a custom color, but it enables the full set of basic colors be displayed. When you set the property to `false`, it enables the display of colors that are combinations of other colors on systems with 256 or less colors. The example also shows setting the property and handling a event for a dialog box. To run the example, paste the following code in a form and call the `InitializeColorDialog` method in the form's constructor or `Load` method. This example requires the `Click` event of the button is connected to the event-handler method defined in the example. + The following code example demonstrates initializing a setting the , properties. The does not enable the user to set a custom color, but it enables the full set of basic colors be displayed. When you set the property to `false`, it enables the display of colors that are combinations of other colors on systems with 256 or less colors. The example also shows setting the property and handling a event for a dialog box. To run the example, paste the following code in a form and call the `InitializeColorDialog` method in the form's constructor or `Load` method. This example requires the `Click` event of the button is connected to the event-handler method defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ColorDialogHelp/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColorDialog/AnyColor/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ColumnClickEventArgs.xml b/xml/System.Windows.Forms/ColumnClickEventArgs.xml index 8b0b44ef4b9..12102cb4749 100644 --- a/xml/System.Windows.Forms/ColumnClickEventArgs.xml +++ b/xml/System.Windows.Forms/ColumnClickEventArgs.xml @@ -25,21 +25,21 @@ Provides data for the event. - class provides the zero-based index within the class of the column that is clicked in the control. You can use this information in an event handler for the event to determine which column is being clicked to perform tasks on the data within the column. - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + class provides the zero-based index within the class of the column that is clicked in the control. You can use this information in an event handler for the event to determine which column is being clicked to perform tasks on the data within the column. + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet466"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet466"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet466"::: + ]]> @@ -118,21 +118,21 @@ Gets the zero-based index of the column that is clicked. The zero-based index within the of the column that is clicked. - event to determine which column is being clicked to perform tasks on the data within the column. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event to determine which column is being clicked to perform tasks on the data within the column. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet466"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet466"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet466"::: + ]]> diff --git a/xml/System.Windows.Forms/ColumnHeader.xml b/xml/System.Windows.Forms/ColumnHeader.xml index fda669b711f..04862e63922 100644 --- a/xml/System.Windows.Forms/ColumnHeader.xml +++ b/xml/System.Windows.Forms/ColumnHeader.xml @@ -58,14 +58,14 @@ control that contains heading text. objects can be added to a using the method of the class. To add a group of columns to a , you can use the method of the class. You can use the property of the class to determine where the is located in the . + A column header is an item in a control that contains heading text. objects can be added to a using the method of the class. To add a group of columns to a , you can use the method of the class. You can use the property of the class to determine where the is located in the . - provides the and properties to set the text displayed in the control and the alignment of the text in the column header. To determine whether a is associated with a control, you can reference the property. If you want to copy a for use in another control, you can use the method. + provides the and properties to set the text displayed in the control and the alignment of the text in the column header. To determine whether a is associated with a control, you can reference the property. If you want to copy a for use in another control, you can use the method. ## Examples - The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. + The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet1"::: @@ -113,7 +113,7 @@ control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. + The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet1"::: @@ -214,7 +214,7 @@ method is only effective once the and containing have been constructed, and the column is populated with items. If new items are added to the , the column will not resize unless is called again. + Calling the method is only effective once the and containing have been constructed, and the column is populated with items. If new items are added to the , the column will not resize unless is called again. ]]> @@ -340,10 +340,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. +> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. ]]> @@ -405,13 +405,13 @@ property refers to the index of an image specified by the property of the that contains the . The property returns -1 if there is no set on the containing . The image displayed in a column is typically used to indicate the state of items in the column. + The property refers to the index of an image specified by the property of the that contains the . The property returns -1 if there is no set on the containing . The image displayed in a column is typically used to indicate the state of items in the column. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). -If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. ]]> @@ -479,8 +479,8 @@ For example, consider a button control whose and properties are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + The and properties are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). The image associated with a is typically used to indicate the state information. @@ -756,7 +756,7 @@ If you set the property, the < control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. + The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet1"::: @@ -813,7 +813,7 @@ If you set the property, the < > Due to a limitation in the underlying control, this property has no effect on the first column in the control, which is always aligned to the left. To work around this limitation, you can handle the event and paint the column header yourself. ## Examples - The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. + The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet1"::: @@ -897,7 +897,7 @@ If you set the property, the < of the . The can be set to adjust at run time to the column contents or heading. To adjust the width of the longest item in the column, set the property to -1. To autosize to the width of the column heading, set the property to -2. + This property enables you to set the of the . The can be set to adjust at run time to the column contents or heading. To adjust the width of the longest item in the column, set the property to -1. To autosize to the width of the column heading, set the property to -2. > [!NOTE] > Unexpected behavior can result when the combined width of all columns exceeds 32,768 pixels. @@ -905,7 +905,7 @@ If you set the property, the < ## Examples - The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. + The following code example demonstrates initializing a control. The example creates objects and sets the column header's , and properties. The example also adds items and subitems to the . To run this example paste the following code in a form and call the `PopulateListView` method from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ColumnHeaderAutoResizeStyle.xml b/xml/System.Windows.Forms/ColumnHeaderAutoResizeStyle.xml index 418b357bf62..86c95875b9c 100644 --- a/xml/System.Windows.Forms/ColumnHeaderAutoResizeStyle.xml +++ b/xml/System.Windows.Forms/ColumnHeaderAutoResizeStyle.xml @@ -23,11 +23,11 @@ Specifies how a column contained in a should be resized. - is used by the , , and methods. - + is used by the , , and methods. + ]]> diff --git a/xml/System.Windows.Forms/ColumnReorderedEventArgs.xml b/xml/System.Windows.Forms/ColumnReorderedEventArgs.xml index 610132ab573..15327205d1c 100644 --- a/xml/System.Windows.Forms/ColumnReorderedEventArgs.xml +++ b/xml/System.Windows.Forms/ColumnReorderedEventArgs.xml @@ -33,12 +33,12 @@ event can be canceled by setting the property to `true`. However, if the event is cancelled, the will not change to the value. + The event can be canceled by setting the property to `true`. However, if the event is cancelled, the will not change to the value. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -126,7 +126,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -173,12 +173,12 @@ event can be canceled by setting the property to `true`. However, if the event is cancelled, the will not change to the value. + The event can be canceled by setting the property to `true`. However, if the event is cancelled, the will not change to the value. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -225,12 +225,12 @@ event can be canceled by setting the property to `true`. However, if the event is cancelled, the will not change to the value. + The event can be canceled by setting the property to `true`. However, if the event is cancelled, the will not change to the value. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ColumnStyle.xml b/xml/System.Windows.Forms/ColumnStyle.xml index 1d8be3d6be3..dc4ec161cd9 100644 --- a/xml/System.Windows.Forms/ColumnStyle.xml +++ b/xml/System.Windows.Forms/ColumnStyle.xml @@ -29,7 +29,7 @@ ## Remarks The class represents the user interface (UI) characteristics of column in a . The styles for all the columns in such a table are collected in the property. - This simple class offers the and properties for a column. + This simple class offers the and properties for a column. diff --git a/xml/System.Windows.Forms/ColumnWidthChangedEventArgs.xml b/xml/System.Windows.Forms/ColumnWidthChangedEventArgs.xml index 917e8b3b197..a19a32ffa00 100644 --- a/xml/System.Windows.Forms/ColumnWidthChangedEventArgs.xml +++ b/xml/System.Windows.Forms/ColumnWidthChangedEventArgs.xml @@ -27,7 +27,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -116,7 +116,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ColumnWidthChangingEventArgs.xml b/xml/System.Windows.Forms/ColumnWidthChangingEventArgs.xml index 8881103074a..7ead277fe0c 100644 --- a/xml/System.Windows.Forms/ColumnWidthChangingEventArgs.xml +++ b/xml/System.Windows.Forms/ColumnWidthChangingEventArgs.xml @@ -32,7 +32,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -172,7 +172,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -228,7 +228,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ComboBox+ChildAccessibleObject.xml b/xml/System.Windows.Forms/ComboBox+ChildAccessibleObject.xml index aed2a496d0b..4dea18ce696 100644 --- a/xml/System.Windows.Forms/ComboBox+ChildAccessibleObject.xml +++ b/xml/System.Windows.Forms/ComboBox+ChildAccessibleObject.xml @@ -40,9 +40,9 @@ ## Remarks Windows Forms has accessibility support built in and provides information about your application that allows it to work with accessibility client applications. Examples of accessibility client applications are screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. The class inherits from the class to provide information about the control to accessibility client applications. - There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. - If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. + If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. ]]> diff --git a/xml/System.Windows.Forms/ComboBox+ObjectCollection.xml b/xml/System.Windows.Forms/ComboBox+ObjectCollection.xml index dadc3a6e79b..8bb01fa0594 100644 --- a/xml/System.Windows.Forms/ComboBox+ObjectCollection.xml +++ b/xml/System.Windows.Forms/ComboBox+ObjectCollection.xml @@ -58,9 +58,9 @@ ## Remarks The class encapsulates the items in the . The object collection of a combo box can be used to manage many types of objects, including strings, images, and custom business objects. - You can add items to the collection in several ways. The method adds one object to the collection. To add a number of objects to the collection, it is best to create an array of items and assign with the method. To insert an object at a specific location within the collection, you can use the method. To remove items at a known index in the collection you can use either the method or the method. The method removes all the items from the collection. + You can add items to the collection in several ways. The method adds one object to the collection. To add a number of objects to the collection, it is best to create an array of items and assign with the method. To insert an object at a specific location within the collection, you can use the method. To remove items at a known index in the collection you can use either the method or the method. The method removes all the items from the collection. - In addition to methods and properties for adding and removing items, the also provides methods to find items within the collection. The method enables you to determine if an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. + In addition to methods and properties for adding and removing items, the also provides methods to find items within the collection. The method enables you to determine if an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. ]]> @@ -146,7 +146,7 @@ ## Remarks This method adds an item to the combo box. If the property of the is set to `true`, the item is inserted into the list alphabetically. Otherwise, the item is inserted at the end of the list. - A visual representation of the item is displayed in the combo box. This content representation is specified by the property. If the property is `null`, the item's `ToString` method is called to obtain the string that is displayed in the combo box; otherwise, the property of the stored object as specified by the property is displayed. A occurs if there is insufficient space available to store the new item. To add a set of items to the combo box it is best to use the method. If you choose to use the method to add a number of items to the combo box, use the method to suspend repainting during your add and the method to resume repainting. You can use the method to specify the location in the list where an item is added. When an object is added to the collection, the calls the object's method to obtain the string to display in the list. + A visual representation of the item is displayed in the combo box. This content representation is specified by the property. If the property is `null`, the item's `ToString` method is called to obtain the string that is displayed in the combo box; otherwise, the property of the stored object as specified by the property is displayed. A occurs if there is insufficient space available to store the new item. To add a set of items to the combo box it is best to use the method. If you choose to use the method to add a number of items to the combo box, use the method to suspend repainting during your add and the method to resume repainting. You can use the method to specify the location in the list where an item is added. When an object is added to the collection, the calls the object's method to obtain the string to display in the list. ]]> @@ -198,12 +198,12 @@ property of the is set to true, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order they occur within the array. This method is typically passed an array of objects, but an array of any type of object can be passed to this method. When an object is added to the collection, the method calls the object's method to obtain the string to display in the list. When using this method to add items to the collection, you do not need to call the and methods to optimize performance. + If the property of the is set to true, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order they occur within the array. This method is typically passed an array of objects, but an array of any type of object can be passed to this method. When an object is added to the collection, the method calls the object's method to obtain the string to display in the list. When using this method to add items to the collection, you do not need to call the and methods to optimize performance. ## Examples - The following code example demonstrates how to initialize a control by setting the text property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method from the form's constructor or `Load` method. + The following code example demonstrates how to initialize a control by setting the text property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.cs" id="Snippet2"::: @@ -248,7 +248,7 @@ , use the or method. + When you remove items from the list, all information about the deleted items is lost. To remove a single item from the , use the or method. ]]> @@ -295,7 +295,7 @@ method enables you to determine if an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. + The method enables you to determine if an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. ]]> @@ -345,7 +345,7 @@ control using the method of the class. + You can use this method to combine the items from multiple collections into a single array. You can then use this array to populate the contents of another control using the method of the class. ]]> @@ -466,7 +466,7 @@ method enables you to determine where an item is located within the collection. To determine if an item is located within the collection before calling this method, use the method. + The method enables you to determine where an item is located within the collection. To determine if an item is located within the collection before calling this method, use the method. ]]> @@ -514,7 +514,7 @@ property of the is true, the `index` parameter is ignored. When an object is added to the collection, the calls the object's method is to obtain the string to display in the list. + If the property of the is true, the `index` parameter is ignored. When an object is added to the collection, the calls the object's method is to obtain the string to display in the list. ]]> @@ -614,7 +614,7 @@ to find the location of an item, or you can use the index return from the method. + You can use this method to obtain the item at the specified location within the collection. You can use to find the location of an item, or you can use the index return from the method. ]]> @@ -708,7 +708,7 @@ control by setting the and properties, using the methods to search the and the method to remove an item from the . It also shows handling the event. + The following code example demonstrates how to initialize a control by setting the and properties, using the methods to search the and the method to remove an item from the . It also shows handling the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: @@ -952,7 +952,7 @@ This method adds an item to the combo box. If the property of the is set to `true`, the item is inserted into the list alphabetically. Otherwise, the item is inserted at the end of the list. - A visual representation of the item is displayed in the combo box. This content representation is specified by the property. If the property is `null`, the item's method is called to obtain the string that is displayed in the combo box; otherwise, the property of the stored object as specified by the property is displayed. To add a set of items to the combo box, it is best to use the method. If you choose to use the method to add a set of items to the combo box, use the method to suspend repainting during your add and the method to resume repainting. You can use the method to specify the location in the list where an item is added. When an object is added to the collection, the calls the object's method to obtain the string to display in the list. + A visual representation of the item is displayed in the combo box. This content representation is specified by the property. If the property is `null`, the item's method is called to obtain the string that is displayed in the combo box; otherwise, the property of the stored object as specified by the property is displayed. To add a set of items to the combo box, it is best to use the method. If you choose to use the method to add a set of items to the combo box, use the method to suspend repainting during your add and the method to resume repainting. You can use the method to specify the location in the list where an item is added. When an object is added to the collection, the calls the object's method to obtain the string to display in the list. ]]> diff --git a/xml/System.Windows.Forms/ComboBox.xml b/xml/System.Windows.Forms/ComboBox.xml index 6431c210fe1..857aeb9c702 100644 --- a/xml/System.Windows.Forms/ComboBox.xml +++ b/xml/System.Windows.Forms/ComboBox.xml @@ -70,9 +70,9 @@ The property specifies whether the list is always displayed or whether the list is displayed in a drop-down. The property also specifies whether the text portion can be edited. See for the available settings and their effects. There is no setting to always display the list and disallow entering a new value. To display a list to which no new values can be added, use a control. - To add or remove objects in the list at run time, use methods of the class (through the property of the ). You can assign an array of object references with the method. The list then displays the default string value for each object. You can add individual objects with the method. You can delete items with the method or clear the entire list with the method. + To add or remove objects in the list at run time, use methods of the class (through the property of the ). You can assign an array of object references with the method. The list then displays the default string value for each object. You can add individual objects with the method. You can delete items with the method or clear the entire list with the method. - In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. With the and methods, you can add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. + In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. With the and methods, you can add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. You can use these properties to manage the currently selected item in the list, the property to specify the string displayed in the editing field, the property to get or set the current item, and the property to get or set a reference to the object. @@ -82,7 +82,7 @@ ## Examples - The following code example is a complete application showing how you can use the method to add items to a , the method to find items in a , and the and methods to efficiently add a large number items to a . The ability to store values that are different from displayed text is inherited from . For an example of how to use this feature, see the class. + The following code example is a complete application showing how you can use the method to add items to a , the method to find items in a , and the and methods to efficiently add a large number items to a . The ability to store values that are different from displayed text is inherited from . For an example of how to use this feature, see the class. You must add references to the `System.Drawing` and `System.Windows.Forms` namespaces to run this example. @@ -227,11 +227,11 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. - The use of the property is optional, but you must set the property to `CustomSource` in order to use . + The use of the property is optional, but you must set the property to `CustomSource` in order to use . - You must use the and properties together. + You must use the and properties together. > [!NOTE] > The operating system might limit the number of custom strings that it can display at once. For strings that contain a forward slash (/) or backward slash (\\), automatic completion appends all characters only up to and including the slash. @@ -290,15 +290,15 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. If there are duplicate entries in the maintained source, automatic completion behaves unpredictably. - If you set to , the list displays only if is or . + If you set to , the list displays only if is or . - The use of the property is optional, but you must set the property to in order to use . + The use of the property is optional, but you must set the property to in order to use . - You must use the and properties together. + You must use the and properties together. - With set to and set to , the behavior is as follows: + With set to and set to , the behavior is as follows: - If the list of strings is empty, pressing the BACKSPACE or DELETE key does nothing. @@ -366,13 +366,13 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to in order to use . + The use of the property is optional, but you must set the property to in order to use . - You must use the and properties together. + You must use the and properties together. - With set to and set to , the behavior is as follows: + With set to and set to , the behavior is as follows: - If the list of strings is empty, pressing the BACKSPACE or DELETE key does nothing. @@ -653,14 +653,14 @@ method is called. + This method prevents the control from painting until the method is called. - The preferred way to add items to the is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. + The preferred way to add items to the is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. ## Examples - The following code example shows the usage of the and methods. The example is part of a complete code example in the class overview. + The following code example shows the usage of the and methods. The example is part of a complete code example in the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet3"::: @@ -1003,7 +1003,7 @@ ## Examples - The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: @@ -1054,7 +1054,7 @@ property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: @@ -1110,7 +1110,7 @@ ## Examples - The following code example demonstrates how to initialize a control by setting the text property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. + The following code example demonstrates how to initialize a control by setting the text property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.cs" id="Snippet2"::: @@ -1164,7 +1164,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. @@ -1327,7 +1327,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. @@ -1369,7 +1369,7 @@ , this property returns the of the combo box. + If a value has not been set for the , this property returns the of the combo box. > [!NOTE] > The width of the drop-down cannot be smaller than the width. @@ -1377,7 +1377,7 @@ ## Examples - The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: @@ -1460,12 +1460,12 @@ is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. + The preferred way to add items to the is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. ## Examples - The following code example shows the usage of the and methods. The example is part of a code example in the class overview. + The following code example shows the usage of the and methods. The example is part of a code example in the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet3"::: @@ -1526,12 +1526,12 @@ method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text, and returning the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text using the method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. ## Examples - The following code example shows the usage of the method and property. The example is part of a complete code example in the class overview. + The following code example shows the usage of the method and property. The example is part of a complete code example in the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet4"::: @@ -1579,7 +1579,7 @@ method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a search for an exact word match instead of a partial match, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text, returning the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text using the method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a search for an exact word match instead of a partial match, use the method. ]]> @@ -1641,12 +1641,12 @@ method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform partial word search instead of an exact word match, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a string to compare against the text associated with the items in the combo box list. The search looks for a match starting from the beginning of the text, returning the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text using the method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you must use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform partial word search instead of an exact word match, use the method. ## Examples - The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. + The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: @@ -1700,14 +1700,14 @@ method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform partial word search instead of an exact word match, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a string to compare against the text associated with the items in the combo box list. The search looks for a match starting from the beginning of the text, returning the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text using the method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform partial word search instead of an exact word match, use the method. The search performed by this method is circular. Although the search starts at the next index after the `startIndex` parameter, the search restarts at 0 when the end of the collection is reached. However, note that if the `startIndex` parameter itself is equal to the last index in the collection, an exception is thrown. ## Examples - The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. + The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: @@ -1875,7 +1875,7 @@ is not set to `OwnerDrawVariable`, the value of the `index` parameter is ignored because all items in a standard are the same size. You can use this property when you are using an owner-drawn to determine the size of any item within the . + If is not set to `OwnerDrawVariable`, the value of the `index` parameter is ignored because all items in a standard are the same size. You can use this property when you are using an owner-drawn to determine the size of any item within the . For more information about specifying the height for items in an owner-drawn list, see event. @@ -1981,7 +1981,7 @@ method returns `true` when the `keyData` parameter includes the or value and the property is `true`. + The method returns `true` when the `keyData` parameter includes the or value and the property is `true`. ]]> @@ -2024,7 +2024,7 @@ property is set to `OwnerDrawFixed`, all items have the same height. When the property is set to `OwnerDrawVariable`, the property specifies the height of each item added to the . Because each item in an owner-drawn list can have a different height, you can use the method to get the height of a specific item in the . If you use the property on a with items of variable height, this property returns the height of the first item in the control. + When the property is set to `OwnerDrawFixed`, all items have the same height. When the property is set to `OwnerDrawVariable`, the property specifies the height of each item added to the . Because each item in an owner-drawn list can have a different height, you can use the method to get the height of a specific item in the . If you use the property on a with items of variable height, this property returns the height of the first item in the control. For more information about specifying the height for items in an owner-drawn list, see event. @@ -2092,14 +2092,14 @@ ## Remarks This property enables you to obtain a reference to the list of items that are currently stored in the . With this reference, you can add items, remove items, and obtain a count of the items in the collection. - Although the is typically used to display text items, you can add any object to the . Typically, the representation of an object in the is the string returned by that object's method. If you want to have a member of the object displayed instead, choose the member that will be displayed by setting the property to the name of the appropriate member. You can also choose a member of the object that will represent the value returned by the object by setting the property. For more information, see . + Although the is typically used to display text items, you can add any object to the . Typically, the representation of an object in the is the string returned by that object's method. If you want to have a member of the object displayed instead, choose the member that will be displayed by setting the property to the name of the appropriate member. You can also choose a member of the object that will represent the value returned by the object by setting the property. For more information, see . For more information about the tasks that can be performed with the item collection, see the class reference topics. ## Examples - The following code example demonstrates how to add a small number of items. If you need to add a large number of items, see the example at . Both examples are part of a larger example available in the class overview. + The following code example demonstrates how to add a small number of items. If you need to add a large number of items, see the example at . Both examples are part of a larger example available in the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet2"::: @@ -2154,7 +2154,7 @@ control by setting the and properties and using the methods to search the . It also shows handling the event. + The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: @@ -2278,7 +2278,7 @@ ## Examples - The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. + The following code example demonstrates how to create an owner-drawn combo box by setting the property to `OwnerDrawnVariable` and handling the and events. It also demonstrates setting the and properties. To run the example, paste the following code in a form. Call the `InitializeComboBox` method in the form's constructor or event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxOwnerDrawn/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/DrawItem/form1.cs" id="Snippet1"::: @@ -2450,11 +2450,11 @@ item needs to be drawn and after is called. For more information, see . + This method is called each time an owner-drawn item needs to be drawn and after is called. For more information, see . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2503,7 +2503,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2547,7 +2547,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2591,11 +2591,11 @@ to a new value. + This event is raised when you set to a new value. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2712,7 +2712,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2757,7 +2757,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2802,7 +2802,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2852,7 +2852,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2895,7 +2895,7 @@ property of `e` is or and the property is `true`, the method sets to `false`. + If the value of the property of `e` is or and the property is `true`, the method sets to `false`. ]]> @@ -2972,7 +2972,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3015,11 +3015,11 @@ item needs to be drawn and before is called. For more information, see . + This method is called each time an owner-drawn item needs to be drawn and before is called. For more information, see . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3094,7 +3094,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3138,7 +3138,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3183,7 +3183,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3228,7 +3228,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3275,7 +3275,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3322,7 +3322,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3367,7 +3367,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3410,11 +3410,11 @@ is raised only when the user changes the combo box selection, or when you set the . However, depending on how the is configured, and how the user changes the selected item, the event may not be raised. Alternatively, you can handle the , but note that this event occurs whether the index is changed programmatically or by the user. + The is raised only when the user changes the combo box selection, or when you set the . However, depending on how the is configured, and how the user changes the selected item, the event may not be raised. Alternatively, you can handle the , but note that this event occurs whether the index is changed programmatically or by the user. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -3473,7 +3473,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3517,7 +3517,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3568,7 +3568,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3813,7 +3813,7 @@ ## Remarks This method is called during message preprocessing to handle command keys. Command keys are keys that always take precedence over regular input keys. Examples of command keys include accelerators and menu shortcuts. The method must return `true` to indicate that it has processed the command key, or `false` to indicate that the key is not a command key. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. - The method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. + The method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. ]]> @@ -4017,7 +4017,7 @@ If you want to set the start position to the first character in the control's text, set the `start` parameter to zero. You can use this method to select a substring of text, such as when searching through the text of the control and replacing information. > [!NOTE] -> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. +> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. ]]> @@ -4108,19 +4108,19 @@ ## Remarks This property indicates the zero-based index of the currently selected item in the combo box list. Setting a new index raises the event. - , , and are related as follows: + , , and are related as follows: -- If is `false`, will not be set to -1 when is blank. +- If is `false`, will not be set to -1 when is blank. -- If is `true`, will be set to -1 when is blank. +- If is `true`, will be set to -1 when is blank. > [!NOTE] -> To deselect the currently selected item, set the to -1. You cannot set the of a item to -1 if the item is a data-bound item. +> To deselect the currently selected item, set the to -1. You cannot set the of a item to -1 if the item is a data-bound item. ## Examples - The following code example show how to use the method and property. The example is part of a complete example in the class overview. + The following code example show how to use the method and property. The example is part of a complete example in the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet4"::: @@ -4182,7 +4182,7 @@ ## Examples - The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. + The following code example demonstrates how to initialize a control by setting the and properties and using the methods to search the . It also shows handling the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxFindString/CPP/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet0"::: @@ -4245,12 +4245,12 @@ When you set the property to an object, the attempts to make that object the currently selected one in the list. If the object is found in the list, it is displayed in the edit portion of the and the property is set to the corresponding index. If the object does not exist in the list, the property is left at its current value. > [!NOTE] -> The class searches for the specified object by using the method. This method uses the method to determine equality. +> The class searches for the specified object by using the method. This method uses the method to determine equality. ## Examples - The following code example shows the usage of the and the properties. The example is part of a complete code example in the class overview. + The following code example shows the usage of the and the properties. The example is part of a complete code example in the class overview. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ComboBox/CPP/comboboxmembers.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox/Overview/comboboxmembers.cs" id="Snippet5"::: @@ -4301,13 +4301,13 @@ property to retrieve or change the currently selected text in a control. However, you should be aware that the selection can change automatically because of user interaction. For example, if you retrieve the value in a button event handler, the value will be an empty string. This is because the selection is automatically cleared when the input focus moves from the combo box to the button. + You can use the property to retrieve or change the currently selected text in a control. However, you should be aware that the selection can change automatically because of user interaction. For example, if you retrieve the value in a button event handler, the value will be an empty string. This is because the selection is automatically cleared when the input focus moves from the combo box to the button. When the combo box loses focus, the selection point moves to the beginning of the text and any selected text becomes unselected. In this case, getting the property retrieves an empty string, and setting the property adds the specified value to the beginning of the text. - When the combo box gains focus, the full text in the control is automatically selected. If you call the control's method to set the input focus, the full text is selected regardless of whether the control already had focus. + When the combo box gains focus, the full text in the control is automatically selected. If you call the control's method to set the input focus, the full text is selected regardless of whether the control already had focus. - When the user selects an item from the drop-down list or by using the UP ARROW and DOWN ARROW keys, the text for the new item is automatically selected. However, if you try to get the value in a or event handler, the property returns an empty string. This is because, at the time of these events, the previous value has been cleared and the new value has not yet been set. To retrieve the current value in a or event handler, use the property instead. + When the user selects an item from the drop-down list or by using the UP ARROW and DOWN ARROW keys, the text for the new item is automatically selected. However, if you try to get the value in a or event handler, the property returns an empty string. This is because, at the time of these events, the previous value has been cleared and the new value has not yet been set. To retrieve the current value in a or event handler, use the property instead. ]]> @@ -4459,7 +4459,7 @@ If no text is selected in the control, this property indicates the insertion point for new text. If you set this property to a location beyond the length of the text in the control, the selection start position is placed after the last character. When text is selected in the text box control, changing this property can release the value of the property. If the remaining text in the control after the position indicated by the property is less than the value of the property, the value of the property is automatically decreased. The value of the property never causes an increase in the property. > [!NOTE] -> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. +> returns the lower value of the current selection. For example, `Select(10, -4)` selects the text from character position 6 through character position 10. If you now get the value, it will be 6 rather than 10. ]]> @@ -4668,14 +4668,14 @@ property to `null` or an empty string ("") sets the to -1. Setting the property to a value that is in the collection sets the to the index of that item. Setting the property to a value that is not in the collection leaves the unchanged. + Setting the property to `null` or an empty string ("") sets the to -1. Setting the property to a value that is in the collection sets the to the index of that item. Setting the property to a value that is not in the collection leaves the unchanged. -Reading the property returns the text of , if it is not `null`. +Reading the property returns the text of , if it is not `null`. ## Examples - The following code example demonstrates how to initialize a control by setting the property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. + The following code example demonstrates how to initialize a control by setting the property and using the method to populate the . It also demonstrates handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method in the form's constructor or event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.cs" id="Snippet2"::: @@ -4728,7 +4728,7 @@ Reading the property returns the text ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ComboBox1`. Then ensure that the event handler is associated with the event. @@ -4805,15 +4805,15 @@ Reading the property returns the text method after getting filtered through the method. + All messages are sent to the method after getting filtered through the method. - The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)) documentation in the Windows Platform SDK reference. + The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)) documentation in the Windows Platform SDK reference. ## Examples -The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the Windows.h header file included in the Platform SDK (Core SDK section) download, which is also available at . +The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the Windows.h header file included in the Platform SDK (Core SDK section) download, which is also available at . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ComboBoxRenderer.xml b/xml/System.Windows.Forms/ComboBoxRenderer.xml index d16eb629ce9..ac90948fced 100644 --- a/xml/System.Windows.Forms/ComboBoxRenderer.xml +++ b/xml/System.Windows.Forms/ComboBoxRenderer.xml @@ -37,16 +37,16 @@ class provides a set of `static` methods that can be used to render a combo box control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a combo box, use the method to draw the text box and the method to draw the drop-down arrow. + The class provides a set of `static` methods that can be used to render a combo box control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a combo box, use the method to draw the text box and the method to draw the drop-down arrow. - If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, and will draw the combo box with the current visual style. Otherwise, these methods will throw an . To determine whether the members of this class can be used, you can check the value of the property. + If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, and will draw the combo box with the current visual style. Otherwise, these methods will throw an . To determine whether the members of this class can be used, you can check the value of the property. This class wraps the functionality of a that is set to one of the elements exposed by the and classes. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). ## Examples - The following code example demonstrates how to create a custom control that uses the and methods to draw a combo box that responds to mouse clicks. + The following code example demonstrates how to create a custom control that uses the and methods to draw a combo box that responds to mouse clicks. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBoxRenderer/Overview/form1.cs" id="Snippet0"::: @@ -100,7 +100,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a drop-down arrow in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a drop-down arrow in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBoxRenderer/Overview/form1.cs" id="Snippet4"::: @@ -312,7 +312,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a text box. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a text box. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBoxRenderer/Overview/form1.cs" id="Snippet4"::: @@ -496,7 +496,7 @@ or methods will throw an . + If this property is `false`, the or methods will throw an . diff --git a/xml/System.Windows.Forms/CommonDialog.xml b/xml/System.Windows.Forms/CommonDialog.xml index fbbac1f545e..eff2738ebd0 100644 --- a/xml/System.Windows.Forms/CommonDialog.xml +++ b/xml/System.Windows.Forms/CommonDialog.xml @@ -38,7 +38,7 @@ by invoking to create a specific common dialog box. Inherited classes can optionally override to implement specific dialog box hook functionality. + Inherited classes are required to implement by invoking to create a specific common dialog box. Inherited classes can optionally override to implement specific dialog box hook functionality. @@ -121,7 +121,7 @@ ## Examples - The following code example demonstrates initializing a object setting the , properties. The object does not allow the user to set a custom color, but it allows the full set of basic colors to be displayed. By setting the property to false, it allows the display of colors that are combinations of other colors on systems with 256 or less colors. The example also shows setting the property and handling a event for a dialog box. To run the example, paste the following code in a form and call the `InitializeColorDialog` method in the form's constructor or `Load` method. This example requires that the `Click` event of the button is connected to the event handler defined in the example. + The following code example demonstrates initializing a object setting the , properties. The object does not allow the user to set a custom color, but it allows the full set of basic colors to be displayed. By setting the property to false, it allows the display of colors that are combinations of other colors on systems with 256 or less colors. The example also shows setting the property and handling a event for a dialog box. To run the example, paste the following code in a form and call the `InitializeColorDialog` method in the form's constructor or `Load` method. This example requires that the `Click` event of the button is connected to the event handler defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ColorDialogHelp/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColorDialog/AnyColor/form1.cs" id="Snippet1"::: @@ -173,12 +173,12 @@ method for a class, the operating system invokes your override of the function to post operating system messages to the window. + A hook procedure is a mechanism by which a function can intercept events before they reach an application. When you override the method for a class, the operating system invokes your override of the function to post operating system messages to the window. By default, the hook procedure centers the dialog box on the screen in response to a `WM_INITDIALOG` message. ## Examples - The following code example demonstrates how to override the method. The example consists of a class that inherits the class. In the class's override, the example evaluates the method's `msg` parameter against constant values for particular Windows messages. If the `msg` parameter equals the specified constant, the example writes trace output identifying the Windows message that was passed to the method. This example assumes that the class in which the method is declared inherits the class. + The following code example demonstrates how to override the method. The example consists of a class that inherits the class. In the class's override, the example evaluates the method's `msg` parameter against constant values for particular Windows messages. If the `msg` parameter equals the specified constant, the example writes trace output identifying the Windows message that was passed to the method. This example assumes that the class in which the method is declared inherits the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/HookProc Example/CPP/fontdialogoverride.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CommonDialog/HookProc/fontdialogoverride.cs" id="Snippet1"::: @@ -347,7 +347,7 @@ , and it must be overridden by inherited classes of to implement a specific common dialog box. + This method is invoked when the user of a common dialog box calls , and it must be overridden by inherited classes of to implement a specific common dialog box. ]]> @@ -403,7 +403,7 @@ . + This method implements . @@ -457,7 +457,7 @@ method allows you to specify a specific form or control that will own the dialog box that is shown. If you use the version of this method that has no parameters, the dialog box being shown would be owned automatically by the currently active window of your application. + This version of the method allows you to specify a specific form or control that will own the dialog box that is shown. If you use the version of this method that has no parameters, the dialog box being shown would be owned automatically by the currently active window of your application. ]]> diff --git a/xml/System.Windows.Forms/ContainerControl.xml b/xml/System.Windows.Forms/ContainerControl.xml index 13a59a33318..cc7dbd83879 100644 --- a/xml/System.Windows.Forms/ContainerControl.xml +++ b/xml/System.Windows.Forms/ContainerControl.xml @@ -91,7 +91,7 @@ class and implements the interface. Implementation is added to the property and the method. + The following code example inherits from the class and implements the interface. Implementation is added to the property and the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IContainerControl Implementation/CPP/mycontainercontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContainerControl/.ctor/mycontainercontrol.cs" id="Snippet1"::: @@ -160,12 +160,12 @@ ## Remarks The property activates or retrieves the active control on the container control. - In order to receive a valid value from this property, the object that calls it must either contain or be contained in the control it is calling. If one form tries to call another form's properties, it will receive an undefined value. In this case, you need to define your own communication mechanism between the forms to pass this data. + In order to receive a valid value from this property, the object that calls it must either contain or be contained in the control it is calling. If one form tries to call another form's properties, it will receive an undefined value. In this case, you need to define your own communication mechanism between the forms to pass this data. ## Examples - The following code example inherits from the class and implements the interface. Implementation is added to the property and the method. + The following code example inherits from the class and implements the interface. Implementation is added to the property and the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IContainerControl Implementation/CPP/mycontainercontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContainerControl/.ctor/mycontainercontrol.cs" id="Snippet1"::: @@ -271,7 +271,7 @@ property represents the DPI or font setting of the screen that the control was scaled to or designed for. Specifically, at design time this property will be set by the Windows Forms designer to the value your monitor is currently using. Then, when the form loads at run time, if the property is different from the , the method will be called to perform scaling of the control and all of its children. Afterwards, will be updated to reflect the new scaling size. + The property represents the DPI or font setting of the screen that the control was scaled to or designed for. Specifically, at design time this property will be set by the Windows Forms designer to the value your monitor is currently using. Then, when the form loads at run time, if the property is different from the , the method will be called to perform scaling of the control and all of its children. Afterwards, will be updated to reflect the new scaling size. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). @@ -314,7 +314,7 @@ property represents the scaling factor between the and properties. This value is calculated when it is required. For example, if is (192, 144) and is (96, 96) then the is (2.0, 1.5). + The property represents the scaling factor between the and properties. This value is calculated when it is required. For example, if is (192, 144) and is (96, 96) then the is (2.0, 1.5). For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). @@ -431,7 +431,7 @@ will differ for each control. For more details on implicit validation, see [User Input Validation in Windows Forms](/dotnet/desktop/winforms/user-input-validation-in-windows-forms). + The default value for will differ for each control. For more details on implicit validation, see [User Input Validation in Windows Forms](/dotnet/desktop/winforms/user-input-validation-in-windows-forms). Setting this property to a new value will raise the event. @@ -500,9 +500,9 @@ ## Examples - + - + ]]> @@ -667,7 +667,7 @@ - If the mode is , this property represents the average font character size in pixels. - If the property is set to , is set equal to . + If the property is set to , is set equal to . For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). @@ -750,7 +750,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -837,7 +837,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1016,7 +1016,7 @@ property of `Form1` to `true` and make it the of `Form2`. Next, create a button, `button1`, on each form. When the button on the parent form is clicked, the event handler displays the child form. When the button on the child form is clicked, the event handler displays the property of its parent form. Use the following two code segments to overwrite `button1` event handlers in both forms. + The following code example shows how to create two forms: `Form1` and `Form2`. Set the property of `Form1` to `true` and make it the of `Form2`. Next, create a button, `button1`, on each form. When the button on the parent form is clicked, the event handler displays the child form. When the button on the child form is clicked, the event handler displays the property of its parent form. Use the following two code segments to overwrite `button1` event handlers in both forms. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ParentForm2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContainerControl/ParentForm/form1.cs" id="Snippet1"::: @@ -1067,9 +1067,9 @@ method is typically only required after programmatic changes to the layout during run time. is implicitly called from the method. + An explicit call to the method is typically only required after programmatic changes to the layout during run time. is implicitly called from the method. - is recursive; each child control, if it is a container, will have its version of this method called when the container's version executes. + is recursive; each child control, if it is a container, will have its version of this method called when the container's version executes. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). @@ -1425,7 +1425,7 @@ ## Examples - The following code example demonstrates how to inherit from the class and implement the interface. Implementation is added to the property and the method. + The following code example demonstrates how to inherit from the class and implement the interface. Implementation is added to the property and the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IContainerControl Implementation/CPP/mycontainercontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContainerControl/.ctor/mycontainercontrol.cs" id="Snippet1"::: @@ -1467,7 +1467,7 @@ class does not provide an implementation for the method. Classes that inherit this method must implement to update the default button. + The class does not provide an implementation for the method. Classes that inherit this method must implement to update the default button. ]]> @@ -1521,7 +1521,7 @@ method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. This overloaded version always performs validation, regardless of the value of the property of the control's parent. Therefore use it to unconditionally force validation. + The method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. This overloaded version always performs validation, regardless of the value of the property of the control's parent. Therefore use it to unconditionally force validation. ]]> @@ -1565,7 +1565,7 @@ method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. This overloaded version performs validation based on the following conditions: + The method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. This overloaded version performs validation based on the following conditions: - If the `checkAutoValidate` parameter is `true`, validation always occurs for child controls that are not validated. @@ -1634,11 +1634,11 @@ will descend a control's hierarchy and examine each control to see if it supports validation. If the control can be selected by the user and its property is `true`, will cause the event to occur. If any of the controls cancel the event, this method will return `false`; otherwise, it will return `true`. + will descend a control's hierarchy and examine each control to see if it supports validation. If the control can be selected by the user and its property is `true`, will cause the event to occur. If any of the controls cancel the event, this method will return `false`; otherwise, it will return `true`. If a control is bound to a data source, and the event occurs, it will cause the control to push its current data back to the data source. - Calling is equivalent to calling with a of . + Calling is equivalent to calling with a of . @@ -1697,15 +1697,15 @@ will examine all the children of the current control, causing the event to occur on a control if it meets the criteria spelled out by . + will examine all the children of the current control, causing the event to occur on a control if it meets the criteria spelled out by . You may use several parameters at once by combining them with a bitwise OR operator. Combining parameters with a bitwise OR operator will result in a logical AND operation. For example, calling `ValidateChildren(ValidationConstraints.ImmediateChildren | ValidationConstraints.Enabled)` will only raise the event on controls that are both immediate children of the container AND are enabled. - Regardless of which parameters you specify for this method, a control must have its property set to `true` in order for its event to occur. You should also set the property of the control or of the control's container to `false` if you want validation to happen only when you call , and not when the user shifts focus from the control. + Regardless of which parameters you specify for this method, a control must have its property set to `true` in order for its event to occur. You should also set the property of the control or of the control's container to `false` if you want validation to happen only when you call , and not when the user shifts focus from the control. If a control is bound to a data source, and the event occurs, it will cause the control to push its current data back to the data source. - You cannot achieve the opposite effect of a parameter by applying a bitwise negation operator. For example, if you supply the negative value of the field to , it will not validate all children that are not visible on the container. Supplying any negative parameter to will have no effect on the container or its children. + You cannot achieve the opposite effect of a parameter by applying a bitwise negation operator. For example, if you supply the negative value of the field to , it will not validate all children that are not visible on the container. Supplying any negative parameter to will have no effect on the container or its children. diff --git a/xml/System.Windows.Forms/ContentsResizedEventArgs.xml b/xml/System.Windows.Forms/ContentsResizedEventArgs.xml index f1ed75af995..111af0095a5 100644 --- a/xml/System.Windows.Forms/ContentsResizedEventArgs.xml +++ b/xml/System.Windows.Forms/ContentsResizedEventArgs.xml @@ -33,7 +33,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. @@ -123,7 +123,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ContextMenu.xml b/xml/System.Windows.Forms/ContextMenu.xml index d207d3ec385..78fc173cb41 100644 --- a/xml/System.Windows.Forms/ContextMenu.xml +++ b/xml/System.Windows.Forms/ContextMenu.xml @@ -53,7 +53,7 @@ This class is not available in .NET Core 3.1 and later versions. Use event to determine when the shortcut menu is being displayed. > [!NOTE] -> In order to reuse objects that are displayed in a for use in a , you must create a copy of the menu using the method of the class. You can also merge menu items and their submenu items into a single object using the method of the class. +> In order to reuse objects that are displayed in a for use in a , you must create a copy of the menu using the method of the class. You can also merge menu items and their submenu items into a single object using the method of the class. @@ -102,7 +102,7 @@ This class is not available in .NET Core 3.1 and later versions. Use by using the method of the class. You can access the through the property. + Once you have used this version of the constructor, you can add menu items to the by using the method of the class. You can access the through the property. ]]> @@ -135,12 +135,12 @@ This class is not available in .NET Core 3.1 and later versions. Use that has its menu items specified at the time it is created. Once you have used this version of the constructor, you can add additional menu items to the by using the method of the class. You can access the through the property. + You can use this version of the constructor to create a that has its menu items specified at the time it is created. Once you have used this version of the constructor, you can add additional menu items to the by using the method of the class. You can access the through the property. ## Examples - The following code example demonstrates constructing a shortcut menu and using the method. To run the example, paste the following code in a form containing a button named Button1. Ensure all events are associated with their event-handling methods. + The following code example demonstrates constructing a shortcut menu and using the method. To run the example, paste the following code in a form containing a button named Button1. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ManualContextMenu/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenu/.ctor/form1.cs" id="Snippet1"::: @@ -180,7 +180,7 @@ This class is not available in .NET Core 3.1 and later versions. Use event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ContextMenu1`. Then ensure that the event handler is associated with the event. @@ -324,7 +324,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. + The method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. ]]> @@ -430,7 +430,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method. To run the example, paste the following code in a form containing a button named Button1. Ensure all events are associated with their event-handling methods. + The following code example demonstrates constructing a shortcut menu and using the method. To run the example, paste the following code in a form containing a button named Button1. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ManualContextMenu/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenu/.ctor/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ContextMenuStrip.xml b/xml/System.Windows.Forms/ContextMenuStrip.xml index 62bba9efc12..48796dad804 100644 --- a/xml/System.Windows.Forms/ContextMenuStrip.xml +++ b/xml/System.Windows.Forms/ContextMenuStrip.xml @@ -45,7 +45,7 @@ replaces . You can associate a with any control, and a right mouse click automatically displays the shortcut menu. You can show a programmatically by using the method. supports cancelable and events to handle dynamic population and multiple-click scenarios. supports images, menu-item check state, text, access keys, shortcuts, and cascading menus. + replaces . You can associate a with any control, and a right mouse click automatically displays the shortcut menu. You can show a programmatically by using the method. supports cancelable and events to handle dynamic population and multiple-click scenarios. supports images, menu-item check state, text, access keys, shortcuts, and cascading menus. The following items are specifically designed to work seamlessly with both and in all orientations. They are available by default at design time for the control: @@ -68,7 +68,7 @@ ## Examples - The following code example demonstrates a with dynamic item addition, dynamic determination with reuse, and handling of the event. + The following code example demonstrates a with dynamic item addition, dynamic determination with reuse, and handling of the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet40"::: @@ -348,7 +348,7 @@ ## Examples - The following code example demonstrates dynamic determination with reuse, and handling of the event. This example is part of a larger example provided for the class. + The following code example demonstrates dynamic determination with reuse, and handling of the event. This example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet42"::: diff --git a/xml/System.Windows.Forms/Control+ControlAccessibleObject.xml b/xml/System.Windows.Forms/Control+ControlAccessibleObject.xml index 8bd8e6e1125..0579deef75c 100644 --- a/xml/System.Windows.Forms/Control+ControlAccessibleObject.xml +++ b/xml/System.Windows.Forms/Control+ControlAccessibleObject.xml @@ -38,17 +38,17 @@ , , , and property values, which will be reported to accessibility client applications. Alternatively, if you require more accessibility information to be included with your control, you can write your own class deriving from the or classes. For example, if you are writing your own control that is not derived from the common controls or you require such operations as hit testing within your control, you should create a for your control by calling the method. + Windows Forms has accessibility support built in, and provides information about your application that enables it to work with accessibility client applications. Examples of accessibility client applications are: screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. Sometimes you will want to provide additional information to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. Alternatively, if you require more accessibility information to be included with your control, you can write your own class deriving from the or classes. For example, if you are writing your own control that is not derived from the common controls or you require such operations as hit testing within your control, you should create a for your control by calling the method. > [!NOTE] -> If you override the method, you must also override the method. To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> If you override the method, you must also override the method. To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. For more information about accessible objects, see [Microsoft Active Accessibility](/windows/win32/winauto/microsoft-active-accessibility). ## Examples - The following code example creates a check box control that derives from the class and creates a custom for the derived class to use. The derived class, `MyCheckBox`, has an of by default so it appears as a toggle button. The derived class, `MyCheckBoxControlAccessibleObject`, overrides three properties to account for the difference in appearance. + The following code example creates a check box control that derives from the class and creates a custom for the derived class to use. The derived class, `MyCheckBox`, has an of by default so it appears as a toggle button. The derived class, `MyCheckBoxControlAccessibleObject`, overrides three properties to account for the difference in appearance. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.ControlAccessibleObject/CPP/controlaccessibility.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control+ControlAccessibleObject/Overview/controlaccessibility.cs" id="Snippet1"::: @@ -94,7 +94,7 @@ class and creates a custom for the derived class to use. The derived class, `MyCheckBox`, has an of by default so it appears as a toggle button. The derived class, `MyCheckBoxControlAccessibleObject`, overrides three properties to account for the difference in appearance. + The following code example creates a check box control that derives from the class and creates a custom for the derived class to use. The derived class, `MyCheckBox`, has an of by default so it appears as a toggle button. The derived class, `MyCheckBoxControlAccessibleObject`, overrides three properties to account for the difference in appearance. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.ControlAccessibleObject/CPP/controlaccessibility.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control+ControlAccessibleObject/Overview/controlaccessibility.cs" id="Snippet1"::: @@ -404,7 +404,7 @@ method for each object the accessibility client applications are to be notified of. The method is typically called when a property is set or from within an event handler. For example, you might call the method and pass in an value of `Hide` from within the event handler for the event. + You must call the method for each object the accessibility client applications are to be notified of. The method is typically called when a property is set or from within an event handler. For example, you might call the method and pass in an value of `Hide` from within the event handler for the event. ]]> @@ -447,7 +447,7 @@ method for each object the accessibility client applications are to be notified of. The method is typically called when a property is set or from within an event handler. For example, you might call the method and pass in an value of `Hide` from within from within the event handler for the event. + You must call the method for each object the accessibility client applications are to be notified of. The method is typically called when a property is set or from within an event handler. For example, you might call the method and pass in an value of `Hide` from within from within the event handler for the event. ]]> @@ -528,7 +528,7 @@ class and creates a custom for the derived class to use. The derived class, `MyCheckBox`, has an of by default so it appears as a toggle button. The derived class, `MyCheckBoxControlAccessibleObject`, overrides three properties to account for the difference in appearance. + The following code example creates a check box control that derives from the class and creates a custom for the derived class to use. The derived class, `MyCheckBox`, has an of by default so it appears as a toggle button. The derived class, `MyCheckBoxControlAccessibleObject`, overrides three properties to account for the difference in appearance. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.ControlAccessibleObject/CPP/controlaccessibility.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control+ControlAccessibleObject/Overview/controlaccessibility.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/Control+ControlCollection.xml b/xml/System.Windows.Forms/Control+ControlCollection.xml index 47d18b7af9c..36a50ebdfa9 100644 --- a/xml/System.Windows.Forms/Control+ControlCollection.xml +++ b/xml/System.Windows.Forms/Control+ControlCollection.xml @@ -65,9 +65,9 @@ , , and methods enable you to add and remove individual controls from the collection. You can also use the or methods to add or remove all the controls from the collection. + The , , and methods enable you to add and remove individual controls from the collection. You can also use the or methods to add or remove all the controls from the collection. - You can determine if a is a member of the collection by passing the control into the method. To get the index value of the location of a in the collection, pass the control into the method. The collection can be copied into an array by calling the method. + You can determine if a is a member of the collection by passing the control into the method. To get the index value of the location of a in the collection, pass the control into the method. The collection can be copied into an array by calling the method. ## Examples The following code example removes a from the of the derived class if it is a member of the collection. The example requires that you have created a , a , and at least one control on a . The controls are added to the control, and the control added to the . When the button is clicked, the radio button named `radioButton2` is removed from the . @@ -149,11 +149,11 @@ method allows you to add objects to the end of the control collection. + The method allows you to add objects to the end of the control collection. - You can also add new objects to the collection by using the method. + You can also add new objects to the collection by using the method. - To remove a that you previously added, use the , , or methods. + To remove a that you previously added, use the , , or methods. > [!NOTE] > A can only be assigned to one at a time. If the is already a child of another control it is removed from that control before it is added to another control. @@ -231,9 +231,9 @@ ## Remarks The objects contained in the `controls` array are appended to the end of the collection. - You can use the method to quickly add a group of objects to the collection instead of manually adding each to the collection using the method. + You can use the method to quickly add a group of objects to the collection instead of manually adding each to the collection using the method. - To remove a that you previously added, use the , , or methods. + To remove a that you previously added, use the , , or methods. @@ -286,14 +286,14 @@ method to remove the entire collection of controls from a parent control. + You can use the method to remove the entire collection of controls from a parent control. - To remove an individual control from the collection, use the or methods. + To remove an individual control from the collection, use the or methods. > [!IMPORTANT] -> Calling the method does not remove control handles from memory. You must explicitly call the method to avoid memory leaks. +> Calling the method does not remove control handles from memory. You must explicitly call the method to avoid memory leaks. - To add new objects to the collection, use the or methods. + To add new objects to the collection, use the or methods. @@ -735,7 +735,7 @@ method return value is -1. + If the control is not found in the collection, the method return value is -1. ]]> @@ -776,9 +776,9 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, or an item with the specified key is not found, returns -1. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, or an item with the specified key is not found, returns -1. The property of a corresponds to the key for a in the . @@ -982,9 +982,9 @@ ## Remarks When a is removed from the control collection, all subsequent controls are moved up one position in the collection. - You can also remove a by using the method, or remove all controls by using the method. + You can also remove a by using the method, or remove all controls by using the method. - To add new objects to the collection, use the or methods. + To add new objects to the collection, use the or methods. ## Examples The following code example removes a from the of the derived class if it is a member of the collection. The example requires that you have created a , a , and one or more controls on a . The controls are added to the control, and the control is added to the . When the button is clicked, the radio button named `radioButton2` is removed from the . @@ -1042,9 +1042,9 @@ ## Remarks When a is removed from the control collection, all subsequent controls are moved up one position in the collection. - You can also remove a that you previously added by using the or methods. + You can also remove a that you previously added by using the or methods. - To add new objects to the collection, use the or methods. + To add new objects to the collection, use the or methods. ## Examples The following code example removes the first in the of the derived class if the count of the collection is greater than zero. The example requires that you have created a , a , and at least one other control on a . The other controls are added to the control, and the control added to the . When the button is clicked, the first control contained in the panel is removed from the . @@ -1147,7 +1147,7 @@ is called, the referred to by the `child` parameter is moved to the position specified by `newIndex` and the other references in the are reordered to accommodate the move. The control with an index value of zero is at the top of the z-order, and higher numbers are closer to the bottom. + When is called, the referred to by the `child` parameter is moved to the position specified by `newIndex` and the other references in the are reordered to accommodate the move. The control with an index value of zero is at the top of the z-order, and higher numbers are closer to the bottom. ]]> diff --git a/xml/System.Windows.Forms/Control.xml b/xml/System.Windows.Forms/Control.xml index 70e459de75c..b72c5571a72 100644 --- a/xml/System.Windows.Forms/Control.xml +++ b/xml/System.Windows.Forms/Control.xml @@ -113,12 +113,12 @@ The class implements very basic functionality required by classes that display information to the user. It handles user input through the keyboard and pointing devices. It handles message routing and security. It defines the bounds of a control (its position and size), although it does not implement painting. It provides a window handle (`hWnd`). - Windows Forms controls use ambient properties so child controls can appear like their surrounding environment. An *ambient property* is a control property that, if not set, is retrieved from the parent control. If the control does not have a , and the property is not set, the control attempts to determine the value of the ambient property through the property. If the control is not sited, if the site does not support ambient properties, or if the property is not set on the , the control uses its own default values. Typically, an ambient property represents a characteristic of a control, such as , that is communicated to a child control. For example, a will have the same as its parent by default. Ambient properties provided by the class include: , , , , and . + Windows Forms controls use ambient properties so child controls can appear like their surrounding environment. An *ambient property* is a control property that, if not set, is retrieved from the parent control. If the control does not have a , and the property is not set, the control attempts to determine the value of the ambient property through the property. If the control is not sited, if the site does not support ambient properties, or if the property is not set on the , the control uses its own default values. Typically, an ambient property represents a characteristic of a control, such as , that is communicated to a child control. For example, a will have the same as its parent by default. Ambient properties provided by the class include: , , , , and . > [!NOTE] > To make your Windows Forms application support visual styles, be sure to set the property to `System` and include a manifest with your executable. A manifest is an XML file that is included either as a resource within your application executable or as a separate file that resides in the same directory as the executable file. For an example of a manifest, see the Example section of the enumeration. For more information about using visual styles, see [Visual Styles](/windows/win32/controls/themes-overview). - Windows Forms has accessibility support built in, and provides information about your application that enables it to work with accessibility client applications such as screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. Sometimes you will want to provide additional information to accessibility client applications. There are two ways of providing this additional information. You can set the , , , and property values, which will be reported to accessibility client applications. This method is typically used to provide limited accessibility information for existing controls. Alternatively, you can write your own class deriving from the or classes, providing as much accessibility information as needed. + Windows Forms has accessibility support built in, and provides information about your application that enables it to work with accessibility client applications such as screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. Sometimes you will want to provide additional information to accessibility client applications. There are two ways of providing this additional information. You can set the , , , and property values, which will be reported to accessibility client applications. This method is typically used to provide limited accessibility information for existing controls. Alternatively, you can write your own class deriving from the or classes, providing as much accessibility information as needed. > [!NOTE] > To maintain better performance, do not set the size of a control in its constructor. The preferred method is to override the property. @@ -229,7 +229,7 @@ ## Remarks The class is the base class for all controls used in a Windows Forms application. Because this class is not typically used to create an instance of the class, this constructor is typically not called directly but is instead called by a derived class. - This version of the constructor sets the initial property value to the `text` parameter value. + This version of the constructor sets the initial property value to the `text` parameter value. ]]> @@ -271,7 +271,7 @@ ## Remarks The class is the base class for all controls used in a Windows Forms application. Because this class is not typically used to create an instance of the class, this constructor is typically not called directly but is instead called by a derived class. - This version of the constructor sets the initial property value to the `text` parameter value. The constructor also adds the control to the parent control's . + This version of the constructor sets the initial property value to the `text` parameter value. The constructor also adds the control to the parent control's . ]]> @@ -325,7 +325,7 @@ ## Remarks The class is the base class for all controls used in a Windows Forms application. Because this class is not typically used to create an instance of the class, this constructor is typically not called directly but is instead called by a derived class. - This version of the constructor sets the initial property value to the `text` parameter value. The initial and of the control are determined by the `left`, `top`, `width` and `height` parameter values. + This version of the constructor sets the initial property value to the `text` parameter value. The initial and of the control are determined by the `left`, `top`, `width` and `height` parameter values. > [!NOTE] > To maintain better performance, do not set the size of a control in its constructor. The preferred method is to override the property. @@ -378,7 +378,7 @@ ## Remarks The class is the base class for all controls used in a Windows Forms application. Because this class is not typically used to create an instance of the class, this constructor is typically not called directly but is instead called by a derived class. - This version of the constructor sets the initial property value to the `text` parameter value. The constructor also adds the control to the parent control's . The initial and of the control are determined by the `left`, `top`, `width` and `height` parameter values. + This version of the constructor sets the initial property value to the `text` parameter value. The constructor also adds the control to the parent control's . The initial and of the control are determined by the `left`, `top`, `width` and `height` parameter values. > [!NOTE] > To maintain better performance, do not set the size of a control in its constructor. The preferred method is to override the property. @@ -446,14 +446,14 @@ method for each the accessibility client applications are to be notified of. The method is typically called when a property is set or from within an event handler. For example, you might call the method and pass in an value of `Hide` from within the event handler for the event. + You must call the method for each the accessibility client applications are to be notified of. The method is typically called when a property is set or from within an event handler. For example, you might call the method and pass in an value of `Hide` from within the event handler for the event. ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code excerpt demonstrates calling the method. See the class overview for the complete code example. + This code excerpt demonstrates calling the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet5"::: @@ -556,7 +556,7 @@ method. + To control the instance returned from this method, override the method. If no is currently assigned to the control, a new instance of one is created. @@ -685,14 +685,14 @@ ## Remarks An object's property provides a textual description about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but can also be used for context searching or other applications. - The property is needed if the description is not obvious, or if it is redundant based on the object's , , , and properties. For example, a button with "OK" would not need additional information, but a button that shows a picture of a cactus would. The , and (and perhaps ) properties for the cactus button would describe its purpose, but the property would convey information that is less tangible, such as "A button that shows a picture of a cactus." + The property is needed if the description is not obvious, or if it is redundant based on the object's , , , and properties. For example, a button with "OK" would not need additional information, but a button that shows a picture of a cactus would. The , and (and perhaps ) properties for the cactus button would describe its purpose, but the property would convey information that is less tangible, such as "A button that shows a picture of a cactus." For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/win32/winauto/content-of-descriptive-properties). ## Examples - The following code example creates an instance of a derived class, `MyCheckBox`, assigns it an to its property and sets the and properties, because the property is `null`. This example requires that you have a named `MyForm`. + The following code example creates an instance of a derived class, `MyCheckBox`, assigns it an to its property and sets the and properties, because the property is `null`. This example requires that you have a named `MyForm`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.ControlAccessibleObject/CPP/controlaccessibility.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control+ControlAccessibleObject/Overview/controlaccessibility.cs" id="Snippet2"::: @@ -755,7 +755,7 @@ ## Examples - The following code example creates an instance of a derived class, `MyCheckBox`, assigns it an to its property and sets the and properties since the property is `null`. This example requires that you have a named `MyForm`. + The following code example creates an instance of a derived class, `MyCheckBox`, assigns it an to its property and sets the and properties since the property is `null`. This example requires that you have a named `MyForm`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.ControlAccessibleObject/CPP/controlaccessibility.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control+ControlAccessibleObject/Overview/controlaccessibility.cs" id="Snippet2"::: @@ -862,7 +862,7 @@ method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. + The following code example enables the user to drag an image or image file onto the form, and have it be displayed at the point on it is dropped. The method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.DragOperations/CPP/imagedrag.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/AllowDrop/imagedrag.cs" id="Snippet1"::: @@ -928,15 +928,15 @@ ## Remarks Use the property to define how a control is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized. - You can anchor a control to one or more edges of its container. For example, if you have a with a whose property value is set to `Top` and `Bottom`, the is stretched to maintain the anchored distance to the top and bottom edges of the as the of the is increased. + You can anchor a control to one or more edges of its container. For example, if you have a with a whose property value is set to `Top` and `Bottom`, the is stretched to maintain the anchored distance to the top and bottom edges of the as the of the is increased. > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. ## Examples - The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. + The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet3"::: @@ -1143,12 +1143,12 @@ ## Remarks The property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. ## Examples - The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. + The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet1"::: @@ -1203,7 +1203,7 @@ ## Examples The following code example is an event handler that is executed when the property value changes. The class has several methods with the name pattern *PropertyName*`Changed` that are raised when the corresponding *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . + The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_PropertyChangedEvents/CPP/propertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BackColorChanged/propertychangedevents.cs" id="Snippet1"::: @@ -1269,7 +1269,7 @@ ## Examples - The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. + The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet3"::: @@ -1328,7 +1328,7 @@ ## Examples The following code example is an event handler that is executed when the property value changes. The class has several methods with the name pattern *PropertyName*`Changed` that are raised when the corresponding *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . + The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_PropertyChangedEvents/CPP/propertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BackColorChanged/propertychangedevents.cs" id="Snippet1"::: @@ -1384,9 +1384,9 @@ property to specify the position and behavior of an image you have placed onto a control. takes effect only if the property is set. + Use the property to specify the position and behavior of an image you have placed onto a control. takes effect only if the property is set. - You can increase performance for large images if you set to something other than . + You can increase performance for large images if you set to something other than . ]]> @@ -1435,7 +1435,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -1541,12 +1541,12 @@ will throw an exception. Exceptions within the delegate method are considered untrapped and will be sent to the application's untrapped exception handler. + The delegate is called asynchronously, and this method returns immediately. You can call this method from any thread, even the thread that owns the control's handle. If the control's handle does not exist yet, this method searches up the control's parent chain until it finds a control or form that does have a window handle. If no appropriate handle can be found, will throw an exception. Exceptions within the delegate method are considered untrapped and will be sent to the application's untrapped exception handler. - You can call to retrieve the return value from the delegate, if neccesary, but this is not required. will block until the return value can be retrieved. + You can call to retrieve the return value from the delegate, if neccesary, but this is not required. will block until the return value can be retrieved. > [!NOTE] -> Most methods on a control can only be called from the thread where the control was created. In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. The invoke methods always invoke their callbacks on the control's thread. +> Most methods on a control can only be called from the thread where the control was created. In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. The invoke methods always invoke their callbacks on the control's thread. > [!NOTE] > An exception might be thrown if the thread that should process the message is no longer active. @@ -1554,7 +1554,7 @@ ## Examples - The following code example demonstrates a use of the method. + The following code example demonstrates a use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control_BeginInvoke/CPP/control_begininvoke.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BeginInvoke/control_begininvoke.cs" id="Snippet2"::: @@ -1631,12 +1631,12 @@ will throw an exception. Exceptions within the delegate method are considered untrapped and will be sent to the application's untrapped exception handler. + The delegate is called asynchronously, and this method returns immediately. You can call this method from any thread, even the thread that owns the control's handle. If the control's handle does not exist yet, this method searches up the control's parent chain until it finds a control or form that does have a window handle. If no appropriate handle can be found, will throw an exception. Exceptions within the delegate method are considered untrapped and will be sent to the application's untrapped exception handler. - You can call to retrieve the return value from the delegate, if neccesary, but this is not required. will block until the return value can be retrieved. + You can call to retrieve the return value from the delegate, if neccesary, but this is not required. will block until the return value can be retrieved. > [!NOTE] -> Most methods on a control can only be called from the thread where the control was created. In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. The invoke methods always invoke their callbacks on the control's thread. +> Most methods on a control can only be called from the thread where the control was created. In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. The invoke methods always invoke their callbacks on the control's thread. > [!NOTE] > An exception might be thrown if the thread that should process the message is no longer active. @@ -1644,7 +1644,7 @@ ## Examples - The following code example demonstrates a use of the method. + The following code example demonstrates a use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control_BeginInvoke/CPP/control_begininvoke.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BeginInvoke/control_begininvoke.cs" id="Snippet1"::: @@ -1719,7 +1719,7 @@ ## Remarks The of a is used to return a single for all data-bound controls contained by the . The keeps all controls that are bound to the same data source synchronized. For example, setting the property of the specifies the item in the underlying list that all data-bound controls point to. - For more information about creating a new and assigning it to the property, see the . + For more information about creating a new and assigning it to the property, see the . @@ -1771,7 +1771,7 @@ to the through the property, see the constructor. + To add a new to the through the property, see the constructor. This event is raised if the property is changed is changed by either a programmatic modification or user interaction. @@ -1841,7 +1841,7 @@ ## Remarks The value of this property is equal to the sum of the property value, and the property value. - The property is a read-only property. You can manipulate this property value by changing the value of the or properties or calling the , , , or methods. + The property is a read-only property. You can manipulate this property value by changing the value of the or properties or calling the , , , or methods. @@ -1903,7 +1903,7 @@ method is called to set the property. The property is not always changed through its `set` method so you should override the method to ensure that your code is executed when the property is set. + The bounds of the control include the nonclient elements such as scroll bars, borders, title bars, and menus. The method is called to set the property. The property is not always changed through its `set` method so you should override the method to ensure that your code is executed when the property is set. @@ -1953,12 +1953,12 @@ does not make a control a top-level control, and it does not raise the event. + The control is moved to the front of the z-order. If the control is a child of another control, the child control is moved to the front of the z-order. does not make a control a top-level control, and it does not raise the event. ## Examples - The following code example ensures that a is visible by calling its method. This example requires that you have a with a named `panel1`, and a named `label1`. + The following code example ensures that a is visible by calling its method. This example requires that you have a with a named `panel1`, and a named `label1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Members4/CPP/controlmembers4.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BringToFront/controlmembers4.cs" id="Snippet1"::: @@ -2059,7 +2059,7 @@ and properties must both be set to `true` for both the control and all its parent controls, and the control must be a form or the control's outermost parent must be a form. + In order for a control to receive input focus, the control must have a handle assigned to it, and the and properties must both be set to `true` for both the control and all its parent controls, and the control must be a form or the control's outermost parent must be a form. @@ -2417,7 +2417,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -2483,7 +2483,7 @@ property. Set to `true` to find and diagnose this thread activity more easily while debugging. + When a thread other than the creating thread of a control tries to access one of that control's methods or properties, it often leads to unpredictable results. A common invalid thread activity is a call on the wrong thread that accesses the control's property. Set to `true` to find and diagnose this thread activity more easily while debugging. ]]> @@ -2527,7 +2527,7 @@ You must set the `StandardClick` value of to `true` for this event to be raised. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2678,9 +2678,9 @@ The following table lists Windows Forms controls and which event ( method is called to set the property. The property is not always changed through its `set` method so you should override the method to ensure that your code is executed when the property is set. + The client area of a control is the bounds of the control, minus the nonclient elements such as scroll bars, borders, title bars, and menus. The method is called to set the property. The property is not always changed through its `set` method so you should override the method to ensure that your code is executed when the property is set. - The and properties represent the width and height of the client area of the control. You can use this property to obtain the size of the client area of the control for tasks such as drawing on the surface of the control. + The and properties represent the width and height of the client area of the control. You can use this property to obtain the size of the client area of the control for tasks such as drawing on the surface of the control. For more information about drawing on controls, see [Rendering a Windows Forms Control](/dotnet/desktop/winforms/controls/rendering-a-windows-forms-control). @@ -2690,7 +2690,7 @@ The following table lists Windows Forms controls and which event ( property with the control's assigned applied to the text. The `AutoSizeControl` method in this example also has a `textPadding` parameter that represents the padding to apply to all edges of the control. To make the padding appear equal, align the text with the value, if your control supports it. + The following code example resizes the specified control so the control will accommodate its formatted text. The formatted text is the property with the control's assigned applied to the text. The `AutoSizeControl` method in this example also has a `textPadding` parameter that represents the padding to apply to all edges of the control. To make the padding appear equal, align the text with the value, if your control supports it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Member5/CPP/controlmembers5.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/ClientRectangle/controlmembers5.cs" id="Snippet1"::: @@ -2737,7 +2737,7 @@ The following table lists Windows Forms controls and which event ( event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -2813,7 +2813,7 @@ The following table lists Windows Forms controls and which event ( contained by a . This example requires that the , and have been set. + The following code example displays information about the application in a contained by a . This example requires that the , and have been set. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties3/CPP/aboutdialog.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/CompanyName/aboutdialog.cs" id="Snippet1"::: @@ -2869,7 +2869,7 @@ The following table lists Windows Forms controls and which event ( is visible by calling its method. This example requires that you have a with a named `panel1`, and a named `label1`. + The following code example ensures that a is visible by calling its method. This example requires that you have a with a named `panel1`, and a named `label1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Members4/CPP/controlmembers4.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BringToFront/controlmembers4.cs" id="Snippet1"::: @@ -2928,7 +2928,7 @@ The following table lists Windows Forms controls and which event ( property. To give a control the input focus, use the or methods. + You can use this property to determine whether a control or any of the controls contained within it has the input focus. To determine whether the control has focus, regardless of whether any of its child controls have focus, use the property. To give a control the input focus, use the or methods. ]]> @@ -3162,7 +3162,7 @@ The following table lists Windows Forms controls and which event ( event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -3348,9 +3348,9 @@ The following table lists Windows Forms controls and which event ( assigned to the property by using the methods available in the class. - When adding several controls to a parent control, it is recommended that you call the method before initializing the controls to be added. After adding the controls to the parent control, call the method. Doing so will increase the performance of applications with many controls. + When adding several controls to a parent control, it is recommended that you call the method before initializing the controls to be added. After adding the controls to the parent control, call the method. Doing so will increase the performance of applications with many controls. - Use the property to iterate through all controls of a form, including nested controls. Use the method to retrieve the previous or next child control in the tab order. Use the property to get or set the active control of a container control. + Use the property to iterate through all controls of a form, including nested controls. Use the method to retrieve the previous or next child control in the tab order. Use the property to get or set the active control of a container control. @@ -3407,7 +3407,7 @@ The following table lists Windows Forms controls and which event ( method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. @@ -3415,9 +3415,9 @@ The following table lists Windows Forms controls and which event ( and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code excerpt demonstrates overriding the method. See the class overview for the complete code example. + This code excerpt demonstrates overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet2"::: @@ -3463,9 +3463,9 @@ The following table lists Windows Forms controls and which event ( method forces a handle to be created for the control and its child controls. This method is used when you need a handle immediately for manipulation of the control or its children; simply calling a control's constructor does not create the . + The method forces a handle to be created for the control and its child controls. This method is used when you need a handle immediately for manipulation of the control or its children; simply calling a control's constructor does not create the . - does not create a control handle if the control's property is `false`. You can either call the method or access the property to create the control's handle regardless of the control's visibility, but in this case, no window handles are created for the control's children. + does not create a control handle if the control's property is `false`. You can either call the method or access the property to create the control's handle regardless of the control's visibility, but in this case, no window handles are created for the control's children. ]]> @@ -3609,17 +3609,17 @@ The following table lists Windows Forms controls and which event ( object that you retrieve through the method should not normally be retained after the current Windows message has been processed, because anything painted with that object will be erased with the next WM_PAINT message. Therefore you cannot cache the object for reuse, except to use non-visual methods like . Instead, you must call every time that you want to use the object, and then call when you are finished using it. For more information about Windows messages, see . + The object that you retrieve through the method should not normally be retained after the current Windows message has been processed, because anything painted with that object will be erased with the next WM_PAINT message. Therefore you cannot cache the object for reuse, except to use non-visual methods like . Instead, you must call every time that you want to use the object, and then call when you are finished using it. For more information about Windows messages, see . - By design, sets ownership to the calling thread, and fails if it is called on other threads. + By design, sets ownership to the calling thread, and fails if it is called on other threads. > [!NOTE] -> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. +> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. ## Examples - The following code example resizes the specified control so the control will accommodate its formatted text. The formatted text is the property with the control's assigned applied to the text. The `AutoSizeControl` method in this example also has a `textPadding` parameter that represents the padding to apply to all edges of the control. To make the padding appear equal, align the text with the `MiddleCenter` value of if your control supports it. + The following code example resizes the specified control so the control will accommodate its formatted text. The formatted text is the property with the control's assigned applied to the text. The `AutoSizeControl` method in this example also has a `textPadding` parameter that represents the padding to apply to all edges of the control. To make the padding appear equal, align the text with the `MiddleCenter` value of if your control supports it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Member5/CPP/controlmembers5.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/ClientRectangle/controlmembers5.cs" id="Snippet1"::: @@ -3667,7 +3667,7 @@ The following table lists Windows Forms controls and which event ( method directly. The preferred method is to call the method, which forces a handle to be created for the control and its child controls when the control is created. + You typically should not call the method directly. The preferred method is to call the method, which forces a handle to be created for the control and its child controls when the control is created. ]]> @@ -3723,7 +3723,7 @@ The following table lists Windows Forms controls and which event ( property should not be overridden and used to adjust the properties of your derived control. Properties such as the , , and should be set by the corresponding properties in your control such as , and . The should only be extended when you are wrapping a standard Windows control class or to set styles not provided by the Windows Forms namespace. For more information about creating control parameters, see the `CreateWindow` and `CreateWindowEx` functions and the [CREATESTRUCT](/windows/win32/api/winuser/ns-winuser-createstructa) structure documentation. + The property should not be overridden and used to adjust the properties of your derived control. Properties such as the , , and should be set by the corresponding properties in your control such as , and . The should only be extended when you are wrapping a standard Windows control class or to set styles not provided by the Windows Forms namespace. For more information about creating control parameters, see the `CreateWindow` and `CreateWindowEx` functions and the [CREATESTRUCT](/windows/win32/api/winuser/ns-winuser-createstructa) structure documentation. @@ -3794,12 +3794,12 @@ The following table lists Windows Forms controls and which event ( to the property of the control to change the cursor displayed when the mouse pointer is over the control. To temporarily change the mouse cursor for all controls on your application set the property. Typically you would set the property to a wait cursor when populating a or saving or loading a file. - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. ## Examples - The following code example fills a with the user's available logical drives. The example also sets the combo box's property so the cursor is displayed when the mouse pointer is over the drop-down button. This code requires that you have a with a on it. + The following code example fills a with the user's available logical drives. The example also sets the combo box's property so the cursor is displayed when the mouse pointer is over the drop-down button. This code requires that you have a with a on it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties2/CPP/misccontrolproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/ContextMenu/misccontrolproperties.cs" id="Snippet1"::: @@ -4041,7 +4041,7 @@ The following table lists Windows Forms controls and which event (, , and members. To run the example, paste the following code in a form containing a called ListBox1. Call the `Populate_ListBox` method in the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and members. To run the example, paste the following code in a form containing a called ListBox1. Call the `Populate_ListBox` method in the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlDefaultProperties/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DefaultBackColor/form1.cs" id="Snippet1"::: @@ -4090,7 +4090,7 @@ The following table lists Windows Forms controls and which event ( to configure a default cursor for your control. This is more efficient than setting the cursor in the control's constructor, and gives automatic support for certain cursor-related designer functions. + Override to configure a default cursor for your control. This is more efficient than setting the cursor in the control's constructor, and gives automatic support for certain cursor-related designer functions. ]]> @@ -4133,7 +4133,7 @@ The following table lists Windows Forms controls and which event ( depending on the operating system and local culture. + The following table describes the value returned by depending on the operating system and local culture. |System/and or Culture|Font| |----------------------------|----------| @@ -4143,12 +4143,12 @@ The following table lists Windows Forms controls and which event ( returns the value of the property + If the previous fonts are not installed, the default font is Tahoma, 8 point. If Tahoma, 8 point, is not installed, returns the value of the property ## Examples - The following code example demonstrates how to use the , , and members. To run the example, paste the following code in a form containing a called ListBox1. Call the `Populate_ListBox` method in the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and members. To run the example, paste the following code in a form containing a called ListBox1. Call the `Populate_ListBox` method in the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlDefaultProperties/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DefaultBackColor/form1.cs" id="Snippet1"::: @@ -4197,7 +4197,7 @@ The following table lists Windows Forms controls and which event (, , and members. To run the example, paste the following code in a form containing a called ListBox1. Call the `Populate_ListBox` method in the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and members. To run the example, paste the following code in a form containing a called ListBox1. Call the `Populate_ListBox` method in the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlDefaultProperties/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DefaultBackColor/form1.cs" id="Snippet1"::: @@ -4758,7 +4758,7 @@ The following table lists Windows Forms controls and which event ( class is in the process of disposing. After the control is disposed of, it can no longer be referenced as a valid Windows control. Even though the instance of a control is disposed of, it is still maintained in memory until it is removed from memory through garbage collection. When a control is disposed of, you cannot call its method. + When this property returns `true`, the base class is in the process of disposing. After the control is disposed of, it can no longer be referenced as a valid Windows control. Even though the instance of a control is disposed of, it is still maintained in memory until it is removed from memory through garbage collection. When a control is disposed of, you cannot call its method. ]]> @@ -4816,19 +4816,19 @@ The following table lists Windows Forms controls and which event ( property to define how a control is automatically resized as its parent control is resized. For example, setting to causes the control to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). + Use the property to define how a control is automatically resized as its parent control is resized. For example, setting to causes the control to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. Setting the property on a docked control has no effect on the distance of the control from the edges of its container. > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. ## Examples - The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. + The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet2"::: @@ -4886,7 +4886,7 @@ The following table lists Windows Forms controls and which event ( property value changes. The class has several methods with the name pattern *PropertyName*`Changed` that are raised when the corresponding *PropertyName* value changes(*PropertyName* represents the name of the corresponding property). - The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . + The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_PropertyChangedEvents/CPP/propertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BackColorChanged/propertychangedevents.cs" id="Snippet1"::: @@ -4940,7 +4940,7 @@ The following table lists Windows Forms controls and which event ( method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. + The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. If the control is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -4964,7 +4964,7 @@ The following table lists Windows Forms controls and which event ( is `Cancel`, the event is raised. > [!NOTE] -> The method catches all exceptions and rethrows only the following security or critical exceptions: +> The method catches all exceptions and rethrows only the following security or critical exceptions: - SecurityException @@ -4985,11 +4985,11 @@ The following table lists Windows Forms controls and which event ( controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example requires that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. @@ -5180,7 +5180,7 @@ The following table lists Windows Forms controls and which event ( [!NOTE] -> is not a bindable property. +> is not a bindable property. ]]> @@ -5226,7 +5226,7 @@ The following table lists Windows Forms controls and which event ( to `true` for this event to be raised. These values might already be set to `true` if you are inheriting from existing Windows Forms controls. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -5555,7 +5555,7 @@ The following table lists Windows Forms controls and which event ( and properties of the are in screen coordinates, not client coordinates. The following line of code converts the properties to a client . + The and properties of the are in screen coordinates, not client coordinates. The following line of code converts the properties to a client . ```csharp Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); @@ -5564,7 +5564,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - This code excerpt demonstrates using the event. See the method for the complete code example. + This code excerpt demonstrates using the event. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet5"::: @@ -5614,7 +5614,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); The following information describes how and when events related to drag-and-drop operations are raised. - The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. + The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. If the control is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -5638,7 +5638,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); - If the value of is `Cancel`, the event is raised. > [!NOTE] - > The and properties of the are in screen coordinates, not client coordinates. The following line of Visual C# code converts the properties to a client . + > The and properties of the are in screen coordinates, not client coordinates. The following line of Visual C# code converts the properties to a client . ``` Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); @@ -5649,15 +5649,15 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); ## Examples - The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example requires that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the event. See the method for the complete code example. + This code excerpt demonstrates using the event. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet7"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet7"::: @@ -5703,7 +5703,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); The following describes how and when events related to drag-and-drop operations are raised. - The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. + The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. If the control is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -5731,15 +5731,15 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); ## Examples - The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example requires that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the event. See the method for the complete code example. + This code excerpt demonstrates using the event. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet8"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet8"::: @@ -5785,7 +5785,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); The following describes how and when events related to drag-and-drop operations are raised. - The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. + The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. If the control is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -5809,7 +5809,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); - If the value of is `Cancel`, the event is raised. > [!NOTE] - > The and properties of the are in screen coordinates, not client coordinates. The following line of C# code converts the properties to a client : + > The and properties of the are in screen coordinates, not client coordinates. The following line of C# code converts the properties to a client : > > Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); @@ -5818,15 +5818,15 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); ## Examples - The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example requires that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the event. See the method for the complete code example. + This code excerpt demonstrates using the event. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: @@ -5872,19 +5872,19 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); method is not supported for ActiveX controls. You can override the event and provide custom printing logic if required. + The method is not supported for ActiveX controls. You can override the event and provide custom printing logic if required. - The method has the following limitations: + The method has the following limitations: - An might be thrown for large bitmaps. The maximum allowable size varies by machine. -- does not support the `Ink` controls for the Windows XP Tablet PC Edition 2005 operating system. +- does not support the `Ink` controls for the Windows XP Tablet PC Edition 2005 operating system. -- does not draw a child if the property of the is set to `false`. +- does not draw a child if the property of the is set to `false`. - Controls inside containers are rendered in reverse order. -- is not fully functional for the ; only the border of a bitmap is drawn. +- is not fully functional for the ; only the border of a bitmap is drawn. ]]> @@ -5946,7 +5946,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); ## Examples - The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. + The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet2"::: @@ -6054,7 +6054,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); If the asynchronous operation has not been completed, this function will block until the result is available. > [!NOTE] -> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. +> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. ]]> @@ -6096,7 +6096,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: 1. @@ -6110,7 +6110,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); 6. - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: 1. @@ -6187,7 +6187,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); property value might not be the same as the returned by method. For example, if a control is contained within a control, and the is on a , the control's is the and the control's is the . + The control's property value might not be the same as the returned by method. For example, if a control is contained within a control, and the is on a , the control's is the and the control's is the . @@ -6243,7 +6243,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); method returns `true` if the control successfully received input focus. The control can have the input focus while not displaying any visual cues of having the focus. This behavior is primarily observed by the nonselectable controls listed below, or any controls derived from them. + The method returns `true` if the control successfully received input focus. The control can have the input focus while not displaying any visual cues of having the focus. This behavior is primarily observed by the nonselectable controls listed below, or any controls derived from them. A control can be selected and receive input focus if all the following are true: the `Selectable` value of is set to `true`, it is contained in another control, and all its parent controls are both visible and enabled. @@ -6264,7 +6264,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); - (when there is no link present in the control) > [!NOTE] -> is a low-level method intended primarily for custom control authors. Instead, application programmers should use the method or the property for child controls, or the method for forms. +> is a low-level method intended primarily for custom control authors. Instead, application programmers should use the method or the property for child controls, or the method for forms. @@ -6398,7 +6398,7 @@ Point clientPoint = targetControl.PointToClient(new Point(de.X, de.Y)); property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. Because the is immutable (meaning that you cannot adjust any of its properties), you can only assign the property a new . However, you can base the new font on the existing font. @@ -6516,7 +6516,7 @@ MyControl.Font = New Font(MyControl.Font, _ ## Remarks > [!NOTE] -> The property should not be set to any value other than the control's value, or -1. Setting to -1 has the effect of clearing the cached height value, and the value is recalculated the next time the property is referenced. +> The property should not be set to any value other than the control's value, or -1. Setting to -1 has the effect of clearing the cached height value, and the value is recalculated the next time the property is referenced. ]]> @@ -6560,12 +6560,12 @@ MyControl.Font = New Font(MyControl.Font, _ property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. ## Examples - The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. + The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet1"::: @@ -6621,7 +6621,7 @@ MyControl.Font = New Font(MyControl.Font, _ ## Examples The following code example is an event handler that is executed when the property value changes. The class has several methods with the name pattern *PropertyName*`Changed` that are raised when the corresponding *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . + The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_PropertyChangedEvents/CPP/propertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BackColorChanged/propertychangedevents.cs" id="Snippet1"::: @@ -6676,7 +6676,7 @@ MyControl.Font = New Font(MyControl.Font, _ method, because it correctly returns controls that own more than one handle. + This method searches up the window handle parent chain until it finds a handle that is associated with a control. This method is more reliable than the method, because it correctly returns controls that own more than one handle. ]]> @@ -6726,7 +6726,7 @@ MyControl.Font = New Font(MyControl.Font, _ method if you need to return controls that own more than one handle. + Use the method if you need to return controls that own more than one handle. ]]> @@ -6850,7 +6850,7 @@ MyControl.Font = New Font(MyControl.Font, _ method returns `null`. + If there is no child control at the specified point, the method returns `null`. ]]> @@ -6968,7 +6968,7 @@ MyControl.Font = New Font(MyControl.Font, _ method is dependent on tab order. To iterate through all controls of a form, including nested controls, use the property. To get or set the active control of a container control, use the property. + The method is dependent on tab order. To iterate through all controls of a form, including nested controls, use the property. To get or set the active control of a container control, use the property. ]]> @@ -7015,7 +7015,7 @@ MyControl.Font = New Font(MyControl.Font, _ differs by control. The might be unable to assign the returned size to the control. You can return a size larger than the constraints indicated in the `proposedSize` parameter, but `proposedSize` should decrease as the constraint decreases. For example, `GetPreferredSize(new Size(100, 0))` should not be wider than `GetPreferredSize(new Size(200, 0))`. The exception is a `proposedSize` of 0 or `Size.Empty`, which are defined as unconstrained. + The behavior of differs by control. The might be unable to assign the returned size to the control. You can return a size larger than the constraints indicated in the `proposedSize` parameter, but `proposedSize` should decrease as the constraint decreases. For example, `GetPreferredSize(new Size(100, 0))` should not be wider than `GetPreferredSize(new Size(200, 0))`. The exception is a `proposedSize` of 0 or `Size.Empty`, which are defined as unconstrained. ]]> @@ -7065,7 +7065,7 @@ MyControl.Font = New Font(MyControl.Font, _ to retrieve the bounds within which the control is scaled. You can override this method to reuse the scaling logic, but you must supply your own bounds. The default implementation returns scaled bounds that take into account the `specified` bounds, whether the control is top level, whether the control is fixed width or auto size, and any adornments the control might have. + This is a helper method that is called by to retrieve the bounds within which the control is scaled. You can override this method to reuse the scaling logic, but you must supply your own bounds. The default implementation returns scaled bounds that take into account the `specified` bounds, whether the control is top level, whether the control is fixed width or auto size, and any adornments the control might have. ]]> @@ -7110,7 +7110,7 @@ MyControl.Font = New Font(MyControl.Font, _ method and passing in the appropriate bit and the Boolean value to set the bit to. To determine the value assigned to a specified bit, use the method and pass in the member to evaluate. + Control style bit flags are used to categorize supported behavior. A control can enable a style by calling the method and passing in the appropriate bit and the Boolean value to set the bit to. To determine the value assigned to a specified bit, use the method and pass in the member to evaluate. @@ -7195,7 +7195,7 @@ MyControl.Font = New Font(MyControl.Font, _ The following describes how and when events related to drag-and-drop operations are raised. - The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. + The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. If the control is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -7223,15 +7223,15 @@ MyControl.Font = New Font(MyControl.Font, _ ## Examples - The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following code example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example requires that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based on state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to `None` in . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the event. See the method for the complete code example. + This code excerpt demonstrates using the event. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: @@ -7283,7 +7283,7 @@ MyControl.Font = New Font(MyControl.Font, _ or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: 1. @@ -7297,7 +7297,7 @@ MyControl.Font = New Font(MyControl.Font, _ 6. - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: 1. @@ -7392,7 +7392,7 @@ MyControl.Font = New Font(MyControl.Font, _ ## Examples - The following code example demonstrates using the and the property. To run the example paste the following code in a form. Add two buttons named `Button1` and `Button2` to the form and ensure all events are connected to their event handlers. + The following code example demonstrates using the and the property. To run the example paste the following code in a form. Add two buttons named `Button1` and `Button2` to the form and ensure all events are connected to their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaint1/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Handle/form1.cs" id="Snippet2"::: @@ -7452,14 +7452,14 @@ MyControl.Font = New Font(MyControl.Font, _ is displayed for the first time. For example, if a is created that has set to `false`, the event will not be raised until is set to `true`. + A handle is created when the is displayed for the first time. For example, if a is created that has set to `false`, the event will not be raised until is set to `true`. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -7521,14 +7521,14 @@ MyControl.Font = New Font(MyControl.Font, _ event, the control is still a valid Windows control and the can be recreated by calling the method. + During the event, the control is still a valid Windows control and the can be recreated by calling the method. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -7595,12 +7595,12 @@ MyControl.Font = New Font(MyControl.Font, _ collection has a greater than zero, the property will return `true`. Accessing the property does not force the creation of a if the control has no children, so referencing this property can provide a performance benefit when walking a tree of controls. + If the collection has a greater than zero, the property will return `true`. Accessing the property does not force the creation of a if the control has no children, so referencing this property can provide a performance benefit when walking a tree of controls. ## Examples - The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. + The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet1"::: @@ -7660,7 +7660,7 @@ MyControl.Font = New Font(MyControl.Font, _ and property values cause the property value of the control to change. + Changes made to the and property values cause the property value of the control to change. > [!NOTE] > The minimum height for the derived control is one pixel. The default height for the control is three pixels. Setting the height of the control to a value less than one will reset the property value to the default height. @@ -7769,7 +7769,7 @@ MyControl.Font = New Font(MyControl.Font, _ property to `false`. After the method is called, the property returns a value of `false` until the method is called. + Hiding the control is equivalent to setting the property to `false`. After the method is called, the property returns a value of `false` until the method is called. @@ -7836,7 +7836,7 @@ MyControl.Font = New Font(MyControl.Font, _ Most classes that do not directly support Input Method Editors, or allow direct input from an IME, will set the value of this property to . > [!IMPORTANT] -> The user can interactively change the unless it has been programmatically set to . In this case, the user will not be able to use the IME. +> The user can interactively change the unless it has been programmatically set to . In this case, the user will not be able to use the IME. > > The property is ignored on Windows 8 when the global input mode is in effect. For more info, see [Switch Text Input Changed from Per-Thread to Per-User](https://go.microsoft.com/fwlink/?LinkID=256509). @@ -7923,7 +7923,7 @@ MyControl.Font = New Font(MyControl.Font, _ ## Examples The following code example is an event handler that is executed when the property value changes. The class has several methods with the name pattern *PropertyName*`Changed` that are raised when the corresponding *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . + The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_PropertyChangedEvents/CPP/propertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BackColorChanged/propertychangedevents.cs" id="Snippet1"::: @@ -7973,7 +7973,7 @@ MyControl.Font = New Font(MyControl.Font, _ method is called immediately after adding a control to a container. The method enables a control to initialize its layout state based on its container. For example, you would typically apply anchoring and docking to the control in the method. + The method is called immediately after adding a control to a container. The method enables a control to initialize its layout state based on its container. For example, you would typically apply anchoring and docking to the control in the method. ]]> @@ -8034,12 +8034,12 @@ MyControl.Font = New Font(MyControl.Font, _ method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. + Calling the method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. ## Examples - The following code example enables the user to drag an image or image file onto the form, and have it be displayed at the point on it is dropped. The method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. + The following code example enables the user to drag an image or image file onto the form, and have it be displayed at the point on it is dropped. The method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.DragOperations/CPP/imagedrag.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/AllowDrop/imagedrag.cs" id="Snippet1"::: @@ -8086,7 +8086,7 @@ MyControl.Font = New Font(MyControl.Font, _ method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. + Calling the method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. ]]> @@ -8134,7 +8134,7 @@ MyControl.Font = New Font(MyControl.Font, _ method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. + Calling the method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. ]]> @@ -8183,7 +8183,7 @@ MyControl.Font = New Font(MyControl.Font, _ method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. + Calling the method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. ]]> @@ -8228,7 +8228,7 @@ MyControl.Font = New Font(MyControl.Font, _ method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. + Calling the method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. ]]> @@ -8274,7 +8274,7 @@ MyControl.Font = New Font(MyControl.Font, _ method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. + Calling the method does not force a synchronous paint; to force a synchronous paint, call the method after calling the method. When this method is called with no parameters, the entire client area is added to the update region. ]]> @@ -8328,7 +8328,7 @@ MyControl.Font = New Font(MyControl.Font, _ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -8422,10 +8422,10 @@ MyControl.Font = New Font(MyControl.Font, _ ## Remarks Delegates are similar to function pointers in C or C++ languages. Delegates encapsulate a reference to a method inside a delegate object. The delegate object can then be passed to code that calls the referenced method, and the method to be invoked can be unknown at compile time. Unlike function pointers in C or C++, delegates are object-oriented, type-safe, and more secure. - The method searches up the control's parent chain until it finds a control or form that has a window handle if the current control's underlying window handle does not exist yet. If no appropriate handle can be found, the method will throw an exception. Exceptions that are raised during the call will be propagated back to the caller. + The method searches up the control's parent chain until it finds a control or form that has a window handle if the current control's underlying window handle does not exist yet. If no appropriate handle can be found, the method will throw an exception. Exceptions that are raised during the call will be propagated back to the caller. > [!NOTE] -> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. +> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. The delegate can be an instance of , in which case the sender parameter will contain this control, and the event parameter will contain . The delegate can also be an instance of , or any other delegate that takes a void parameter list. A call to an or delegate will be faster than a call to another type of delegate. @@ -8507,7 +8507,7 @@ MyControl.Font = New Font(MyControl.Font, _ If the control's handle does not exist yet, this method searches up the control's parent chain until it finds a control or form that does have a window handle. If no appropriate handle can be found, this method throws an exception. Exceptions that are raised during the call will be propagated back to the caller. > [!NOTE] -> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. +> In addition to the property, there are four methods on a control that are thread safe: , , , and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread. The delegate can be an instance of , in which case the parameters will depend on the `args` value: - If no parameters are passed, the sender parameter will contain this control and the event parameter will contain . @@ -9046,15 +9046,15 @@ MyControl.Font = New Font(MyControl.Font, _ Controls in Windows Forms are bound to a specific thread and are not thread safe. Therefore, if you are calling a control's method from a different thread, you must use one of the control's invoke methods to marshal the call to the proper thread. This property can be used to determine if you must call an invoke method, which can be useful if you do not know what thread owns a control. > [!NOTE] -> In addition to the property, there are four methods on a control that are thread safe to call: ,, and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of these invoke methods when calling from a different thread. +> In addition to the property, there are four methods on a control that are thread safe to call: ,, and if the handle for the control has already been created. Calling before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of these invoke methods when calling from a different thread. - If the control's handle does not yet exist, searches up the control's parent chain until it finds a control or form that does have a window handle. If no appropriate handle can be found, the method returns `false`. + If the control's handle does not yet exist, searches up the control's parent chain until it finds a control or form that does have a window handle. If no appropriate handle can be found, the method returns `false`. - This means that can return `false` if is not required (the call occurs on the same thread), or if the control was created on a different thread but the control's handle has not yet been created. + This means that can return `false` if is not required (the call occurs on the same thread), or if the control was created on a different thread but the control's handle has not yet been created. In the case where the control's handle has not yet been created, you should not simply call properties, methods, or events on the control. This might cause the control's handle to be created on the background thread, isolating the control on a thread without a message pump and making the application unstable. - You can protect against this case by also checking the value of when returns `false` on a background thread. If the control handle has not yet been created, you must wait until it has been created before calling or . Typically, this happens only if a background thread is created in the constructor of the primary form for the application (as in `Application.Run(new MainForm())`, before the form has been shown or `Application.Run` has been called. + You can protect against this case by also checking the value of when returns `false` on a background thread. If the control handle has not yet been created, you must wait until it has been created before calling or . Typically, this happens only if a background thread is created in the constructor of the primary form for the application (as in `Application.Run(new MainForm())`, before the form has been shown or `Application.Run` has been called. One solution is to wait until the form's handle has been created before starting the background thread. Either force handle creation by calling the property, or wait until the event to start the background process. @@ -9219,7 +9219,7 @@ MyControl.Font = New Font(MyControl.Font, _ method. + When this property returns `true`, the control is disposed of and can no longer be referenced as a valid Windows control. Even though the instance of a control is disposed of, it is still maintained in memory until it is removed from memory through garbage collection. When a control is disposed, you cannot call its method. ]]> @@ -9278,7 +9278,7 @@ MyControl.Font = New Font(MyControl.Font, _ property to determine whether has been called. + Use the property to determine whether has been called. ]]> @@ -9329,7 +9329,7 @@ MyControl.Font = New Font(MyControl.Font, _ method to determine whether the character specified by the `charCode` parameter is an input character that the control wants. This method is called during window message preprocessing to determine whether the specified input character should be preprocessed or sent directly to the control. If returns `true`, the specified character is sent directly to the control. If returns `false`, the specified character is preprocessed and only sent to the control if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. + Call the method to determine whether the character specified by the `charCode` parameter is an input character that the control wants. This method is called during window message preprocessing to determine whether the specified input character should be preprocessed or sent directly to the control. If returns `true`, the specified character is sent directly to the control. If returns `false`, the specified character is preprocessed and only sent to the control if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. ]]> @@ -9372,12 +9372,12 @@ MyControl.Font = New Font(MyControl.Font, _ method to determine whether the key specified by the `keyData` parameter is an input key that the control wants. This method is called during window message preprocessing to determine whether the specified input key should be preprocessed or sent directly to the control. If returns `true`, the specified key is sent directly to the control. If returns `false`, the specified key is preprocessed and only sent to the control if it is not consumed by the preprocessing phase. Keys that are preprocessed include the TAB, RETURN, ESC, and the UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT ARROW keys. + Call the method to determine whether the key specified by the `keyData` parameter is an input key that the control wants. This method is called during window message preprocessing to determine whether the specified input key should be preprocessed or sent directly to the control. If returns `true`, the specified key is sent directly to the control. If returns `false`, the specified key is preprocessed and only sent to the control if it is not consumed by the preprocessing phase. Keys that are preprocessed include the TAB, RETURN, ESC, and the UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT ARROW keys. ## Examples - The following code example shows you how to override the method for a control. In this example, the `TabTextBox` class handles the TAB key. When the `TabTextBox` has the focus and the user presses the TAB key four spaces are added at the text insertion point, replacing any selected text. By default, the control handles the TAB key by moving the input focus to the next control. In this case, the keypress never reaches the method override. To prevent this default behavior, the method override returns `true` when the user presses the TAB key. For all other keypresses, the method override returns the result of calling the base-class version of the method. + The following code example shows you how to override the method for a control. In this example, the `TabTextBox` class handles the TAB key. When the `TabTextBox` has the focus and the user presses the TAB key four spaces are added at the text insertion point, replacing any selected text. By default, the control handles the TAB key by moving the input focus to the next control. In this case, the keypress never reaches the method override. To prevent this default behavior, the method override returns `true` when the user presses the TAB key. For all other keypresses, the method override returns the result of calling the base-class version of the method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/IsInputKey/form1.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/IsInputKey/form1.vb" id="Snippet0"::: @@ -9535,7 +9535,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. + The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/ProcessMnemonic/form1.cs" id="Snippet1"::: @@ -9585,7 +9585,7 @@ The following code example displays a message box indicating whether the specifi 3. - To handle keyboard events only at the form level and not enable other controls to receive keyboard events, set the property in your form's event-handling method to `true`. Certain keys, such as the TAB, RETURN, ESC, and arrow keys are handled by controls automatically. To have these keys raise the event, you must override the method in each control on your form. The code for the override of the would need to determine if one of the special keys is pressed and return a value of `true`. Instead of overriding the method, you can handle the event and set the property to `true`. For a code example, see the event. + To handle keyboard events only at the form level and not enable other controls to receive keyboard events, set the property in your form's event-handling method to `true`. Certain keys, such as the TAB, RETURN, ESC, and arrow keys are handled by controls automatically. To have these keys raise the event, you must override the method in each control on your form. The code for the override of the would need to determine if one of the special keys is pressed and return a value of `true`. Instead of overriding the method, you can handle the event and set the property to `true`. For a code example, see the event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -9722,7 +9722,7 @@ The following code example displays a message box indicating whether the specifi 3. - To handle keyboard events only at the form level and not enable other controls to receive keyboard events, set the property in your form's event-handling method to `true`. Certain keys, such as the TAB, RETURN, ESC, and arrow keys are handled by controls automatically. To have these keys raise the event, you must override the method in each control on your form. The code for the override of would need to determine if one of the special keys is pressed and return a value of `true`. + To handle keyboard events only at the form level and not enable other controls to receive keyboard events, set the property in your form's event-handling method to `true`. Certain keys, such as the TAB, RETURN, ESC, and arrow keys are handled by controls automatically. To have these keys raise the event, you must override the method in each control on your form. The code for the override of would need to determine if one of the special keys is pressed and return a value of `true`. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -9779,7 +9779,7 @@ The following code example displays a message box indicating whether the specifi event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a event. + The event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -9895,7 +9895,7 @@ The following code example displays a message box indicating whether the specifi or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: 1. @@ -9909,7 +9909,7 @@ The following code example displays a message box indicating whether the specifi 6. - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: 1. @@ -9999,7 +9999,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks The property value is equivalent to the property of the property value of the control. - Changes made to the and property values cause the property value of the control to change. + Changes made to the and property values cause the property value of the control to change. @@ -10053,14 +10053,14 @@ The following code example displays a message box indicating whether the specifi class is a value type (`Structure` in Visual Basic, `struct` in Visual C#), it is returned by value, meaning accessing the property returns a copy of the upper-left point of the control. So, adjusting the or properties of the returned from this property will not affect the , , , or property values of the control. To adjust these properties set each property value individually, or set the property with a new . + Because the class is a value type (`Structure` in Visual Basic, `struct` in Visual C#), it is returned by value, meaning accessing the property returns a copy of the upper-left point of the control. So, adjusting the or properties of the returned from this property will not affect the , , , or property values of the control. To adjust these properties set each property value individually, or set the property with a new . If the is a , the property value represents the upper-left corner of the in screen coordinates. ## Examples - The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. + The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet2"::: @@ -10226,7 +10226,7 @@ The following code example displays a message box indicating whether the specifi or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: 1. @@ -10240,7 +10240,7 @@ The following code example displays a message box indicating whether the specifi 6. - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: 1. @@ -10269,7 +10269,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example demonstrates validating the text for TextBox1. It also demonstrates handling the event by setting the property to the text in TextBox1. The code example used the method to check for an error before opening the file dialog box. To run this example, paste the following code into a form containing a named `TextBox1`, an named `OpenFileDialog1`, a named `Button1`, and an named `ErrorProvider1`. Ensure all events are associated with their event handlers. + The following code example demonstrates validating the text for TextBox1. It also demonstrates handling the event by setting the property to the text in TextBox1. The code example used the method to check for an error before opening the file dialog box. To run this example, paste the following code into a form containing a named `TextBox1`, an named `OpenFileDialog1`, a named `Button1`, and an named `ErrorProvider1`. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FileDialog/CPP/filedialogform.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/DoEvents/filedialogform.cs" id="Snippet2"::: @@ -10319,7 +10319,7 @@ The following code example displays a message box indicating whether the specifi that are reasonably close to Windows user interface guidelines. Some adjustments might still be necessary for particular applications. + Controls receive default values for that are reasonably close to Windows user interface guidelines. Some adjustments might still be necessary for particular applications. > [!NOTE] > Setting the property on a docked control has no effect on the distance of the control from the edges of its container. @@ -10363,7 +10363,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -10521,7 +10521,7 @@ The following code example displays a message box indicating whether the specifi , , , , , and members. To run the example, paste the following code in a form called Form1 containing several controls. This example requires that the , , and events are connected to the event handlers defined in the example. + The following code example demonstrates how to use the , , , , , and members. To run the example, paste the following code in a form called Form1 containing several controls. This example requires that the , , and events are connected to the event handlers defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RectangleToScreen/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseButtons/form1.cs" id="Snippet2"::: @@ -10651,7 +10651,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -10728,7 +10728,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -10788,14 +10788,14 @@ The following code example displays a message box indicating whether the specifi 5. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: @@ -10853,14 +10853,14 @@ The following code example displays a message box indicating whether the specifi 5. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: @@ -10907,7 +10907,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks A typical use of is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The event is defined and detected in connection with the and properties. + The event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -10922,14 +10922,14 @@ The following code example displays a message box indicating whether the specifi 5. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: @@ -10986,14 +10986,14 @@ The following code example displays a message box indicating whether the specifi 5. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: @@ -11051,14 +11051,14 @@ The following code example displays a message box indicating whether the specifi 5. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: @@ -11108,7 +11108,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example puts a label into an editable state when the user presses ALT+E while the mouse cursor is over the tree node. After the user is done editing the label, the labels cannot be edited again until the ALT+E key combination is pressed again. This example requires that you have a on a . The tree view should also have at least one in its collection. + The following code example puts a label into an editable state when the user presses ALT+E while the mouse cursor is over the tree node. After the user is done editing the label, the labels cannot be edited again until the ALT+E key combination is pressed again. This example requires that you have a on a . The tree view should also have at least one in its collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Members4/CPP/controlmembers4.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BringToFront/controlmembers4.cs" id="Snippet3"::: @@ -11164,14 +11164,14 @@ The following code example displays a message box indicating whether the specifi 5. > [!NOTE] -> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. +> The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the client area of the tab page, the raises the appropriate event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: @@ -11224,7 +11224,7 @@ The following code example displays a message box indicating whether the specifi event it is important to follow the user interface (UI) standards associated with the mouse wheel. The property value indicates the amount the mouse wheel has been moved. The UI should scroll when the accumulated delta is plus or minus 120. The UI should scroll the number of logical lines returned by the property for every delta value reached. You can also scroll more smoothly in smaller that 120 unit increments, however the ratio should remain constant, that is lines scrolled per 120 delta units of wheel movement. + When handling the event it is important to follow the user interface (UI) standards associated with the mouse wheel. The property value indicates the amount the mouse wheel has been moved. The UI should scroll when the accumulated delta is plus or minus 120. The UI should scroll the number of logical lines returned by the property for every delta value reached. You can also scroll more smoothly in smaller that 120 unit increments, however the ratio should remain constant, that is lines scrolled per 120 delta units of wheel movement. For more information about handling mouse wheel messages, see the [WM_MOUSEWHEEL](/windows/win32/inputdev/wm-mousewheel) topic. @@ -11245,7 +11245,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: @@ -11348,7 +11348,7 @@ The following code example displays a message box indicating whether the specifi The property can be used at run time to evaluate the object by name rather than type and programmatic name. Because the property returns a type, it can be evaluated in case-style logic statements (`Select` statement in Visual Basic, `switch` statement in C#). ## Examples - The following code example displays the of a control in a when the control is added or removed from a form. + The following code example displays the of a control in a when the control is added or removed from a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.ControlRemoved/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/ControlAdded/form1.cs" id="Snippet1"::: @@ -11433,7 +11433,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11484,14 +11484,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -11548,14 +11548,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -11611,7 +11611,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11664,7 +11664,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11717,14 +11717,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -11781,7 +11781,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11834,12 +11834,12 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates overriding the method in a derived class. To run the example, paste the following code after a form class, in the same file. Add a textbox of type `SingleClickTextBox` to the form. + The following code example demonstrates overriding the method in a derived class. To run the example, paste the following code after a form class, in the same file. Add a textbox of type `SingleClickTextBox` to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlOnClick/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnClick/form1.cs" id="Snippet1"::: @@ -11900,7 +11900,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11962,14 +11962,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -12025,7 +12025,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12078,7 +12078,7 @@ The following code example displays a message box indicating whether the specifi Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -12141,7 +12141,7 @@ The following code example displays a message box indicating whether the specifi Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -12197,9 +12197,9 @@ The following code example displays a message box indicating whether the specifi method is called when the control is first created. + The method is called when the control is first created. - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12251,14 +12251,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -12349,14 +12349,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -12413,7 +12413,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -12556,7 +12556,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12608,7 +12608,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12660,7 +12660,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12712,7 +12712,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12764,7 +12764,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12821,7 +12821,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -12882,14 +12882,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -12945,14 +12945,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -13008,7 +13008,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13060,7 +13060,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13112,7 +13112,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13173,7 +13173,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13235,7 +13235,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13281,14 +13281,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -13345,7 +13345,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13397,7 +13397,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -13458,7 +13458,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -13519,7 +13519,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -13580,7 +13580,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13636,7 +13636,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -13697,14 +13697,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName* `Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -13761,7 +13761,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13806,7 +13806,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13856,7 +13856,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13906,7 +13906,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13956,7 +13956,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14007,7 +14007,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14060,7 +14060,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14113,12 +14113,12 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the and methods in a derived class. To run the example, paste the following code in a new form and paste this class, forming the same file, after the form. Add a button of type `FunButton` to the form. + The following code example demonstrates how to override the and methods in a derived class. To run the example, paste the following code in a new form and paste this class, forming the same file, after the form. Add a button of type `FunButton` to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlDefaultProperties/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DefaultBackColor/form1.cs" id="Snippet2"::: @@ -14175,7 +14175,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14228,12 +14228,12 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the and methods in a derived class. To run the example, paste the following code in a new form and paste this class, forming the same file, after the form. Add a button of type `FunButton` to the form. + The following code example demonstrates how to override the and methods in a derived class. To run the example, paste the following code in a new form and paste this class, forming the same file, after the form. Add a button of type `FunButton` to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlDefaultProperties/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DefaultBackColor/form1.cs" id="Snippet2"::: @@ -14290,7 +14290,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14343,7 +14343,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14396,7 +14396,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -14455,7 +14455,7 @@ The following code example displays a message box indicating whether the specifi method is called if the control's `EnableNotifyMessage` style bit is set in . The `EnableNotifyMessage` style in enables the control to be notified when the method receives a Windows message. With this method, semi-trusted controls can listen for Windows messages without enabling them to modify the message. + The method is called if the control's `EnableNotifyMessage` style bit is set in . The `EnableNotifyMessage` style in enables the control to be notified when the method receives a Windows message. With this method, semi-trusted controls can listen for Windows messages without enabling them to modify the message. ]]> @@ -14499,7 +14499,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14550,12 +14550,12 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example enables the user to drag an image or image file onto the form, and have it be displayed at the point on which it is dropped. The method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. + The following code example enables the user to drag an image or image file onto the form, and have it be displayed at the point on which it is dropped. The method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.DragOperations/CPP/imagedrag.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/AllowDrop/imagedrag.cs" id="Snippet1"::: @@ -14613,7 +14613,7 @@ The following code example displays a message box indicating whether the specifi method enables derived classes to handle Windows background erase requests. + The method enables derived classes to handle Windows background erase requests. ]]> @@ -14665,14 +14665,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -14732,14 +14732,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -14795,14 +14795,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -14858,14 +14858,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -14920,7 +14920,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15005,14 +15005,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15068,14 +15068,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15131,14 +15131,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15194,14 +15194,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15257,14 +15257,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15319,7 +15319,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15367,7 +15367,7 @@ The following code example displays a message box indicating whether the specifi is set, you can override to do layered painting. See for more information. + If the `UserPaint` bit of the is set, you can override to do layered painting. See for more information. ]]> @@ -15422,7 +15422,7 @@ The following code example displays a message box indicating whether the specifi Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15473,7 +15473,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15524,7 +15524,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15576,14 +15576,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15639,7 +15639,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15691,7 +15691,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15746,7 +15746,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15798,7 +15798,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15850,14 +15850,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15913,12 +15913,12 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -15974,7 +15974,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16026,7 +16026,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16078,14 +16078,14 @@ The following code example displays a message box indicating whether the specifi ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example is an event-raising method that is executed when the property value changes. The class has several methods with the name pattern `On`*PropertyName*`Changed` that raise the corresponding *PropertyName*`Changed` event when the *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. + The following code example changes the of a derived class displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a class that derives from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_OnPropertyChangedEvents/CPP/onpropertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/OnBackColorChanged/onpropertychangedevents.cs" id="Snippet1"::: @@ -16138,15 +16138,15 @@ The following code example displays a message box indicating whether the specifi and , the property gets or sets their respective properties. The property is equal to its property. + For containers such as and , the property gets or sets their respective properties. The property is equal to its property. - Controls receive default values for that are reasonably close to Windows user interface guidelines. Some adjustments might still be necessary for particular applications. + Controls receive default values for that are reasonably close to Windows user interface guidelines. Some adjustments might still be necessary for particular applications. - All controls that implement are enlarged by the amount in when is `true`. + All controls that implement are enlarged by the amount in when is `true`. - The following controls do not use : + The following controls do not use : -- Controls that do not implement through +- Controls that do not implement through - Custom controls that directly inherit from @@ -16223,7 +16223,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -16267,7 +16267,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks The event is raised when the control is redrawn. It passes an instance of to the method(s) that handles the event. - When creating a new custom control or an inherited control with a different visual appearance, you must provide code to render the control by overriding the method. For more information, see [Overriding the OnPaint Method](/dotnet/desktop/winforms/controls/overriding-the-onpaint-method) and [Custom Control Painting and Rendering](/dotnet/desktop/winforms/controls/custom-control-painting-and-rendering). + When creating a new custom control or an inherited control with a different visual appearance, you must provide code to render the control by overriding the method. For more information, see [Overriding the OnPaint Method](/dotnet/desktop/winforms/controls/overriding-the-onpaint-method) and [Custom Control Painting and Rendering](/dotnet/desktop/winforms/controls/custom-control-painting-and-rendering). For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -16336,7 +16336,7 @@ The following code example displays a message box indicating whether the specifi ## Examples - The following code example uses the property and the method to set properties on the parent control of a button and its form. + The following code example uses the property and the method to set properties on the parent control of a button and its form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.FindForm/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Click/form1.cs" id="Snippet1"::: @@ -16441,14 +16441,14 @@ The following code example displays a message box indicating whether the specifi method was called before calling the method, the event is suppressed. + If the method was called before calling the method, the event is suppressed. - The and properties of the created are set to `null` if no values were provided when the method was called. + The and properties of the created are set to `null` if no values were provided when the method was called. ## Examples - The following code example demonstrates how to use the method. It also demonstrates ways in which the event is raised. In this example, the `Click` event handler for `Button1` explicitly calls . The `Click` event handler for `Button2` implicitly calls . is also called when the form is loaded. `Button3` returns the control to the state it was in when loaded. In each case, the event is raised. + The following code example demonstrates how to use the method. It also demonstrates ways in which the event is raised. In this example, the `Click` event handler for `Button1` explicitly calls . The `Click` event handler for `Button2` implicitly calls . is also called when the form is loaded. `Button3` returns the control to the state it was in when loaded. In each case, the event is raised. This is a complete example. To run the example, paste the following code in a blank form. @@ -16510,14 +16510,14 @@ The following code example displays a message box indicating whether the specifi method was called before calling the method, the event is suppressed. + If the method was called before calling the method, the event is suppressed. - The `affectedControl` and `affectedProperty` parameters can both be set to `null`. Doing so causes the and properties of the created to be set to `null`. + The `affectedControl` and `affectedProperty` parameters can both be set to `null`. Doing so causes the and properties of the created to be set to `null`. ## Examples - The following code example demonstrates how to use the method. It also demonstrates ways in which the event is raised. In this example, the `Click` event handler for `Button1` explicitly calls . The `Click` event handler for `Button2` implicitly calls . is also called when the form is loaded. `Button3` returns the control to the state it was in when loaded. In each case, the event is raised. + The following code example demonstrates how to use the method. It also demonstrates ways in which the event is raised. In this example, the `Click` event handler for `Button1` explicitly calls . The `Click` event handler for `Button2` implicitly calls . is also called when the form is loaded. `Button3` returns the control to the state it was in when loaded. In each case, the event is raised. This is a complete example. To run the example, paste the following code in a blank form. @@ -16577,7 +16577,7 @@ The following code example displays a message box indicating whether the specifi method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. + The following code example enables the user to drag an image or image file onto the form, and have it be displayed at the point on it is dropped. The method is overridden to repaint the image each time the form is painted; otherwise the image would only persist until the next repainting. The event-handling method determines the type of data being dragged into the form and provides the appropriate feedback. The event-handling method displays the image on the form, if an can be created from the data. Because the and values are screen coordinates, the example uses the method to convert them to client coordinates. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control.DragOperations/CPP/imagedrag.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/AllowDrop/imagedrag.cs" id="Snippet1"::: @@ -16624,7 +16624,7 @@ The following code example displays a message box indicating whether the specifi , , , , , and members. To run the example, paste the following code in a form called Form1 containing several controls. This example requires that the , , and events are connected to the event handlers defined in the example. + The following code example demonstrates how to use the , , , , , and members. To run the example, paste the following code in a form called Form1 containing several controls. This example requires that the , , and events are connected to the event handlers defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RectangleToScreen/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseButtons/form1.cs" id="Snippet2"::: @@ -16750,9 +16750,9 @@ The following code example displays a message box indicating whether the specifi is called by the application's message loop to preprocess input messages before they are dispatched. Possible values for the `msg` parameter are WM_KEYDOWN, WM_SYSKEYDOWN, WM_CHAR, and WM_SYSCHAR. + is called by the application's message loop to preprocess input messages before they are dispatched. Possible values for the `msg` parameter are WM_KEYDOWN, WM_SYSKEYDOWN, WM_CHAR, and WM_SYSCHAR. - When overriding , a control should return `true` to indicate that it has processed the message. For messages that are not processed by the control, the result of `base.PreProcessMessage` should be returned. Controls will typically override one of the more specialized methods such as , , , , or instead of overriding . + When overriding , a control should return `true` to indicate that it has processed the message. For messages that are not processed by the control, the result of `base.PreProcessMessage` should be returned. Controls will typically override one of the more specialized methods such as , , , , or instead of overriding . ]]> @@ -16844,7 +16844,7 @@ The following code example displays a message box indicating whether the specifi ## Remarks This method is called during message preprocessing to handle command keys. Command keys are keys that always take precedence over regular input keys. Examples of command keys include accelerators and menu shortcuts. The method must return `true` to indicate that it has processed the command key, or `false` to indicate that the key is not a command key. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. - The method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. + The method first determines whether the control has a , and if so, enables the to process the command key. If the command key is not a menu shortcut and the control has a parent, the key is passed to the parent's method. The net effect is that command keys are "bubbled" up the control hierarchy. In addition to the key the user pressed, the key data also indicates which, if any, modifier keys were pressed at the same time as the key. Modifier keys include the SHIFT, CTRL, and ALT keys. ]]> @@ -16889,7 +16889,7 @@ The following code example displays a message box indicating whether the specifi method indicates that the control is not processing the character. The method simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog characters. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. + This method is called during message preprocessing to handle dialog characters, such as control mnemonics. This method is called only if the method indicates that the control is not processing the character. The method simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog characters. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. ]]> @@ -16934,7 +16934,7 @@ The following code example displays a message box indicating whether the specifi method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog keys. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. + This method is called during message preprocessing to handle dialog characters, such as TAB, RETURN, ESC, and arrow keys. This method is called only if the method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog keys. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. ]]> @@ -16979,7 +16979,7 @@ The following code example displays a message box indicating whether the specifi , , or methods. The `m` parameter contains the window message that must be processed. Possible values for the property are WM_CHAR, WM_KEYDOWN, WM_SYSKEYDOWN, WM_KEYUP, WM_SYSKEYUP, and WM_IME_CHAR. + This method is called when a control receives a keyboard message. The method is responsible for generating the appropriate key events for the message by calling the , , or methods. The `m` parameter contains the window message that must be processed. Possible values for the property are WM_CHAR, WM_KEYDOWN, WM_SYSKEYDOWN, WM_KEYUP, WM_SYSKEYUP, and WM_IME_CHAR. ]]> @@ -17024,7 +17024,7 @@ The following code example displays a message box indicating whether the specifi method. If the parent's method does not process the message then the method is called to generate the appropriate keyboard events. The `m` parameter contains the window message that must be processed. Possible values for the property are WM_CHAR, WM_KEYDOWN, WM_SYSKEYDOWN, WM_KEYUP, and WM_SYSKEYUP. + This method is called when a control receives a keyboard message. The method first determines whether the control has a parent; if so, it calls the parent's method. If the parent's method does not process the message then the method is called to generate the appropriate keyboard events. The `m` parameter contains the window message that must be processed. Possible values for the property are WM_CHAR, WM_KEYDOWN, WM_SYSKEYDOWN, WM_KEYUP, and WM_SYSKEYUP. ]]> @@ -17072,7 +17072,7 @@ The following code example displays a message box indicating whether the specifi property are WM_CHAR, WM_KEYDOWN, WM_SYSKEYDOWN, WM_KEYUP, and WM_SYSKEYUP. The method simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog keys. + This method is called by a child control when the child control receives a keyboard message. The child control calls this method before generating any keyboard events for the message. If this method returns `true`, the child control considers the message processed and does not generate any keyboard events. The `m` parameter contains the window message to preview. Possible values for the property are WM_CHAR, WM_KEYDOWN, WM_SYSKEYDOWN, WM_KEYUP, and WM_SYSKEYUP. The method simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog keys. ]]> @@ -17124,7 +17124,7 @@ The following code example displays a message box indicating whether the specifi method to determine whether the given character matches a mnemonic in the control's text. + This method is called to give a control the opportunity to process a mnemonic character. The method should determine whether the control is in a state to process mnemonics and if whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. Implementations of this method often use the method to determine whether the given character matches a mnemonic in the control's text. For example: @@ -17134,12 +17134,12 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { } ``` - This default implementation of the method simply returns `false` to indicate that the control has no mnemonic. + This default implementation of the method simply returns `false` to indicate that the control has no mnemonic. ## Examples - The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. + The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/ProcessMnemonic/form1.cs" id="Snippet1"::: @@ -17207,12 +17207,12 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ``` > [!NOTE] -> It is strongly recommended that you provide the company name, product name, and product version. Providing this information enables the use of Windows Forms features such as that make it easier to write applications that comply with the "Certified for Windows" program. +> It is strongly recommended that you provide the company name, product name, and product version. Providing this information enables the use of Windows Forms features such as that make it easier to write applications that comply with the "Certified for Windows" program. ## Examples - The following code example displays information about the application in a contained by a . This example requires that the , and have been set. + The following code example displays information about the application in a contained by a . This example requires that the , and have been set. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties3/CPP/aboutdialog.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/CompanyName/aboutdialog.cs" id="Snippet1"::: @@ -17279,12 +17279,12 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ``` > [!NOTE] -> It is strongly recommended that you provide the company name, product name, and product version. Providing this information enables the use of Windows Forms features such as that make it easier to write applications that comply with the "Certified for Windows" program. +> It is strongly recommended that you provide the company name, product name, and product version. Providing this information enables the use of Windows Forms features such as that make it easier to write applications that comply with the "Certified for Windows" program. ## Examples - The following code example displays information about the application in a contained by a . This example requires that the , and have been set. + The following code example displays information about the application in a contained by a . This example requires that the , and have been set. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties3/CPP/aboutdialog.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/CompanyName/aboutdialog.cs" id="Snippet1"::: @@ -17360,7 +17360,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code excerpt demonstrates handling the event. See the class overview for the complete code example. @@ -17408,7 +17408,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { The following describes how and when events related to drag-and-drop operations are raised. - The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. + The method determines the control under the current cursor location. It then checks to see if the control is a valid drop target. If the control is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -17431,14 +17431,14 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { - If the value of is `Cancel`, the event is raised. - By default, the event sets to `Cancel` in if the ESC key was pressed and sets to `Drop` in if the left, middle, or right mouse button is pressed. + By default, the event sets to `Cancel` in if the ESC key was pressed and sets to `Drop` in if the left, middle, or right mouse button is pressed. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - This code excerpt demonstrates using the event to cancel the drag-and-drop operation if the drag operation moves outside the bounds of the form. See the method for the complete code example. + This code excerpt demonstrates using the event to cancel the drag-and-drop operation if the drag operation moves outside the bounds of the form. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet6"::: @@ -17666,7 +17666,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { method is called whenever parameters are needed for a new control, but using a call from to is insufficient. This method also calls and and sets to `true`. + The method is called whenever parameters are needed for a new control, but using a call from to is insufficient. This method also calls and and sets to `true`. ]]> @@ -17727,7 +17727,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { property returns `true` if the method is still running on the control. + The property returns `true` if the method is still running on the control. ]]> @@ -17813,7 +17813,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { , , , , , and members. To run the example, paste the following code in a form called **Form1** containing several controls. This example requires that the , , and events are connected to the event handlers defined in the example. + The following code example demonstrates how to use the , , , , , and members. To run the example, paste the following code in a form called **Form1** containing several controls. This example requires that the , , and events are connected to the event handlers defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RectangleToScreen/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseButtons/form1.cs" id="Snippet2"::: @@ -17869,11 +17869,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { method is an infrastructure method and typically should not be called from your code. + The method is an infrastructure method and typically should not be called from your code. - If the `hWnd` parameter does not represent a valid control, the method returns `false`. + If the `hWnd` parameter does not represent a valid control, the method returns `false`. - Because Windows messages are returned to the top-level window, the method is used to propagate the return message to the control that sent the message. + Because Windows messages are returned to the top-level window, the method is used to propagate the return message to the control that sent the message. ]]> @@ -18017,7 +18017,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -18540,7 +18540,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { of the resized control, you can cast the `sender` parameter of the registered method to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the registered method to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the Resize event. The event is raised in response to a event, but also in response to other changes that affect the layout of the control. @@ -18549,7 +18549,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Examples - The following code example handles the event of a . When the form is resized, the event handler ensures that the form stays square (its and remain equal). To run this example, make sure and associate this event-handling method with the form's event. + The following code example handles the event of a . When the form is resized, the event handler ensures that the form stays square (its and remain equal). To run this example, make sure and associate this event-handling method with the form's event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/WinForms.Control.Resize/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Resize/form1.cs" id="Snippet1"::: @@ -18604,7 +18604,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { property value is equivalent to the return value of the method when passing in the value as a parameter. + The property value is equivalent to the return value of the method when passing in the value as a parameter. ]]> @@ -18663,16 +18663,16 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { method forces an immediate layout if there are any pending layout requests. + Calling the method forces an immediate layout if there are any pending layout requests. - The and methods are used in tandem to suppress multiple events while you adjust multiple attributes of the control. For example, you would typically call the method, then set the , , , or properties of the control, and then call the method to enable the changes to take effect. + The and methods are used in tandem to suppress multiple events while you adjust multiple attributes of the control. For example, you would typically call the method, then set the , , , or properties of the control, and then call the method to enable the changes to take effect. - There must be no pending calls to for to be successfully called. + There must be no pending calls to for to be successfully called. ## Examples - The following code example adds two buttons to a form. The example transactions the addition of the buttons by using the and methods. + The following code example adds two buttons to a form. The example transactions the addition of the buttons by using the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Members2/CPP/controlmembers2.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Focused/controlmembers2.cs" id="Snippet2"::: @@ -18722,14 +18722,14 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { method forces an immediate layout if there are any pending layout requests. When the `performLayout` parameter is set to `true`, an immediate layout occurs if there are any pending layout requests. + Calling the method forces an immediate layout if there are any pending layout requests. When the `performLayout` parameter is set to `true`, an immediate layout occurs if there are any pending layout requests. - The and methods are used in tandem to suppress multiple events while you adjust multiple attributes of the control. For example, you would typically call the method, then set the , , , or properties of the control, and then call the method to enable the changes to take effect. + The and methods are used in tandem to suppress multiple events while you adjust multiple attributes of the control. For example, you would typically call the method, then set the , , , or properties of the control, and then call the method to enable the changes to take effect. - There must be no pending calls to for to be successfully called. + There must be no pending calls to for to be successfully called. > [!NOTE] -> When adding several controls to a parent control, it is recommended that you call the method before initializing the controls to be added. After adding the controls to the parent control, call the method. This will increase the performance of applications with many controls. +> When adding several controls to a parent control, it is recommended that you call the method before initializing the controls to be added. After adding the controls to the parent control, call the method. This will increase the performance of applications with many controls. ]]> @@ -18787,7 +18787,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Remarks The value of the property is equal to the sum of the property value and the property value. - The property is read-only. You can change this property value indirectly by changing the value of the or properties or calling the , , , or methods. + The property is read-only. You can change this property value indirectly by changing the value of the or properties or calling the , , , or methods. @@ -18848,7 +18848,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. The property is used for international applications where the language is written from right to left, such as Hebrew or Arabic. When this property is set to , control elements that include text are displayed from right to left. @@ -18927,7 +18927,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Examples The following code example is an event handler that is executed when the property value changes. The class has several methods with the name pattern *PropertyName*`Changed` that are raised when the corresponding *PropertyName* value changes (*PropertyName* represents the name of the corresponding property). - The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . + The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_PropertyChangedEvents/CPP/propertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BackColorChanged/propertychangedevents.cs" id="Snippet1"::: @@ -19324,7 +19324,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { method scales the control by the specified scaling `factor`. It also recursively scales all child controls if the property is `true`. Internally, this method calls to scale each control. + The method scales the control by the specified scaling `factor`. It also recursively scales all child controls if the property is `true`. Internally, this method calls to scale each control. ]]> @@ -19501,9 +19501,9 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { property is `true`, then the method will recursively call the method of each of its child controls. + If the property is `true`, then the method will recursively call the method of each of its child controls. - The default implementation of always returns `true`. Derived classes can override to return `false` to indicate that scaling should not be performed on their children. + The default implementation of always returns `true`. Derived classes can override to return `false` to indicate that scaling should not be performed on their children. ]]> @@ -19560,11 +19560,11 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Examples - + - + - + ]]> @@ -19634,7 +19634,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { ## Remarks -The method activates the control if the control's style bit is set to `true`, it is contained in another control, and all its parent controls are both visible and enabled. +The method activates the control if the control's style bit is set to `true`, it is contained in another control, and all its parent controls are both visible and enabled. The Windows Forms controls in the following list are not selectable. Controls derived from controls in the list will also not be selectable. @@ -19795,7 +19795,7 @@ The following code example selects the specified method activates the next control in the tab order if the control's `Selectable` style bit is set to `true` in , it is contained in another control, and all its parent controls are both visible and enabled. + The method activates the next control in the tab order if the control's `Selectable` style bit is set to `true` in , it is contained in another control, and all its parent controls are both visible and enabled. The Windows Forms controls in the following list are not selectable. Controls derived from controls in the list will also not be selectable. @@ -19813,7 +19813,7 @@ The following code example selects the specified (when there is no link present in the control) - When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: 1. @@ -19832,12 +19832,12 @@ The following code example selects the specified method being used in a form that has some controls. Each time that you click the form, the next control is activated. The property gets the currently active control in the container control. + The following code exampleshows the method being used in a form that has some controls. Each time that you click the form, the next control is activated. The property gets the currently active control in the container control. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/SelectNextControl/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/SelectNextControl/form1.vb" id="Snippet1"::: - The following code example shows the method being used in a form that has a and some other controls. When you click the , the next control after the is activated. Notice that you have to get the parent of the control. Since is not a container, calling directly on the would not change the activation. + The following code example shows the method being used in a form that has a and some other controls. When you click the , the next control after the is activated. Notice that you have to get the parent of the control. Since is not a container, calling directly on the would not change the activation. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/SelectNextControl/form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/SelectNextControl/form1.vb" id="Snippet2"::: @@ -19879,7 +19879,7 @@ The following code example selects the specified , that is not a child of another control. An active control is a visible control that has input focus. To use the method with an inactive, top-level control, first call the method on the control. + The control is moved to the back of the z-order. If the control is a child of another control, the child control is moved to the back of the z-order. If the control is a top-level control, this method will not work correctly unless the control is active. A top-level control is a control, such as a , that is not a child of another control. An active control is a visible control that has input focus. To use the method with an inactive, top-level control, first call the method on the control. ]]> @@ -20073,9 +20073,9 @@ The following code example selects the specified , , or the or properties of the property can be passed in with a reference to the current instance of the control. However all values passed in are honored and applied to the control. + Typically, the parameters that correspond to the bounds not included in the `specified` parameter are passed in with their current values. For example, the , , or the or properties of the property can be passed in with a reference to the current instance of the control. However all values passed in are honored and applied to the control. - The `boundsSpecified` parameter represents the elements of the controls changed by your application. For example, if you change the of the control, the `boundsSpecified` parameter value is the `Size` value of . However, if the is adjusted in response to the property being set, the `boundsSpecified` parameter value is the `None` value of . + The `boundsSpecified` parameter represents the elements of the controls changed by your application. For example, if you change the of the control, the `boundsSpecified` parameter value is the `Size` value of . However, if the is adjusted in response to the property being set, the `boundsSpecified` parameter value is the `None` value of . > [!NOTE] > On Windows Server 2003 systems, the size of a is restricted by the maximum pixel width and height of the monitor. @@ -20083,7 +20083,7 @@ The following code example selects the specified method to ensure that the control remains a fixed size. This example requires that you have a class that is either directly or indirectly derived from the class. + The following code example overrides the method to ensure that the control remains a fixed size. This example requires that you have a class that is either directly or indirectly derived from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_Methods/CPP/controlmethods.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/SetBoundsCore/controlmethods.cs" id="Snippet1"::: @@ -20143,12 +20143,12 @@ The following code example selects the specified of the control. + Typically, you should not set the of the control. ## Examples - The following code example overrides the method to ensure that the control remains square. This example requires that you have a class that is either directly or indirectly derived from the class. + The following code example overrides the method to ensure that the control remains square. This example requires that you have a class that is either directly or indirectly derived from the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_Methods/CPP/controlmethods.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/SetBoundsCore/controlmethods.cs" id="Snippet2"::: @@ -20207,10 +20207,10 @@ The following code example selects the specified method and passing in the appropriate bit (or bits) and the Boolean value to set the bit(s) to. To determine the value assigned to a specified bit, use the method and pass in the member to evaluate. + Control style bit flags are used to categorize supported behavior. A control can enable a style by calling the method and passing in the appropriate bit (or bits) and the Boolean value to set the bit(s) to. To determine the value assigned to a specified bit, use the method and pass in the member to evaluate. > [!CAUTION] -> Setting the control style bits can substantially change the behavior of the control. Review the enumeration documentation to understand the effects of changing the control style bits before calling the method. +> Setting the control style bits can substantially change the behavior of the control. Review the enumeration documentation to understand the effects of changing the control style bits before calling the method. @@ -20262,7 +20262,7 @@ The following code example selects the specified method of a and pass in a value of `false`, the form will not be visible until you call again, passing in a value of `true`. + If you call the method of a and pass in a value of `false`, the form will not be visible until you call again, passing in a value of `true`. ]]> @@ -20353,7 +20353,7 @@ The following code example selects the specified property to `true`. After the method is called, the property returns a value of `true` until the method is called. + Showing the control is equivalent to setting the property to `true`. After the method is called, the property returns a value of `true` until the method is called. @@ -20570,7 +20570,7 @@ The following code example selects the specified class is a value type (`Structure` in Visual Basic, `struct` in Visual C#), it is returned by value, meaning accessing the property returns a copy of the size of the control. So, adjusting the or properties of the returned from this property will not affect the or of the control. To adjust the or of the control, you must set the control's or property, or set the property with a new . + Because the class is a value type (`Structure` in Visual Basic, `struct` in Visual C#), it is returned by value, meaning accessing the property returns a copy of the size of the control. So, adjusting the or properties of the returned from this property will not affect the or of the control. To adjust the or of the control, you must set the control's or property, or set the property with a new . > [!NOTE] > To maintain better performance, do not set the of a control in its constructor. The preferred method is to override the property. @@ -20581,7 +20581,7 @@ The following code example selects the specified to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. + The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet3"::: @@ -20724,7 +20724,7 @@ The following code example selects the specified event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -20769,19 +20769,19 @@ The following code example selects the specified method is called. + The layout logic of the control is suspended until the method is called. - The and methods are used in tandem to suppress multiple events while you adjust multiple attributes of the control. For example, you would typically call the method, then set the , , , or properties of the control, and then call the method to enable the changes to take effect. + The and methods are used in tandem to suppress multiple events while you adjust multiple attributes of the control. For example, you would typically call the method, then set the , , , or properties of the control, and then call the method to enable the changes to take effect. - There must be no pending calls to for to be successfully called. + There must be no pending calls to for to be successfully called. > [!NOTE] -> When adding several controls to a parent control, it is recommended that you call the method before initializing the controls to be added. After adding the controls to the parent control, call the method. This will increase the performance of applications with many controls. +> When adding several controls to a parent control, it is recommended that you call the method before initializing the controls to be added. After adding the controls to the parent control, call the method. This will increase the performance of applications with many controls. ## Examples - The following code example adds two buttons to a form. The example transactions the addition of the buttons by using the and methods. + The following code example adds two buttons to a form. The example transactions the addition of the buttons by using the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Members2/CPP/controlmembers2.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Focused/controlmembers2.cs" id="Snippet2"::: @@ -20999,7 +20999,7 @@ The following code example selects the specified event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -21060,7 +21060,7 @@ The following code example selects the specified to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. + The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet3"::: @@ -21110,7 +21110,7 @@ The following code example selects the specified event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -21174,7 +21174,7 @@ Note: This property will always return for an instance o When the user presses the TAB key, the input focus is set to the next control in the tab order. Controls with the property value of `false` are not included in the collection of controls in the tab order. The tab order can be manipulated by setting the control's property value. ## Examples - The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. + The following code example adds a to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized. Next it sets the and resizes the button to the same size as the . The example then sets the to `true` and sets the property. Lastly, it adds an event handler to handle the event of the button. This example requires that you have an named `imageList1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet3"::: @@ -21223,7 +21223,7 @@ Note: This property will always return for an instance o ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -21358,7 +21358,7 @@ Note: This property will always return for an instance o ## Examples - The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. + The following code example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet2"::: @@ -21410,7 +21410,7 @@ Note: This property will always return for an instance o ## Examples - The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . + The following code example changes the of a displaying currency data. The example converts the text to a decimal number and changes the to if the number is negative and to if the number is positive. This example requires that you have a that contains a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control_PropertyChangedEvents/CPP/propertychangedevents.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/BackColorChanged/propertychangedevents.cs" id="Snippet1"::: @@ -21473,7 +21473,7 @@ Note: This property will always return for an instance o ## Remarks The property value is equivalent to the property of the property value of the control. - Changes made to the and property values cause the property value of the control to change. + Changes made to the and property values cause the property value of the control to change. @@ -21579,11 +21579,11 @@ Note: This property will always return for an instance o There are two ways to repaint a form and its contents: -- You can use one of the overloads of the method with the method. +- You can use one of the overloads of the method with the method. -- You can call the method, which forces the control to redraw itself and all its children. This is equivalent to setting the method to `true` and using it with . +- You can call the method, which forces the control to redraw itself and all its children. This is equivalent to setting the method to `true` and using it with . - The method governs what gets painted or repainted. The method governs when the painting or repainting occurs. If you use the and methods together rather than calling , what gets repainted depends on which overload of you use. The method just forces the control to be painted immediately, but the method governs what gets painted when you call the method. + The method governs what gets painted or repainted. The method governs when the painting or repainting occurs. If you use the and methods together rather than calling , what gets repainted depends on which overload of you use. The method just forces the control to be painted immediately, but the method governs what gets painted when you call the method. For more information, see the [WM_PAINT](/windows/win32/gdi/wm-paint) topic. @@ -21644,7 +21644,7 @@ Note: This property will always return for an instance o of the control is different from the previous , the event is raised. Likewise, if the of the control changes, the event is raised. + If the new of the control is different from the previous , the event is raised. Likewise, if the of the control changes, the event is raised. ]]> @@ -21698,7 +21698,7 @@ Note: This property will always return for an instance o of the control if different from the previous , the event is raised. Likewise, is the of the control changes, the event is raised. + If the new of the control if different from the previous , the event is raised. Likewise, is the of the control changes, the event is raised. ]]> @@ -21756,7 +21756,7 @@ Note: This property will always return for an instance o of the control is different from the previous , the event is raised. Likewise, if the of the control changes, the event is raised. + If the new of the control is different from the previous , the event is raised. Likewise, if the of the control changes, the event is raised. ]]> @@ -21802,9 +21802,9 @@ Note: This property will always return for an instance o method to get the styles to apply. The styles assigned to the and properties of the assigned to the control's property are reapplied. The control is repainted to reflect the style changes if necessary. + This method calls the method to get the styles to apply. The styles assigned to the and properties of the assigned to the control's property are reapplied. The control is repainted to reflect the style changes if necessary. - The method has no effect if the property value is `false`. + The method has no effect if the property value is `false`. @@ -21857,7 +21857,7 @@ Note: This property will always return for an instance o method updates the position of the control in its parent control's z-order. For example, if this control is a newly created control that was added to a , the z-order is updated with the new control added to the back. + The method updates the position of the control in its parent control's z-order. For example, if this control is a newly created control that was added to a , the z-order is updated with the new control added to the back. ]]> @@ -21950,7 +21950,7 @@ Note: This property will always return for an instance o or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: 1. @@ -21964,7 +21964,7 @@ Note: This property will always return for an instance o 6. - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: 1. @@ -22034,7 +22034,7 @@ Note: This property will always return for an instance o or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: 1. @@ -22048,7 +22048,7 @@ Note: This property will always return for an instance o 6. - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: 1. @@ -22254,7 +22254,7 @@ If you set `Visible` to `true`: and property values cause the property value of the control to change. + Changes made to the and property values cause the property value of the control to change. @@ -22362,14 +22362,14 @@ If you set `Visible` to `true`: method after getting filtered through the method. + All messages are sent to the method after getting filtered through the method. - The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://go.microsoft.com/fwlink/?LinkId=181565). + The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://go.microsoft.com/fwlink/?LinkId=181565). ## Examples - The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The [WM_ACTIVATEAPP](/windows/win32/winmsg/wm-activateapp) operating system message is handled in this example to know when another application is becoming active. See the following topics to understand the available , , and values. Actual constant values can be found in the Windows.h header file. + The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The [WM_ACTIVATEAPP](/windows/win32/winmsg/wm-activateapp) operating system message is handled in this example to know when another application is becoming active. See the following topics to understand the available , , and values. Actual constant values can be found in the Windows.h header file. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ControlBindingsCollection.xml b/xml/System.Windows.Forms/ControlBindingsCollection.xml index 4cf87c95a4f..5cd39c39230 100644 --- a/xml/System.Windows.Forms/ControlBindingsCollection.xml +++ b/xml/System.Windows.Forms/ControlBindingsCollection.xml @@ -64,7 +64,7 @@ ## Remarks Simple data binding is accomplished by adding objects to a . Any object that inherits from the class can access the through the property. For a list of Windows controls that support data binding, see the class. - The contains standard collection methods such as , , and . + The contains standard collection methods such as , , and . To get the control that the belongs to, use the property. @@ -159,14 +159,14 @@ property of the created by this overload of the method is set to the value of the property. + The property of the created by this overload of the method is set to the value of the property. The event occurs when the change is complete. ## Examples - The following code example creates a instance, and uses the method to add the instance to the of a control. + The following code example creates a instance, and uses the method to add the instance to the of a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ControlBindingsCollection.Add Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ControlBindingsCollection/Add/source.cs" id="Snippet1"::: @@ -229,14 +229,14 @@ The does not specify a valid colum property of the created by this overload of the method is set to the value of the property. + The property of the created by this overload of the method is set to the value of the property. Adding a causes the event to occur. ## Examples - The following code example uses the method to add three objects to the of a control. The is accessed through the property of the class. + The following code example uses the method to add three objects to the of a control. The is accessed through the property of the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ControlBindingsCollection.Add1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ControlBindingsCollection/Add/source1.cs" id="Snippet1"::: @@ -357,7 +357,7 @@ The doesn't specify a valid member of the method raises the event. + Calling the method raises the event. ]]> @@ -432,7 +432,7 @@ The doesn't specify a valid member of the method raises the event. + Calling the method raises the event. ]]> @@ -515,7 +515,7 @@ The doesn't specify a valid member of the method raises the event. + Calling the method raises the event. ]]> @@ -601,7 +601,7 @@ The doesn't specify a valid member of the method raises the event. + Calling the method raises the event. ]]> @@ -727,7 +727,7 @@ The doesn't specify a valid member of the method to clear the for each control on a form. + The following code example uses the method to clear the for each control on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ControlBindingsCollection.Clear Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ControlBindingsCollection/Clear/source.cs" id="Snippet1"::: @@ -855,7 +855,7 @@ The doesn't specify a valid member of the property is used in cases where a without a specified is added to the collection. The default value for Windows Forms controls is + The property is used in cases where a without a specified is added to the collection. The default value for Windows Forms controls is ]]> @@ -903,7 +903,7 @@ The doesn't specify a valid member of the returns `null`. + If the specified property does not match a binding in the collection, returns `null`. @@ -952,7 +952,7 @@ The doesn't specify a valid member of the from a control's . The example gets the required by using the property, and removes the with the method. + The following code example removes a specific from a control's . The example gets the required by using the property, and removes the with the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ControlBindingsCollection.Remove Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ControlBindingsCollection/Remove/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ControlEventHandler.xml b/xml/System.Windows.Forms/ControlEventHandler.xml index 2a385e7fdeb..a625c73993c 100644 --- a/xml/System.Windows.Forms/ControlEventHandler.xml +++ b/xml/System.Windows.Forms/ControlEventHandler.xml @@ -49,7 +49,7 @@ ## Examples - The following code example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrencyString` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyStringToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. + The following code example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrencyString` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyStringToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ControlEventHandler Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ControlEventHandler/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ControlPaint.xml b/xml/System.Windows.Forms/ControlPaint.xml index b376fd92c12..131f9bd0f45 100644 --- a/xml/System.Windows.Forms/ControlPaint.xml +++ b/xml/System.Windows.Forms/ControlPaint.xml @@ -38,7 +38,7 @@ class enable you to draw your own controls or elements of controls. You can control the drawing of your own controls if the bit is set to `true` for the control. You can get or set the style bits by calling the or methods. You can set multiple style bits for any control. The enumeration members can be combined with bitwise operations. + The methods contained in the class enable you to draw your own controls or elements of controls. You can control the drawing of your own controls if the bit is set to `true` for the control. You can get or set the style bits by calling the or methods. You can set multiple style bits for any control. The enumeration members can be combined with bitwise operations. @@ -86,7 +86,7 @@ mode, this property is set to ; otherwise, it is set to . + If the user has enabled the mode, this property is set to ; otherwise, it is set to . ]]> @@ -264,7 +264,7 @@ The caller is responsible for deallocating the bitmap. is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. + If the specified is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. ]]> @@ -307,7 +307,7 @@ The caller is responsible for deallocating the bitmap. is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. + If the specified is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. ]]> @@ -348,7 +348,7 @@ The caller is responsible for deallocating the bitmap. is one of the , the color is converted to the color; otherwise, the color's luminosity value is increased. + If the specified is one of the , the color is converted to the color; otherwise, the color's luminosity value is increased. ]]> @@ -403,7 +403,7 @@ The caller is responsible for deallocating the bitmap. methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -473,7 +473,7 @@ The caller is responsible for deallocating the bitmap. methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -534,7 +534,7 @@ The caller is responsible for deallocating the bitmap. ## Examples - The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -584,7 +584,7 @@ The caller is responsible for deallocating the bitmap. methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -636,7 +636,7 @@ The caller is responsible for deallocating the bitmap. methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -702,7 +702,7 @@ The caller is responsible for deallocating the bitmap. ## Examples - The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -762,7 +762,7 @@ The caller is responsible for deallocating the bitmap. methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -819,7 +819,7 @@ The caller is responsible for deallocating the bitmap. methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. + The following code example demonstrates the use of one of the methods. To run this example, paste the following code in a form that imports the and namespaces. Ensure the form's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet2"::: @@ -981,7 +981,7 @@ The caller is responsible for deallocating the bitmap. method and the enumeration. To run this example, paste the following code in a form containing a Button named `Button1`. The form should import the and namespaces. Ensure the button's event is associated with the event handler in this example. + The following code example demonstrates the use of the method and the enumeration. To run this example, paste the following code in a form containing a Button named `Button1`. The form should import the and namespaces. Ensure the button's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet1"::: @@ -1038,7 +1038,7 @@ The caller is responsible for deallocating the bitmap. method and the enumeration. To run this example, paste the following code in a form containing a named `Button1`. The form should import the and namespaces. Ensure the button's event is associated with the event handler in this example. + The following code example demonstrates the use of the method and the enumeration. To run this example, paste the following code in a form containing a named `Button1`. The form should import the and namespaces. Ensure the button's event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaintMembers/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Border3DStyle/Overview/form1.cs" id="Snippet1"::: @@ -1319,7 +1319,7 @@ The caller is responsible for deallocating the bitmap. ## Examples - The following code example demonstrates using the method and the property. To run this example, paste the following code in a form. Add two buttons named `Button1` and `Button2` to the form and ensure all events are connected to their event handlers. + The following code example demonstrates using the method and the property. To run this example, paste the following code in a form. Add two buttons named `Button1` and `Button2` to the form and ensure all events are connected to their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaint1/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Handle/form1.cs" id="Snippet2"::: @@ -1374,7 +1374,7 @@ The caller is responsible for deallocating the bitmap. ## Examples - The following code example demonstrates using the method and the property. To run this example, paste the following code in a form. Add two buttons named `Button1` and Button2 to the form and ensure all events are connected to their event handlers. + The following code example demonstrates using the method and the property. To run this example, paste the following code in a form. Add two buttons named `Button1` and Button2 to the form and ensure all events are connected to their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaint1/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Handle/form1.cs" id="Snippet2"::: @@ -2006,7 +2006,7 @@ The caller is responsible for deallocating the bitmap. ## Examples - The following code example demonstrates how to use the , , and the members. To run the example, paste the following code in a form called `Form1` containing several controls. This example requires that the mouse events are connected to the event handlers defined in the example. + The following code example demonstrates how to use the , , and the members. To run the example, paste the following code in a form called `Form1` containing several controls. This example requires that the mouse events are connected to the event handlers defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RectangleToScreen/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseButtons/form1.cs" id="Snippet2"::: @@ -2062,7 +2062,7 @@ The caller is responsible for deallocating the bitmap. ## Examples - The following code example demonstrates using the and methods. To run the example, paste the following code in a form. Add a button named `Button3` to the form and ensure all events are connected to their event handlers. + The following code example demonstrates using the and methods. To run the example, paste the following code in a form. Add a button named `Button3` to the form and ensure all events are connected to their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaint1/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Handle/form1.cs" id="Snippet3"::: @@ -2507,7 +2507,7 @@ The caller is responsible for deallocating the bitmap. ## Examples - The following code example demonstrates using the method. To run the example, paste the following code in a form. Add a button named `Button2` to the form and ensure all events are connected to their event handlers. + The following code example demonstrates using the method. To run the example, paste the following code in a form. Add a button named `Button2` to the form and ensure all events are connected to their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlPaint1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Handle/form1.cs" id="Snippet1"::: @@ -2562,7 +2562,7 @@ The caller is responsible for deallocating the bitmap. is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. + If the specified is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. ]]> @@ -2605,7 +2605,7 @@ The caller is responsible for deallocating the bitmap. is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. + If the specified is one of the , the color is converted to a color; otherwise, the color's luminosity value is decreased. ]]> @@ -2646,7 +2646,7 @@ The caller is responsible for deallocating the bitmap. is one of the , the color is converted to the color; otherwise, the color's luminosity value is increased. + If the specified is one of the , the color is converted to the color; otherwise, the color's luminosity value is increased. ]]> diff --git a/xml/System.Windows.Forms/ControlStyles.xml b/xml/System.Windows.Forms/ControlStyles.xml index 1ca1fed287b..1c674f6e01a 100644 --- a/xml/System.Windows.Forms/ControlStyles.xml +++ b/xml/System.Windows.Forms/ControlStyles.xml @@ -33,24 +33,24 @@ method and passing in the appropriate bit (or bits) and the Boolean value to set the bit(s) to. For example, the following line of Visual Basic code would enable double-buffering. + Controls use this enumeration in various properties and methods to specify functionality. A control can enable a style by calling the method and passing in the appropriate bit (or bits) and the Boolean value to set the bit(s) to. For example, the following line of Visual Basic code would enable double-buffering. ```vb myControl.SetStyle(UserPaint Or AllPaintingInWmPaint Or DoubleBuffer, True) ``` - If the AllPaintingInWmPaint bit is set to `true`, the window message WM_ERASEBKGND is ignored, and both and methods are called directly from the window message WM_PAINT. This generally reduces flicker unless other controls send the window message WM_ERASEBKGND to the control. You might send the window message WM_ERASEBKGRND to achieve a pseudo-transparent effect similar to SupportsTransparentBackColor; for example, a with flat appearance does this. + If the AllPaintingInWmPaint bit is set to `true`, the window message WM_ERASEBKGND is ignored, and both and methods are called directly from the window message WM_PAINT. This generally reduces flicker unless other controls send the window message WM_ERASEBKGND to the control. You might send the window message WM_ERASEBKGRND to achieve a pseudo-transparent effect similar to SupportsTransparentBackColor; for example, a with flat appearance does this. To fully enable double-buffering, you can set the OptimizedDoubleBuffer and AllPaintingInWmPaint bits to `true`. However the preferred method for enabling double buffering, which yields the same result, is to set the property for the control to `true`. - If the SupportsTransparentBackColor bit is set to `true`, and the is set to a color whose alpha component is less than 255, will simulate transparency by asking its parent control to paint the background. This is not true transparency. + If the SupportsTransparentBackColor bit is set to `true`, and the is set to a color whose alpha component is less than 255, will simulate transparency by asking its parent control to paint the background. This is not true transparency. > [!NOTE] > If there is another control between the control and its parent, the current control will not show the control in the middle. - When the UserMouse bit is set to `true`, the following methods are still called: , , , , , , and . + When the UserMouse bit is set to `true`, the following methods are still called: , , , , , , and . - When the control is clicked, if the StandardClick bit is set to `true` the method is called and it raises the event. When the control is double-clicked, and both the StandardClick and StandardDoubleClick bits are set to `true`, the click is passed on to the event. Then the method is called and it raises the event. However, the control can call or directly regardless of the StandardClick and StandardDoubleClick bit values. For more information on control click and double click behaviors, see the and topics. + When the control is clicked, if the StandardClick bit is set to `true` the method is called and it raises the event. When the control is double-clicked, and both the StandardClick and StandardDoubleClick bits are set to `true`, the click is passed on to the event. Then the method is called and it raises the event. However, the control can call or directly regardless of the StandardClick and StandardDoubleClick bit values. For more information on control click and double click behaviors, see the and topics. When the UseTextForAccessibility bit is set and there is a value in the control's `Text` property, the value of that control's `Text` property determines the control's default Active Accessibility name and shortcut key. Otherwise, the text of the preceding control will be used instead. This style is set by default. Certain built-in control types, such as and , reset this style so that the `Text` property of those controls will not be used by Active Accessibility. diff --git a/xml/System.Windows.Forms/ControlUpdateMode.xml b/xml/System.Windows.Forms/ControlUpdateMode.xml index 875377f2230..dc3ad7acbef 100644 --- a/xml/System.Windows.Forms/ControlUpdateMode.xml +++ b/xml/System.Windows.Forms/ControlUpdateMode.xml @@ -26,7 +26,7 @@ is used by the property of the class. OnPropertyChanged is the default value. To force a control update when the update mode is Never, use the method on the related . + The is used by the property of the class. OnPropertyChanged is the default value. To force a control update when the update mode is Never, use the method on the related . ]]> diff --git a/xml/System.Windows.Forms/ConvertEventArgs.xml b/xml/System.Windows.Forms/ConvertEventArgs.xml index deda001a7b3..54849746384 100644 --- a/xml/System.Windows.Forms/ConvertEventArgs.xml +++ b/xml/System.Windows.Forms/ConvertEventArgs.xml @@ -43,7 +43,7 @@ ## Examples - The following code example creates a , adds a delegate to both the and events, and uses the property to add the to the of a control. The `DecimalToCurrencyString` event delegate, which is added to the event, uses the method to format the bound value (a type) as currency. The `CurrencyStringToDecimal` event delegate, which is added to the event, converts the value displayed by the control back to the type. + The following code example creates a , adds a delegate to both the and events, and uses the property to add the to the of a control. The `DecimalToCurrencyString` event delegate, which is added to the event, uses the method to format the bound value (a type) as currency. The `CurrencyStringToDecimal` event delegate, which is added to the event, converts the value displayed by the control back to the type. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ConvertEventArgs Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ConvertEventArgs/Overview/source.cs" id="Snippet1"::: @@ -139,7 +139,7 @@ ## Examples - The following code example uses the property to determine whether the conversion of one type to another can proceed. The `DecimalToCurrencyString` method tests whether the is a string. If not, the code exits the method. Similarly, the `CurrencyStringToDecimal` method tests whether the is a , and exits if it is not `true`. + The following code example uses the property to determine whether the conversion of one type to another can proceed. The `DecimalToCurrencyString` method tests whether the is a string. If not, the code exits the method. Similarly, the `CurrencyStringToDecimal` method tests whether the is a , and exits if it is not `true`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ConvertEventArgs.DesiredType Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ConvertEventArgs/DesiredType/source.cs" id="Snippet1"::: @@ -200,7 +200,7 @@ ## Examples - The following code example creates a , adds a delegate to both the and events, and uses the property to add the to the of a control. The `DecimalToCurrencyString` event delegate, which is added to the event, uses the method to format the bound value (a type) as currency. The `CurrencyStringToDecimal` event delegate, which is added to the event, converts the value displayed by the control back to the type. + The following code example creates a , adds a delegate to both the and events, and uses the property to add the to the of a control. The `DecimalToCurrencyString` event delegate, which is added to the event, uses the method to format the bound value (a type) as currency. The `CurrencyStringToDecimal` event delegate, which is added to the event, converts the value displayed by the control back to the type. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ConvertEventArgs Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ConvertEventArgs/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ConvertEventHandler.xml b/xml/System.Windows.Forms/ConvertEventHandler.xml index e90aca8e09a..b9704e2f681 100644 --- a/xml/System.Windows.Forms/ConvertEventHandler.xml +++ b/xml/System.Windows.Forms/ConvertEventHandler.xml @@ -51,7 +51,7 @@ ## Examples The following code - example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrency` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. + example creates a , adds a delegate to both the and events, and adds the to the of a control through the property. The `DecimalToCurrency` event delegate, added to the event, formats the bound value (a type) as currency using the method. The `CurrencyToDecimal` event delegate, added to the event, converts the value displayed by the control back to the type. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ConvertEventHandler Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ConvertEventHandler/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/CreateParams.xml b/xml/System.Windows.Forms/CreateParams.xml index 0da158a24b5..4e2cc4e87e5 100644 --- a/xml/System.Windows.Forms/CreateParams.xml +++ b/xml/System.Windows.Forms/CreateParams.xml @@ -39,7 +39,7 @@ For more information about creating control parameters, see [CreateWindow macro](/windows/win32/api/winuser/nf-winuser-createwindowa), [CreateWindowEx function](/windows/win32/api/winuser/nf-winuser-createwindowexa), and [CREATESTRUCT structure](/windows/win32/api/winuser/ns-winuser-createstructa). > [!NOTE] -> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. +> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. @@ -229,7 +229,7 @@ For more information about creating control parameters, see [CreateWindow macro](/windows/win32/api/winuser/nf-winuser-createwindowa), [CreateWindowEx function](/windows/win32/api/winuser/nf-winuser-createwindowexa), and [CREATESTRUCT structure](/windows/win32/api/winuser/ns-winuser-createstructa). > [!NOTE] -> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. +> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. ]]> @@ -283,7 +283,7 @@ For more information about creating control parameters, see [CreateWindow macro](/windows/win32/api/winuser/nf-winuser-createwindowa), [CreateWindowEx function](/windows/win32/api/winuser/nf-winuser-createwindowexa), and [CREATESTRUCT structure](/windows/win32/api/winuser/ns-winuser-createstructa). > [!NOTE] -> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. +> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. ]]> @@ -470,7 +470,7 @@ For more information about creating control parameters, see [CreateWindow macro](/windows/win32/api/winuser/nf-winuser-createwindowa), [CreateWindowEx function](/windows/win32/api/winuser/nf-winuser-createwindowexa), and [CREATESTRUCT structure](/windows/win32/api/winuser/ns-winuser-createstructa). > [!NOTE] -> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. +> The constants used to set the , , and properties are defined in the Winuser.h header file. This file is installed by the Platform SDK or Visual Studio. diff --git a/xml/System.Windows.Forms/CurrencyManager.xml b/xml/System.Windows.Forms/CurrencyManager.xml index a4e1f821387..2bf26545e93 100644 --- a/xml/System.Windows.Forms/CurrencyManager.xml +++ b/xml/System.Windows.Forms/CurrencyManager.xml @@ -38,7 +38,7 @@ The property returns the current item in the underlying list. To change the current item, set the property to a new value. The value must be greater than 0 and must be less than the value of the property. - If the underlying data source implements the interface, and the property is set to `true`, you can use the method. + If the underlying data source implements the interface, and the property is set to `true`, you can use the method. @@ -87,17 +87,17 @@ interface and the data source allows adding rows ( is `true`). + This method is supported only if the data source implements the interface and the data source allows adding rows ( is `true`). > [!NOTE] > This property was designed to allow complex-bound controls, such as the control, to add new items to list. - You typically use this property only if you are creating your own control that incorporates the . Otherwise, to add items if the data source is a , use the method of the class. If the data source is a , use the method and add the row to the . + You typically use this property only if you are creating your own control that incorporates the . Otherwise, to add items if the data source is a , use the method of the class. If the data source is a , use the method and add the row to the . ## Examples - The following code example adds a new item to the list with the method. + The following code example adds a new item to the list with the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CurrencyManager.AddNew Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CurrencyManager/AddNew/source.cs" id="Snippet1"::: @@ -145,12 +145,12 @@ This method is supported only if the objects contained by the data source implement the interface. If the objects contained within the data source do not implement the interface, changes made to the data will not be discarded. > [!NOTE] -> This property was designed to be used by complex data-bound controls, such as the control, to cancel edits. For example, when the user presses the ESC key, the method is called on the for the . Unless you are creating a control that requires this same functionality, you should not use this method. Instead, use the method of the class. +> This property was designed to be used by complex data-bound controls, such as the control, to cancel edits. For example, when the user presses the ESC key, the method is called on the for the . Unless you are creating a control that requires this same functionality, you should not use this method. Instead, use the method of the class. ## Examples - The following code example uses the when the user presses the ESC key. + The following code example uses the when the user presses the ESC key. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CurrencyManager.CancelCurrentEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CurrencyManager/CancelCurrentEdit/source.cs" id="Snippet1"::: @@ -223,7 +223,7 @@ maintains a 0-based array of items, the end of the list is always minus one. + Use the count property to determine when the end of a list has been reached. Because the maintains a 0-based array of items, the end of the list is always minus one. @@ -326,12 +326,12 @@ This method is supported only if the objects contained by the data source implement the or interfaces. > [!NOTE] -> This property was designed to be used by complex data-bound controls, such as the control. Unless you are creating a control that requires this same functionality, you should not use this method. Instead, if the data source is either a or , use the method of the class. +> This property was designed to be used by complex data-bound controls, such as the control. Unless you are creating a control that requires this same functionality, you should not use this method. Instead, if the data source is either a or , use the method of the class. ## Examples - The following code example demonstrates how to use the method. + The following code example demonstrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CurrencyManager.EndCurrentEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CurrencyManager/EndCurrentEdit/source.cs" id="Snippet1"::: @@ -412,7 +412,7 @@ ## Examples - The following code example uses the method to return a for a . The example then prints out the and of each in the collection. + The following code example uses the method to return a for a . The example then prints out the and of each in the collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CurrencyManager.GetItemProperties Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CurrencyManager/GetItemProperties/source.cs" id="Snippet1"::: @@ -468,7 +468,7 @@ method to be successful, the underlying list must be of type . + For the method to be successful, the underlying list must be of type . ]]> @@ -506,7 +506,7 @@ event will occur when the user calls the or method. + The event will occur when the user calls the or method. The event occurs only when the item itself has been changed in some manner. For example, if the value of an item is changed from 10 to 42, the event will occur. This should not be confused with the event where the item has been changed to a new item. @@ -574,7 +574,7 @@ ## Remarks The object returned by the property can be cast to any type that implements the interface. This will be commonly used when you know the type of the underlying list. For example, if you are data-bound to a , the underlying list is a (which implements ). Other classes that implement the interface (this is not a complete list) include , , and . - How you use the property depends on the class that implements the interface. For example, you can use the property to determine the name of the list. If the data source implements the interface, you can use the method to return the name of the current table. This is shown in the C# code below: + How you use the property depends on the class that implements the interface. For example, you can use the property to determine the name of the list. If the data source implements the interface, you can use the method to return the name of the current table. This is shown in the C# code below: ```csharp private void PrintCurrentListName(DataGrid myDataGrid){ @@ -632,7 +632,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ event is thrown by the class when changes to an item are made using methods such as , , and . This event can also occur when the data source is edited directly if it implements the interface. + The event is thrown by the class when changes to an item are made using methods such as , , and . This event can also occur when the data source is edited directly if it implements the interface. The associated `OnListChanged` method is a private method in this class. @@ -641,7 +641,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CurrencyManager1`. Then ensure that the event handler is associated with the event. @@ -684,7 +684,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ property is greater than 0, the field is a number between 0 and minus 1. If is 0, is -1. + If the value of the property is greater than 0, the field is a number between 0 and minus 1. If is 0, is -1. ]]> @@ -722,14 +722,14 @@ private void PrintCurrentListName(DataGrid myDataGrid){ consists of the schema of the underlying . The event is raised when that schema has changed. For example, the event is raised when a is programmatically added to a . + The metadata of the consists of the schema of the underlying . The event is raised when that schema has changed. For example, the event is raised when a is programmatically added to a . For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `CurrencyManager1`. Then ensure that the event handler is associated with the event. @@ -844,7 +844,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -890,7 +890,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -935,7 +935,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -984,9 +984,9 @@ private void PrintCurrentListName(DataGrid myDataGrid){ class is the property. In a list of items, you can view only one item out of the entire list. To determine which item is viewed, set the to a number between 0 (the beginning of the list) and minus 1 (the end of the list). + An important property of the class is the property. In a list of items, you can view only one item out of the entire list. To determine which item is viewed, set the to a number between 0 (the beginning of the list) and minus 1 (the end of the list). - Therefore, the determines the currency, or place in the list, of all controls bound to the same . For example, imagine a list consisting of two columns called "FirstName" and "LastName". Two controls are bound to the same list; the first control is bound to the first column, and the second control is bound to the second column. When the of the common is set to the third position, both controls display the appropriate values for that position in the list. In other words, if the item at position three consists of the first name "John" and the last name "Smith", the bound controls will display "John" and "Smith". + Therefore, the determines the currency, or place in the list, of all controls bound to the same . For example, imagine a list consisting of two columns called "FirstName" and "LastName". Two controls are bound to the same list; the first control is bound to the first column, and the second control is bound to the second column. When the of the common is set to the third position, both controls display the appropriate values for that position in the list. In other words, if the item at position three consists of the first name "John" and the last name "Smith", the bound controls will display "John" and "Smith". @@ -1035,12 +1035,12 @@ private void PrintCurrentListName(DataGrid myDataGrid){ method when the data source does not support notification when it is changed (for example, if it is an ). + Use the method when the data source does not support notification when it is changed (for example, if it is an ). ## Examples - The following code example creates an array and binds it to a control, and then changes one value. The method can be called to update the value displayed by the control. + The following code example creates an array and binds it to a control, and then changes one value. The method can be called to update the value displayed by the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CurrencyManager.Refresh Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CurrencyManager/Refresh/source.cs" id="Snippet1"::: @@ -1085,12 +1085,12 @@ private void PrintCurrentListName(DataGrid myDataGrid){ method was designed to allow complex controls, such as the control, to remove items from the list. You should not use this method to actually remove items. Instead, use the method of the class to delete items. + The method was designed to allow complex controls, such as the control, to remove items from the list. You should not use this method to actually remove items. Instead, use the method of the class to delete items. ## Examples - The following code example uses the method to remove the item at position 0 in the list. + The following code example uses the method to remove the item at position 0 in the list. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic CurrencyManager.RemoveAt Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CurrencyManager/RemoveAt/source.cs" id="Snippet1"::: @@ -1134,15 +1134,15 @@ private void PrintCurrentListName(DataGrid myDataGrid){ and are two methods that allow the temporary suspension and resumption of in a simple data binding scenario. You would typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. + and are two methods that allow the temporary suspension and resumption of in a simple data binding scenario. You would typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. > [!NOTE] -> Using prevents changes from being pushed into the data source until is called but does not prevent changes in the data source from affecting the bound controls. Controls that use complex data binding, such as the control, update their values based on change events such as the event. Calling this method will not prevent these events from occurring. For this reason, and are designed for use with simple-bound controls, such as a . Alternatively, you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. +> Using prevents changes from being pushed into the data source until is called but does not prevent changes in the data source from affecting the bound controls. Controls that use complex data binding, such as the control, update their values based on change events such as the event. Calling this method will not prevent these events from occurring. For this reason, and are designed for use with simple-bound controls, such as a . Alternatively, you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. ## Examples - The following code example demonstrates how to use the method. + The following code example demonstrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BindingManagerBase_Suspend_Resume_Binding/CPP/bindingmanagerbase_suspend_resume_binding.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/ResumeBinding/bindingmanagerbase_suspend_resume_binding.cs" id="Snippet2"::: @@ -1188,15 +1188,15 @@ private void PrintCurrentListName(DataGrid myDataGrid){ and methods allow the temporary suspension and resumption of data binding in a simple binding scenario. You would typically suspend data binding if the user must make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. + The and methods allow the temporary suspension and resumption of data binding in a simple binding scenario. You would typically suspend data binding if the user must make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. > [!NOTE] -> prevents changes from being applied to the data source until is called, but does not actually prevent any events from occurring. Controls that use complex data binding, such as the control, update their values based on change events, such as the event. Therefore, calling will not prevent complex-bound controls from receiving events to update the data source. For this reason, and are designed for use with simple-bound controls, such as the control. Alternatively, you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. +> prevents changes from being applied to the data source until is called, but does not actually prevent any events from occurring. Controls that use complex data binding, such as the control, update their values based on change events, such as the event. Therefore, calling will not prevent complex-bound controls from receiving events to update the data source. For this reason, and are designed for use with simple-bound controls, such as the control. Alternatively, you can use these methods in a complex binding scenario if you suppress events by setting the property to `false`. ## Examples - The following code example demonstrates how to use the method. + The following code example demonstrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BindingManagerBase_Suspend_Resume_Binding/CPP/bindingmanagerbase_suspend_resume_binding.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BindingManagerBase/ResumeBinding/bindingmanagerbase_suspend_resume_binding.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/Cursor.xml b/xml/System.Windows.Forms/Cursor.xml index 1555764e3c5..341074b62a9 100644 --- a/xml/System.Windows.Forms/Cursor.xml +++ b/xml/System.Windows.Forms/Cursor.xml @@ -64,19 +64,19 @@ ## Remarks A cursor is a small picture whose location on the screen is controlled by a pointing device, such as a mouse, pen, or trackball. When the user moves the pointing device, the operating system moves the cursor accordingly. - Different cursor shapes are used to inform the user what operation the mouse will have. For example, when editing or selecting text, a cursor is typically displayed. A wait cursor is commonly used to inform the user that a process is currently running. Examples of processes you might have the user wait for are opening a file, saving a file, or filling a control such as a , or with a large amount of data. + Different cursor shapes are used to inform the user what operation the mouse will have. For example, when editing or selecting text, a cursor is typically displayed. A wait cursor is commonly used to inform the user that a process is currently running. Examples of processes you might have the user wait for are opening a file, saving a file, or filling a control such as a , or with a large amount of data. - All controls that derive from the class have a property. To change the cursor displayed by the mouse pointer when it is within the bounds of the control, assign a to the property of the control. Alternatively, you can display cursors at the application level by assigning a to the property. For example, if the purpose of your application is to edit a text file, you might set the property to to display a wait cursor over the application while the file loads or saves to prevent any mouse events from being processed. When the process is complete, set the property to for the application to display the appropriate cursor over each control type. + All controls that derive from the class have a property. To change the cursor displayed by the mouse pointer when it is within the bounds of the control, assign a to the property of the control. Alternatively, you can display cursors at the application level by assigning a to the property. For example, if the purpose of your application is to edit a text file, you might set the property to to display a wait cursor over the application while the file loads or saves to prevent any mouse events from being processed. When the process is complete, set the property to for the application to display the appropriate cursor over each control type. > [!NOTE] -> If you call before resetting the property back to the cursor, the application will resume listening for mouse events and will resume displaying the appropriate for each control in the application. +> If you call before resetting the property back to the cursor, the application will resume listening for mouse events and will resume displaying the appropriate for each control in the application. Cursor objects can be created from several sources, such as the handle of an existing , a standard file, a resource, or a data stream. > [!NOTE] > The class does not support animated cursors (.ani files) or cursors with colors other than black and white. - If the image you are using as a cursor is too small, you can use the method to force the image to fill the bounds of the cursor. You can temporarily hide the cursor by calling the method, and restore it by calling the method. + If the image you are using as a cursor is too small, you can use the method to force the image to fill the bounds of the cursor. You can temporarily hide the cursor by calling the method, and restore it by calling the method. Starting with the .NET Framework 4.5.2, the will be resized based on the system DPI setting when the app.config file contains the following entry: @@ -94,7 +94,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/customcursor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Cursor/Overview/customcursor.vb" id="Snippet1"::: - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a cursor file named `MyWait.cur` in the application directory. It also requires a `Customer` object that can hold a collection of `Order` objects, and that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a cursor file named `MyWait.cur` in the application directory. It also requires a `Customer` object that can hold a collection of `Order` objects, and that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -150,7 +150,7 @@ ## Examples - The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires that you have a and a to call this code when it is clicked. + The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires that you have a and a to call this code when it is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Cursor Members/CPP/cursorstuff.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/.ctor/cursorstuff.cs" id="Snippet1"::: @@ -201,7 +201,7 @@ ## Examples - The following code example loads a cursor from a created by the method of an . When the method is called, an is displayed to the user and when a. CUR file is selected and the dialog closed, the file is opened and the returned is used to create a . + The following code example loads a cursor from a created by the method of an . When the method is called, an is displayed to the user and when a. CUR file is selected and the dialog closed, the file is opened and the returned is used to create a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CursorFromResource/CPP/mycursor.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/.ctor/mycursor.cs" id="Snippet1"::: @@ -251,7 +251,7 @@ ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -307,7 +307,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb > The resource reference when compiling as well as when referencing it in code, is case sensitive for both the C# and Visual Basic compilers. ## Examples - The following code example displays a form that demonstrates using a custom cursor by using the constructor. The custom is embedded in the application's resource file. The example requires that you have a cursor contained in a cursor file named `MyCursor.cur`. To compile this example using the command line, include the following flag: `/res:MyCursor.Cur, CustomCursor.MyCursor.Cur` + The following code example displays a form that demonstrates using a custom cursor by using the constructor. The custom is embedded in the application's resource file. The example requires that you have a cursor contained in a cursor file named `MyCursor.cur`. To compile this example using the command line, include the following flag: `/res:MyCursor.Cur, CustomCursor.MyCursor.Cur` :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/customcursor.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Cursor/Overview/customcursor.vb" id="Snippet1"::: @@ -358,7 +358,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb ## Examples - The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires that you have a and a to call this code when it is clicked. + The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires that you have a and a to call this code when it is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Cursor Members/CPP/cursorstuff.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/.ctor/cursorstuff.cs" id="Snippet1"::: @@ -488,10 +488,10 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb when you are finished using the . The `Dispose` method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + Call when you are finished using the . The `Dispose` method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector frees it. +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector frees it. @@ -542,7 +542,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb does not contain information about how to render a given image, so it passes the call to the . The method crops the image to the given dimensions and allows you to specify a within which to draw the . This method is typically used if you want to draw the cursor on a Graphics surface. For example, you might have a dialog that allows the user to select cursors from a control, or a group of controls. + The drawing command originates on the graphics surface represented by the `g` parameter, but a does not contain information about how to render a given image, so it passes the call to the . The method crops the image to the given dimensions and allows you to specify a within which to draw the . This method is typically used if you want to draw the cursor on a Graphics surface. For example, you might have a dialog that allows the user to select cursors from a control, or a group of controls. @@ -594,7 +594,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb object does not contain information about how to render a given image, so it passes the call to the object. The method stretches the image to fill the specified when the cursor is drawn. + The drawing command originates on the graphics surface represented by the `g` parameter, but a object does not contain information about how to render a given image, so it passes the call to the object. The method stretches the image to fill the specified when the cursor is drawn. @@ -647,7 +647,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires a and a to call this code when it is clicked. + The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires a and a to call this code when it is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Cursor Members/CPP/cursorstuff.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/.ctor/cursorstuff.cs" id="Snippet1"::: @@ -755,7 +755,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb ## Examples - The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires a and a to call this code when it is clicked. + The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires a and a to call this code when it is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Cursor Members/CPP/cursorstuff.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/.ctor/cursorstuff.cs" id="Snippet1"::: @@ -798,7 +798,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb and method calls must be balanced. For every call to the method there must be a corresponding call to the method. + The and method calls must be balanced. For every call to the method there must be a corresponding call to the method. @@ -844,7 +844,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb is the in the cursor that interacts with other elements on the screen. + The is the in the cursor that interacts with other elements on the screen. ]]> @@ -886,7 +886,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb if two instances of the class are equal; otherwise, . - + ## Examples The following code example draws the specified cursor on the form in its normal size, and in stretched mode, twice its size. This example requires a and a object to pass into the method when it is called. @@ -936,7 +936,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb if two instances of the class are not equal; otherwise, . - + ## Examples The following code example draws the specified cursor on the form in its normal size, and in stretched mode, twice its size. This example requires a and a to pass into the method when it is called. @@ -986,7 +986,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb ## Examples - The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires a and a to call this code when it is clicked. + The following code example creates a cursor from the cursor's , changes its position and clipping rectangle. The result is the cursor will move up and to the left 50 pixels from where it is when the code is executed. Additionally, the cursor's clipping rectangle is changed to the bounds of the form (by default it is the user's whole screen). This example requires a and a to call this code when it is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Cursor Members/CPP/cursorstuff.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/.ctor/cursorstuff.cs" id="Snippet1"::: @@ -1028,7 +1028,7 @@ vbc /resource:"MyWaitCursor.cur","MyCursors.MyWaitCursor.cur" MyCursor.vb and method calls must be balanced. For every call to the method there must be a corresponding call to the method. + The and method calls must be balanced. For every call to the method there must be a corresponding call to the method. diff --git a/xml/System.Windows.Forms/CursorConverter.xml b/xml/System.Windows.Forms/CursorConverter.xml index f171d27ba75..8b8d94089cc 100644 --- a/xml/System.Windows.Forms/CursorConverter.xml +++ b/xml/System.Windows.Forms/CursorConverter.xml @@ -37,7 +37,7 @@ For more information about type converters, see the base class and "Implementing a Type Converter". > [!NOTE] -> You should never create an instance of the class. Instead, call the method. For more information, see the examples in the base class. +> You should never create an instance of the class. Instead, call the method. For more information, see the examples in the base class. ]]> diff --git a/xml/System.Windows.Forms/Cursors.xml b/xml/System.Windows.Forms/Cursors.xml index 7e56cf8786e..7b88ca41e15 100644 --- a/xml/System.Windows.Forms/Cursors.xml +++ b/xml/System.Windows.Forms/Cursors.xml @@ -228,7 +228,7 @@ method in a derived class and using the property. To run the example, paste the following code in a new form and paste this class, forming the same file, after the form. Add a button of type FunButton to the form. + The following code example demonstrates how to override the method in a derived class and using the property. To run the example, paste the following code in a new form and paste this class, forming the same file, after the form. Add a button of type FunButton to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ControlDefaultProperties/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DefaultBackColor/form1.cs" id="Snippet2"::: @@ -974,7 +974,7 @@ method. To make the wait cursor display for the entire application, regardless of the control or form selected, call on the class. + To force display of the wait cursor over a given control, call that control's method. To make the wait cursor display for the entire application, regardless of the control or form selected, call on the class. ]]> diff --git a/xml/System.Windows.Forms/DataFormats.xml b/xml/System.Windows.Forms/DataFormats.xml index 98f793ff550..d2e6cdc7cd3 100644 --- a/xml/System.Windows.Forms/DataFormats.xml +++ b/xml/System.Windows.Forms/DataFormats.xml @@ -39,13 +39,13 @@ ## Remarks The and classes also use the `static` format list to determine the type of data that is retrieved from the system , or that is transferred in a drag-and-drop operation. - The method allows you to: + The method allows you to: - Get a predefined object for a format name or ID number. - Add a new format name/ID number pair to the `static` list in this class, and to register the format with the Windows registry as a format when you pass it the format name. - You can get the number or format from the appropriate property in the instance. + You can get the number or format from the appropriate property in the instance. @@ -108,11 +108,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -159,11 +159,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -212,11 +212,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -265,11 +265,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. @@ -330,11 +330,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -383,11 +383,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -454,7 +454,7 @@ ## Remarks This member is typically used to register native Clipboard formats. - Call with an ID number when you want to retrieve a instance that contains the ID/format name pair. Typically, the ID name and number is published by the creator of the application that you are using the to interface with. For example, the ID number for Dynamic Data Exchange (DDE) conversation information in Visual Basic is `&HBF00`, and the format name is `vbCFLink`. + Call with an ID number when you want to retrieve a instance that contains the ID/format name pair. Typically, the ID name and number is published by the creator of the application that you are using the to interface with. For example, the ID number for Dynamic Data Exchange (DDE) conversation information in Visual Basic is `&HBF00`, and the format name is `vbCFLink`. Call this method with any unique ID number to add the ID/format name pair to the `static` list of format name/ID pairs in the class. The new name will be created by concatenating "Format" and the ID number. This pair is not registered as a new format because you have not provided a name. @@ -507,7 +507,7 @@ with the format name when you need a Windows Clipboard numeric ID for an existing format. + Call with the format name when you need a Windows Clipboard numeric ID for an existing format. Call this method with your own format name to create a new format type. If the specified format does not exist, this method will register the name as a Clipboard format with the Windows registry and get a unique format identifier. This new name/ID pair will be added to the `static` list of format name/ID pairs in the class. @@ -561,11 +561,11 @@ ## Remarks This field is used by the interface and the class to indicate the CF_HTML clipboard data type. For more information about this format, see [HTML Clipboard Format](https://go.microsoft.com/fwlink/?LinkId=198813). - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -612,11 +612,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -668,11 +668,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -719,11 +719,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -772,11 +772,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -823,11 +823,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -876,11 +876,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -929,11 +929,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -981,11 +981,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. > [!NOTE] > The serializable format is specific to Windows Forms only and will not be recognized by applications created outside of Windows Forms. @@ -1035,11 +1035,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. > [!NOTE] > The string class format is specific to Windows Forms only and will not be recognized by applications created outside of Windows Forms. @@ -1100,11 +1100,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -1151,11 +1151,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. @@ -1213,11 +1213,11 @@ This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> @@ -1264,11 +1264,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. @@ -1324,11 +1324,11 @@ ## Remarks This field is used by the interface and the class to specify the data type. - When adding to an or to an implementation of , use this field as the format for the and methods. + When adding to an or to an implementation of , use this field as the format for the and methods. - To see if an object of this type exists, use this field as the format for the and methods. + To see if an object of this type exists, use this field as the format for the and methods. - To get an object of this type, use this as the format for the and methods. + To get an object of this type, use this as the format for the and methods. ]]> diff --git a/xml/System.Windows.Forms/DataGrid+HitTestInfo.xml b/xml/System.Windows.Forms/DataGrid+HitTestInfo.xml index b00ec14d7fe..1a999ed65a8 100644 --- a/xml/System.Windows.Forms/DataGrid+HitTestInfo.xml +++ b/xml/System.Windows.Forms/DataGrid+HitTestInfo.xml @@ -37,14 +37,14 @@ class, in conjunction with the method of the control, is used to determine which part of a control the user has clicked. The class contains the row, column, and part of the grid that was clicked. See the enumeration returned by the property for a complete list of grid parts. + The class, in conjunction with the method of the control, is used to determine which part of a control the user has clicked. The class contains the row, column, and part of the grid that was clicked. See the enumeration returned by the property for a complete list of grid parts. - To return a , invoke the method from the event of control. Pass the `x` and `y` properties of the to the method. + To return a , invoke the method from the event of control. Pass the `x` and `y` properties of the to the method. ## Examples - The following example uses the method in a event to return the object. The row, column, and part of the grid are then printed. + The following example uses the method in a event to return the object. The row, column, and part of the grid are then printed. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.HitTestInfo Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid+HitTestInfo/Overview/source.cs" id="Snippet1"::: @@ -95,7 +95,7 @@ ## Examples - The following example prints the numbers of the clicked row and column by calling the method from within the event of a control. This returns a object. + The following example prints the numbers of the clicked row and column by calling the method from within the event of a control. This returns a object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.HitTestInfo.Column Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid+HitTestInfo/Column/source.cs" id="Snippet1"::: @@ -175,7 +175,7 @@ . + This method overrides . @@ -274,7 +274,7 @@ ## Examples - The following example prints the number of the clicked row and column by calling the method from within the event of a control. This returns a object. + The following example prints the number of the clicked row and column by calling the method from within the event of a control. This returns a object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.HitTestInfo.Row Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid+HitTestInfo/Row/source.cs" id="Snippet1"::: @@ -357,7 +357,7 @@ method from within the event of a control. This returns a object. + The following example prints the clicked part of the grid by calling the method from within the event of a control. This returns a object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.HitTestInfo.Type Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid+HitTestInfo/Type/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DataGrid+HitTestType.xml b/xml/System.Windows.Forms/DataGrid+HitTestType.xml index e5863f11e79..9d7a15917e5 100644 --- a/xml/System.Windows.Forms/DataGrid+HitTestType.xml +++ b/xml/System.Windows.Forms/DataGrid+HitTestType.xml @@ -40,12 +40,12 @@ property of a returns a . The is created by invoking the method of a control. + Use the members of this enumeration to determine which part of the grid has been clicked. The property of a returns a . The is created by invoking the method of a control. ## Examples - The following example uses the method in a event to return the . The row, column, and part of the grid are then printed. + The following example uses the method in a event to return the . The row, column, and part of the grid are then printed. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.HitTestType Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid+HitTestType/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DataGrid.xml b/xml/System.Windows.Forms/DataGrid.xml index f6418529aee..036a7dbb922 100644 --- a/xml/System.Windows.Forms/DataGrid.xml +++ b/xml/System.Windows.Forms/DataGrid.xml @@ -83,7 +83,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the displays Web-like links to child tables. You can click on a link to navigate to the child table. When a child table is displayed, a back button appears in the caption that can be clicked to navigate back to the parent table. The data from the parent rows is displayed below the caption and above the column headers. You can hide the parent row information by clicking the button to the right of the back button. - To display a table in the at run time, use the method to set the and properties to a valid data source. The following data sources are valid: + To display a table in the at run time, use the method to set the and properties to a valid data source. The following data sources are valid: - A @@ -108,66 +108,66 @@ This class is not available in .NET Core 3.1 and later versions. Use the in a , use the and events. > [!NOTE] -> Because the number of columns can be customized (by adding or deleting members of the ) and the rows can be sorted by column, the and property values cannot be guaranteed to correspond to and indexes in a . Therefore you should avoid using those properties in the event to validate data. +> Because the number of columns can be customized (by adding or deleting members of the ) and the rows can be sorted by column, the and property values cannot be guaranteed to correspond to and indexes in a . Therefore you should avoid using those properties in the event to validate data. To determine which cell is selected, use the property. Change the value of any cell by using the property, which can take either the row and column indexes of the cell, or a single . Monitor the event to detect when the user selects another cell. - To determine which part of the control the user clicked, use the method in the event. The method returns a object, which contains the row and column of a clicked area. + To determine which part of the control the user clicked, use the method in the event. The method returns a object, which contains the row and column of a clicked area. - To manage the appearance of the control at run time, several properties for setting the color and caption attributes are available, including the , , , and so on. + To manage the appearance of the control at run time, several properties for setting the color and caption attributes are available, including the , , , and so on. - The appearance of the displayed grid (or grids) can be further modified by creating objects and adding them to the , which is accessed through the property. For example, if the is set to a containing three objects, you can add three objects to the collection, one for each table. To synchronize each object with a , set the of the to the of the . For more information about binding to an array of objects, see the property. + The appearance of the displayed grid (or grids) can be further modified by creating objects and adding them to the , which is accessed through the property. For example, if the is set to a containing three objects, you can add three objects to the collection, one for each table. To synchronize each object with a , set the of the to the of the . For more information about binding to an array of objects, see the property. - To create a customized view of a table, create an instance of a or class and add the object to the accessed through the property. Both classes inherit from . For each column style, set the to the of a column that you want to show in the grid. To hide a column, set its to something other than a valid . + To create a customized view of a table, create an instance of a or class and add the object to the accessed through the property. Both classes inherit from . For each column style, set the to the of a column that you want to show in the grid. To hide a column, set its to something other than a valid . To format the text of a column, set the property of the to one of the values found in [Formatting Types](/dotnet/standard/base-types/formatting-types) and [Custom Date and Time Format Strings](/dotnet/standard/base-types/custom-date-and-time-format-strings). To bind the to a strongly typed array of objects, the object type must contain public properties. To create a that displays the array, set the property to `typename[]` where `typename` is replaced by the name of the object type. Also note that the property is case-sensitive; the type name must be matched exactly. See the property for an example. - You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound. An empty will result in an empty grid. In addition, the objects in the must contain public properties. When binding to an , set the of the to "ArrayList" (the type name). + You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound. An empty will result in an empty grid. In addition, the objects in the must contain public properties. When binding to an , set the of the to "ArrayList" (the type name). For each , you can set color and caption attributes that override the settings for the control. However, if those properties are not set, the settings for the control are used by default. The following properties can be overridden by properties: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- - To customize the appearance of individual columns, add objects to the , which is accessed through the property of each . To synchronize each with a in the , set the to the of a . When constructing a , you can also set a formatting string that specifies how the column displays data. For example, you can specify that the column use a short-date format to display dates contained in the table. + To customize the appearance of individual columns, add objects to the , which is accessed through the property of each . To synchronize each with a in the , set the to the of a . When constructing a , you can also set a formatting string that specifies how the column displays data. For example, you can specify that the column use a short-date format to display dates contained in the table. > [!CAUTION] -> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . +> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . > [!NOTE] > The control replaces and adds functionality to the control; however, the control is retained for both backward compatibility and future use, if you choose. For more information, see [Differences Between the Windows Forms DataGridView and DataGrid Controls](/dotnet/desktop/winforms/controls/differences-between-the-windows-forms-datagridview-and-datagrid-controls). @@ -175,7 +175,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the containing two objects, and a that relates the two tables. To display the data, a control is then bound to the through the method. A button on the form changes the appearance of the grid by creating two objects and setting the of each object to a of one of the objects. The example also contains code in the event that uses the method to print the column, row, and part of the grid that has been clicked. + The following code example creates a Windows form, a containing two objects, and a that relates the two tables. To display the data, a control is then bound to the through the method. A button on the form changes the appearance of the grid by creating two objects and setting the of each object to a of one of the objects. The example also contains code in the event that uses the method to print the column, row, and part of the grid that has been clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/Overview/source.cs" id="Snippet1"::: @@ -217,7 +217,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the and uses the method to set the and properties. + The following code example creates a new and uses the method to set the and properties. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGrid/.ctor/source.vb" id="Snippet1"::: @@ -356,9 +356,9 @@ This class is not available in .NET Core 3.1 and later versions. Use the . See for details on creating a sort expression. + You can also sort using an expression for a . See for details on creating a sort expression. - If the is bound to a , you can set a custom sort for the table using the class's property. Similarly, if the is bound to a , each table in the can have a custom sort by setting the class's property. + If the is bound to a , you can set a custom sort for the table using the class's property. Similarly, if the is bound to a , each table in the can have a custom sort by setting the class's property. @@ -404,12 +404,12 @@ This class is not available in .NET Core 3.1 and later versions. Use the and the properties are set to the same color. Setting the property affects only even-numbered rows, while setting the affects only odd-numbered rows. + By default, both the and the properties are set to the same color. Setting the property affects only even-numbered rows, while setting the affects only odd-numbered rows. ## Examples - The following code example sets the to a value. + The following code example sets the to a value. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGrid/AlternatingBackColor/source.vb" id="Snippet1"::: @@ -482,14 +482,14 @@ This class is not available in .NET Core 3.1 and later versions. Use the property determines the color of rows in the grid, the determines the color of the nonrow area, which is only visible when the grid is scrolled to the bottom, or if only a few rows are contained in the grid. + Whereas the property determines the color of rows in the grid, the determines the color of the nonrow area, which is only visible when the grid is scrolled to the bottom, or if only a few rows are contained in the grid. - By default, both the and the properties are set to the same color. Setting the property affects only even-numbered rows, while setting the affects only odd-numbered rows. + By default, both the and the properties are set to the same color. Setting the property affects only even-numbered rows, while setting the affects only odd-numbered rows. ## Examples - The following code example sets both the and properties to different values. + The following code example sets both the and properties to different values. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.BackColor Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/BackColor/source.cs" id="Snippet1"::: @@ -526,12 +526,12 @@ This class is not available in .NET Core 3.1 and later versions. Use the determines the color of the nonrow area of the grid, which is only visible when no table is displayed by the , or if the grid is scrolled to the bottom, or if only a few rows are contained in the grid. + The determines the color of the nonrow area of the grid, which is only visible when no table is displayed by the , or if the grid is scrolled to the bottom, or if only a few rows are contained in the grid. ## Examples - The following code example sets the , and properties. + The following code example sets the , and properties. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.BackgroundColor Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/BackgroundColor/source.cs" id="Snippet1"::: @@ -763,12 +763,12 @@ This class is not available in .NET Core 3.1 and later versions. Use the method will return `false`. + The grid will deny edit requests if the user already started typing into a cell. In that case, the method will return `false`. ## Examples - The following code example uses the method to test if editing is possible before changing a specified column and row. + The following code example uses the method to test if editing is possible before changing a specified column and row. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.BeginEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/BeginEdit/source.cs" id="Snippet1"::: @@ -808,7 +808,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. + The Visual Studio design environment uses this method to start the initialization of a component that is used on a form or used by another component. The method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. ]]> @@ -893,7 +893,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGrid1`. Then ensure that the event handler is associated with the event. @@ -1135,7 +1135,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the is `false`, the **Back** button, **ParentRow** button, and caption will not be seen. Because navigation is limited, links to child tables will also not be visible and will be set to `None`. + If is `false`, the **Back** button, **ParentRow** button, and caption will not be seen. Because navigation is limited, links to child tables will also not be visible and will be set to `None`. @@ -1218,7 +1218,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method to determine if a row is expanded. + Use the method to determine if a row is expanded. @@ -1316,7 +1316,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method enables the control to show a pencil in the row header. + When called, the method enables the control to show a pencil in the row header. ]]> @@ -1351,7 +1351,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method enables the control to show a pencil in the row header. + When called, the method enables the control to show a pencil in the row header. ]]> @@ -1382,15 +1382,15 @@ This class is not available in .NET Core 3.1 and later versions. Use the method. + Derived classes should not call the base class's method. Only the following properties of the should be set: -- +- -- +- -- +- All other properties are handled by the itself. @@ -1602,14 +1602,14 @@ This class is not available in .NET Core 3.1 and later versions. Use the property to a value other than its current value scrolls the control so that the specified row is in view. - The property enables you to iterate through a parent table's rows even if you are viewing the child table rows. For example, if you are viewing a child table, incrementing the will cause the to display the next set of records in the child table that are linked to the parent table. + The property enables you to iterate through a parent table's rows even if you are viewing the child table rows. For example, if you are viewing a child table, incrementing the will cause the to display the next set of records in the child table that are linked to the parent table. If the user is viewing a parent table, or a table with no child relations, then the property returns the zero-based index of the current row. ## Examples - The following code example returns the . + The following code example returns the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.CurrentRowIndex Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/CurrentRowIndex/source.cs" id="Snippet1"::: @@ -1745,19 +1745,19 @@ This class is not available in .NET Core 3.1 and later versions. Use the contains multiple sources of data, you should set the to one of the sources. For example, if the is a or that contains three tables named `Customers`, `Orders`, and `OrderDetails`, you must specify one of the tables to bind to. If the or contains only one , you should set the to the of that . + If a contains multiple sources of data, you should set the to one of the sources. For example, if the is a or that contains three tables named `Customers`, `Orders`, and `OrderDetails`, you must specify one of the tables to bind to. If the or contains only one , you should set the to the of that . - If the is set to a that contains objects, parent tables will appear with a plus sign (+) in each row header. Clicking the plus sign causes a node to appear that contains links to child tables. For example, if a contains two objects named `Customers` and `Orders`, setting the to the `Customers` table causes the to display a parent table with a plus sign visible on each row header. If the is set to `Orders`, however, the row headers will be blank. + If the is set to a that contains objects, parent tables will appear with a plus sign (+) in each row header. Clicking the plus sign causes a node to appear that contains links to child tables. For example, if a contains two objects named `Customers` and `Orders`, setting the to the `Customers` table causes the to display a parent table with a plus sign visible on each row header. If the is set to `Orders`, however, the row headers will be blank. - If the is a , , collection, or array, setting the property throws an exception. + If the is a , , collection, or array, setting the property throws an exception. > [!NOTE] -> At run time, you must use the method to reset the property. However, the property alone can be reset at any time to a valid table name. +> At run time, you must use the method to reset the property. However, the property alone can be reset at any time to a valid table name. ## Examples - The following code example sets the and properties of a control. + The following code example sets the and properties of a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.DataMember Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/DataMember/source.cs" id="Snippet1"::: @@ -1819,7 +1819,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method to set the and properties. + At run time, use the method to set the and properties. The following data sources are valid: @@ -1837,20 +1837,20 @@ This class is not available in .NET Core 3.1 and later versions. Use the class overview for more information on data sources. - If the reference contains more than one table, you must set the property a string that specifies the table to bind to. For example, if the is a or that contains three tables named `Customers`, `Orders`, and `OrderDetails`, you must specify the table to bind to. + If the reference contains more than one table, you must set the property a string that specifies the table to bind to. For example, if the is a or that contains three tables named `Customers`, `Orders`, and `OrderDetails`, you must specify the table to bind to. - Setting the to an object that does not implement the interface or an will cause the grid to throw an exception. + Setting the to an object that does not implement the interface or an will cause the grid to throw an exception. You can create a grid that enables users to edit data but prevents them from adding new rows by using a as the data source and setting the property to `false`. To bind the to a strongly typed array of objects, the object type must contain public properties. To create a that displays the array, set the property to `typename` where `typename` is replaced by the name of the object type. Also note that the property is case-sensitive; the type name must be matched exactly. See the property for an example. - You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound. An empty will result in an empty grid. In addition, the objects in the must contain public properties. When binding to an , set the of the to "ArrayList" (the type name). + You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound. An empty will result in an empty grid. In addition, the objects in the must contain public properties. When binding to an , set the of the to "ArrayList" (the type name). ## Examples - The following code example shows how to set the , and when needed, the , to bind a to both a and a . The example also shows how to return data sources from the . + The following code example shows how to set the , and when needed, the , to bind a to both a and a . The example also shows how to return data sources from the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.DataSource Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/DataSource/source.cs" id="Snippet1"::: @@ -1889,7 +1889,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the event occurs when the value changes, or when the of the changes. + The event occurs when the value changes, or when the of the changes. @@ -1958,12 +1958,12 @@ This class is not available in .NET Core 3.1 and later versions. Use the when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. ## Examples - The following code example uses the method to free resources. + The following code example uses the method to free resources. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGrid/Dispose/source.vb" id="Snippet1"::: @@ -2009,12 +2009,12 @@ This class is not available in .NET Core 3.1 and later versions. Use the method returns `false` if the user is not editing (typing into) a cell. + The method returns `false` if the user is not editing (typing into) a cell. ## Examples - The following code example uses the and methods to edit a value in a grid displayed by the control. + The following code example uses the and methods to edit a value in a grid displayed by the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.EndEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/EndEdit/source.cs" id="Snippet1"::: @@ -2054,7 +2054,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. + The Visual Studio design environment uses this method to end the initialization of a component that is used on a form or used by another component. The method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. ]]> @@ -2309,7 +2309,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method to return a of a specified cell. + The following code example uses the method to return a of a specified cell. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.GetCellBounds1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/GetCellBounds/source1.cs" id="Snippet1"::: @@ -2352,12 +2352,12 @@ This class is not available in .NET Core 3.1 and later versions. Use the . + To retrieve the cell bounds for the currently selected cell, use . ## Examples - The following code example uses the method to return a of a specified cell. + The following code example uses the method to return a of a specified cell. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.GetCellBounds Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/GetCellBounds/source.cs" id="Snippet1"::: @@ -2396,7 +2396,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the . + To retrieve the cell bounds for a cell other than the current cell, use . @@ -2730,14 +2730,14 @@ This class is not available in .NET Core 3.1 and later versions. Use the , in conjunction with the method of the control, is used to determine which part of a control the user has clicked. The contains the row, column, and part of the grid that was clicked. Additionally, the property returns a enumeration. + The , in conjunction with the method of the control, is used to determine which part of a control the user has clicked. The contains the row, column, and part of the grid that was clicked. Additionally, the property returns a enumeration. - The method takes an x and y argument supplied by the control's , , , , , and events. + The method takes an x and y argument supplied by the control's , , , , , and events. ## Examples - The following code example uses the method in occurs when a user clicks on a grid. + The following code example uses the method in occurs when a user clicks on a grid. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGrid/HitTest/source1.vb" id="Snippet1"::: @@ -2778,14 +2778,14 @@ This class is not available in .NET Core 3.1 and later versions. Use the , in conjunction with the method of the control, is used to determine which part of a control the user has clicked. The contains the row, column, and part of the grid that was clicked. Additionally, the property returns a enumeration. + The , in conjunction with the method of the control, is used to determine which part of a control the user has clicked. The contains the row, column, and part of the grid that was clicked. Additionally, the property returns a enumeration. - The method takes an x and y argument supplied by the control's , , , , , and events. + The method takes an x and y argument supplied by the control's , , , , , and events. ## Examples - The following code example uses the method in an event that occurs when the user clicks in the grid. + The following code example uses the method in an event that occurs when the user clicks in the grid. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGrid/HitTest/source.vb" id="Snippet1"::: @@ -2899,7 +2899,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the , , and methods to manipulate the selection state of a particular row. + Use this method with the , , and methods to manipulate the selection state of a particular row. @@ -2958,7 +2958,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the variable, setting its and values, then first changing, then returning, the value of the given cell. + The following code example sets and gets the value of a cell by declaring a variable, setting its and values, then first changing, then returning, the value of the given cell. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.this1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/Item/source1.cs" id="Snippet1"::: @@ -3338,7 +3338,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3404,7 +3404,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3528,7 +3528,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3620,7 +3620,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3658,7 +3658,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3696,7 +3696,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3734,7 +3734,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3772,7 +3772,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3810,7 +3810,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3848,7 +3848,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3886,7 +3886,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4212,7 +4212,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4280,7 +4280,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4683,7 +4683,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the and properties (either separately, or through the method), or the property will have no effect. + Set this property before resetting the and properties (either separately, or through the method), or the property will have no effect. The property cannot be set to a value less than 0. @@ -4733,12 +4733,12 @@ This class is not available in .NET Core 3.1 and later versions. Use the and properties (either separately, or through the method), or the property will have no effect. + Set this property before resetting the and properties (either separately, or through the method), or the property will have no effect. ## Examples - The following code example first sets a new font, and sets the to the same height as the new font. + The following code example first sets a new font, and sets the to the same height as the new font. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.PreferredRowHeight Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/PreferredRowHeight/source.cs" id="Snippet1"::: @@ -4779,7 +4779,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the method to implement keyboard navigation of the grid. + The method overrides the method to implement keyboard navigation of the grid. ]]> @@ -4917,7 +4917,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the also has a property that can be set to true to prevent data from being edited, on a column-by-column basis. - The can be set to true if you want to prohibit the user from editing the data directly in the . For example, you might want to let users to see all columns in a table, but allow them to edit specific fields only through controls on a different form. + The can be set to true if you want to prohibit the user from editing the data directly in the . For example, you might want to let users to see all columns in a table, but allow them to edit specific fields only through controls on a different form. @@ -4993,7 +4993,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -5119,7 +5119,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -5160,7 +5160,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -5201,7 +5201,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -5242,7 +5242,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -5324,7 +5324,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. ]]> @@ -5356,7 +5356,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the , , and methods to manipulate the selection state of a particular row. + Use this method with the , , and methods to manipulate the selection state of a particular row. ]]> @@ -5388,7 +5388,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -5429,7 +5429,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -5614,7 +5614,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the , , and methods to manipulate the selection state of a particular row. + Use this method with the , , and methods to manipulate the selection state of a particular row. @@ -5737,16 +5737,16 @@ This class is not available in .NET Core 3.1 and later versions. Use the method at run time to reset the property. + You must use the method at run time to reset the property. See the property for more details about setting a valid data source. - You can create a grid that enables users to edit data but prevents them from adding new rows by using a as the data source and setting the property to `false`. When the is a or , set the to an empty string (""). + You can create a grid that enables users to edit data but prevents them from adding new rows by using a as the data source and setting the property to `false`. When the is a or , set the to an empty string (""). ## Examples - The following code example sets the and to a , and a in the , respectively. + The following code example sets the and to a , and a in the , respectively. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.SetDataBinding Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/SetDataBinding/source.cs" id="Snippet1"::: @@ -6373,21 +6373,21 @@ This class is not available in .NET Core 3.1 and later versions. Use the . -2. Set the of the grid table object to the of the . +2. Set the of the grid table object to the of the . 3. Add objects, one for each grid column you want to show, to the returned by the property. -4. Set the of each to the of a . +4. Set the of each to the of a . 5. Add the object to the collection returned by property. > [!CAUTION] -> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . +> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . ## Examples - The following code example creates one for each found in a , and sets the of the to the of the . The is then added to the returned by the property. The example also prints the of each in the returned by the property of each in the . + The following code example creates one for each found in a , and sets the of the to the of the . The is then added to the returned by the property. The example also prints the of each in the returned by the property of each in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.TableStyles Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGrid/TableStyles/source.cs" id="Snippet1"::: @@ -6514,7 +6514,7 @@ This class is not available in .NET Core 3.1 and later versions. Use the , , and methods to manipulate the selection state of a particular row. + Use this method with the , , and methods to manipulate the selection state of a particular row. diff --git a/xml/System.Windows.Forms/DataGridBoolColumn.xml b/xml/System.Windows.Forms/DataGridBoolColumn.xml index 133cc5bea41..3c3c1b57e0f 100644 --- a/xml/System.Windows.Forms/DataGridBoolColumn.xml +++ b/xml/System.Windows.Forms/DataGridBoolColumn.xml @@ -39,7 +39,7 @@ ## Remarks The derives from the `abstract` class . At run time, the contains check boxes in each cell that have three states by default: checked (`true`), unchecked (`false`), and . To use two-state check boxes, set the property to `false`. - Properties added to the class include , , and . These properties specify the value underlying each of the column's states. + Properties added to the class include , , and . These properties specify the value underlying each of the column's states. @@ -91,7 +91,7 @@ , be sure to set the value to the of a . + When using this overload to create a , be sure to set the value to the of a . @@ -138,12 +138,12 @@ ## Remarks The must be associated with a data source that contains values. - To get a , first use the to return the appropriate . Then use the method of the to return a . Finally, use the property of the to return the specific for the column. + To get a , first use the to return the appropriate . Then use the method of the to return a . Finally, use the property of the to return the specific for the column. ## Examples - The following code example uses the method to return a for a . The for a is then used to create the . + The following code example uses the method to return a for a . The for a is then used to create the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridBoolColumn.DataGridBoolColumn1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridBoolColumn/.ctor/source1.cs" id="Snippet1"::: @@ -186,7 +186,7 @@ , first use the to return the appropriate . Then use the method of the to return a . Finally, use the property of the to return the specific for the column. + To get a , first use the to return the appropriate . Then use the method of the to return a . Finally, use the property of the to return the specific for the column. ]]> @@ -414,7 +414,7 @@ class), the method does not site a control for editing the cell value. Instead, a check box is drawn when the method is called. + Unlike the typical implementation of this method (as described in the class), the method does not site a control for editing the cell value. Instead, a check box is drawn when the method is called. ]]> @@ -449,7 +449,7 @@ ## Examples - The following code example uses the to enter a null value into the column. + The following code example uses the to enter a null value into the column. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridBoolColumn.EnterNullValue Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridBoolColumn/EnterNullValue/source.cs" id="Snippet1"::: @@ -502,12 +502,12 @@ , , and properties determine the actual values pushed into the data source. + The , , and properties determine the actual values pushed into the data source. ## Examples - The following code example sets the , , and properties of a . + The following code example sets the , , and properties of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridBoolColumn.TrueValue Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridBoolColumn/FalseValue/source.cs" id="Snippet1"::: @@ -674,7 +674,7 @@ method allows you to resize the column based on the value displayed. For example, if a cell contains an especially large value, you can use the method to return the optimum size of the cell based on the value. The optimum size takes into account not only the size of the string, but also the font used to display it. + The method allows you to resize the column based on the value displayed. For example, if a cell contains an especially large value, you can use the method to return the optimum size of the cell based on the value. The optimum size takes into account not only the size of the string, but also the font used to display it. ]]> @@ -724,12 +724,12 @@ The property must be set to true to enter null values. - The , , and properties determine the actual values pushed into the data source. + The , , and properties determine the actual values pushed into the data source. ## Examples - The following code example sets the , , and properties of a . + The following code example sets the , , and properties of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridBoolColumn.TrueValue Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridBoolColumn/FalseValue/source.cs" id="Snippet1"::: @@ -942,12 +942,12 @@ , , and properties determine the actual values pushed into the data source. + The , , and properties determine the actual values pushed into the data source. ## Examples - The following code example sets the , , and properties of a . + The following code example sets the , , and properties of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridBoolColumn.TrueValue Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridBoolColumn/FalseValue/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DataGridCell.xml b/xml/System.Windows.Forms/DataGridCell.xml index 308a3895754..26c159c92a6 100644 --- a/xml/System.Windows.Forms/DataGridCell.xml +++ b/xml/System.Windows.Forms/DataGridCell.xml @@ -42,7 +42,7 @@ ## Examples - The following example assigns the to the of a and returns the column and row number of the selected cell. The value stored in the is also printed using the object's and . + The following example assigns the to the of a and returns the column and row number of the selected cell. The value stored in the is also printed using the object's and . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridCell Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridCell/Overview/source.cs" id="Snippet1"::: @@ -92,7 +92,7 @@ and sets the new instance to the of a control. + The following example creates a and sets the new instance to the of a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridCell.DataGridCell Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridCell/.ctor/source.cs" id="Snippet1"::: @@ -148,12 +148,12 @@ value to specify a in the associated with the control. + You can use the value to specify a in the associated with the control. ## Examples - The following example assigns the property of a to a . The value stored in the is returned by specifying and objects through the and properties. + The following example assigns the property of a to a . The value stored in the is returned by specifying and objects through the and properties. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridCell.ColumnNumber Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridCell/ColumnNumber/source.cs" id="Snippet1"::: @@ -281,12 +281,12 @@ value to specify a in the associated with the control. + You can use the value to specify a in the associated with the control. ## Examples - The following example assigns the property of a to a and returns the value stored in the object's and properties. + The following example assigns the property of a to a and returns the value stored in the object's and properties. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridCell.ColumnNumber Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridCell/ColumnNumber/source.cs" id="Snippet1"::: @@ -321,7 +321,7 @@ control's using the object's method. + The following example returns the row number of the control's using the object's method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridCell.ToString Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridCell/ToString/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DataGridColumnStyle.xml b/xml/System.Windows.Forms/DataGridColumnStyle.xml index 68cd06916ae..f65f48b67b0 100644 --- a/xml/System.Windows.Forms/DataGridColumnStyle.xml +++ b/xml/System.Windows.Forms/DataGridColumnStyle.xml @@ -63,12 +63,12 @@ To format the data display, set the property of the class to one of the formatting values. For more information about valid formatting values, see [Formatting Types](/dotnet/standard/base-types/formatting-types) and [Custom Date and Time Format Strings](/dotnet/standard/base-types/custom-date-and-time-format-strings). - You can also create your own set of objects and add them to the . When you do so, you must set the of each column style to the of a to synchronize the display of columns with the actual data. + You can also create your own set of objects and add them to the . When you do so, you must set the of each column style to the of a to synchronize the display of columns with the actual data. > [!CAUTION] -> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . +> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . - When one of the derived classes is instantiated by a control, the class created depends on the of the associated with the object. For example, a with its set to `System.Boolean` will be associated with a . To determine the type of any , use the method. + When one of the derived classes is instantiated by a control, the class created depends on the of the associated with the object. For example, a with its set to `System.Boolean` will be associated with a . To determine the type of any , use the method. To create your own column classes, you can inherit from . You might want to do this in order to create special columns that host controls, as exemplified by the class, which hosts the control. For example, you can host an control to show pictures in columns, or you can create your own user control to host in the column. @@ -76,11 +76,11 @@ If a row contains a , the text displayed in the column can be set with the property. - The class also allows you to specify the behavior of a column while its data is being changed. The and methods temporarily suspend the drawing of the column while large updates are being made to the column's data. Without this functionality, every change in every cell of the grid would be immediately drawn; this could be distracting to the user and a performance liability. + The class also allows you to specify the behavior of a column while its data is being changed. The and methods temporarily suspend the drawing of the column while large updates are being made to the column's data. Without this functionality, every change in every cell of the grid would be immediately drawn; this could be distracting to the user and a performance liability. - Several methods allow monitoring of the column as it is edited by the user, including the and events. + Several methods allow monitoring of the column as it is edited by the user, including the and events. - Most of the properties and methods of the class are tailored to controlling a column's appearance. But a few, such as the and allow you to examine and change the value in a specified cell. + Most of the properties and methods of the class are tailored to controlling a column's appearance. But a few, such as the and allow you to examine and change the value in a specified cell. @@ -140,12 +140,12 @@ |Property|Default value| |--------------|-------------------| -||`HorizontalAlignment.Left`| -||`null`| -||-1| -||`false`| -||The string "(null)"| -||`false`| +||`HorizontalAlignment.Left`| +||`null`| +||-1| +||`false`| +||The string "(null)"| +||`false`| ]]> @@ -187,12 +187,12 @@ |Property|Initial value| |--------------|-------------------| -||`HorizontalAlignment.Left`| -||`null`| -||-1| -||`false`| -||"(null)"| -||`false`| +||`HorizontalAlignment.Left`| +||`null`| +||-1| +||`false`| +||"(null)"| +||`false`| @@ -237,11 +237,11 @@ method is used by the when the method of the method returns `false`. In that case, the column value is rolled back to its previous value. + The method is used by the when the method of the method returns `false`. In that case, the column value is rolled back to its previous value. - The must end any editing operations before returning. Use the method to accomplish this. + The must end any editing operations before returning. Use the method to accomplish this. - The method of the control indirectly invokes if its `ShouldAbort` parameter is set to `true`. + The method of the control indirectly invokes if its `ShouldAbort` parameter is set to `true`. ]]> @@ -359,7 +359,7 @@ control (whether the changes are in the attributes of the column or the data displayed by the control), you should invoke the method to temporarily freeze the drawing of the control. This results in less distraction to the user, and a performance gain. After all updates have been made, invoke the method to resume drawing of the control. + When many changes are made to the appearance of a control (whether the changes are in the attributes of the column or the data displayed by the control), you should invoke the method to temporarily freeze the drawing of the control. This results in less distraction to the user, and a performance gain. After all updates have been made, invoke the method to resume drawing of the control. ]]> @@ -395,7 +395,7 @@ for a data source and uses the to determine if the is valid. + The following code example gets a for a data source and uses the to determine if the is valid. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridColumnStyle.CheckValidDataSource Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/CheckValidDataSource/source.cs" id="Snippet1"::: @@ -436,7 +436,7 @@ method allows the control to show a pencil in the row header indicating the row is being edited. + When called, the method allows the control to show a pencil in the row header indicating the row is being edited. ]]> @@ -475,7 +475,7 @@ method. The code invokes the method, and then sets a variable that allows other functions to determine whether the column is still in edit more. The code then calls the method to redraw the control. Finally, the function returns `true` to indicate the change has been committed. + The following code example shows a possible override of the method. The code invokes the method, and then sets a variable that allows other functions to determine whether the column is still in edit more. The code then calls the method to redraw the control. Finally, the function returns `true` to indicate the change has been committed. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridColumnStyle/Commit/source.vb" id="Snippet1"::: @@ -523,7 +523,7 @@ ## Examples - The following code example uses the method to hide a hosted by the . + The following code example uses the method to hide a hosted by the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridColumnStyle.ConcedeFocus Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/ConcedeFocus/source.cs" id="Snippet1"::: @@ -612,7 +612,7 @@ of a that contains a . + The following code example prints the of a that contains a . :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridColumnStyle/DataGridTableStyle/source.vb" id="Snippet1"::: @@ -671,7 +671,7 @@ method sites a control onto the grid at the location of the cell being edited. + Typically, the method sites a control onto the grid at the location of the cell being edited. ]]> @@ -727,12 +727,12 @@ method sites a control onto the grid at the location of the cell being edited. + Typically, the method sites a control onto the grid at the location of the cell being edited. ## Examples - The following code example uses the method to change the text of a clicked cell in the control. + The following code example uses the method to change the text of a clicked cell in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridColumnStyle.Edit1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/Edit/source.cs" id="Snippet1"::: @@ -788,7 +788,7 @@ method sites a control onto the grid at the location of the cell being edited. + Typically, the method sites a control onto the grid at the location of the cell being edited. ]]> @@ -820,7 +820,7 @@ control (whether the changes are in the attributes of the column or the data displayed by the control), you should invoke the method to temporarily freeze the drawing of the control. This results in less distraction to the user, and a performance gain. After all updates have been made, invoke the method to resume drawing of the control. + When many changes are made to the appearance of a control (whether the changes are in the attributes of the column or the data displayed by the control), you should invoke the method to temporarily freeze the drawing of the control. This results in less distraction to the user, and a performance gain. After all updates have been made, invoke the method to resume drawing of the control. ]]> @@ -853,14 +853,14 @@ , the appropriate value is inserted into the column. + This method is called when the user presses ALT+0 to allow a column to enter the appropriate null value. For example, when called on a , the appropriate value is inserted into the column. - The has no default behavior. When inheriting from , override the method to enter `null` in a column. + The has no default behavior. When inheriting from , override the method to enter `null` in a column. ## Examples - The following code example shows a possible override of the method. + The following code example shows a possible override of the method. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridColumnStyle/EnterNullValue/source.vb" id="Snippet1"::: @@ -1030,12 +1030,12 @@ will usually be invoked from a mouse down event to resize a column's height for a long string. + The will usually be invoked from a mouse down event to resize a column's height for a long string. ## Examples - The following code example uses the method to return the height of a cell. + The following code example uses the method to return the height of a cell. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridColumnStyle.GetPreferredHeight Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/GetPreferredHeight/source.cs" id="Snippet1"::: @@ -1079,12 +1079,12 @@ to determine the width a column should resize to, given a particular string or numeral. + Use to determine the width a column should resize to, given a particular string or numeral. ## Examples - The following code example uses the method to return the optimum size for a value. + The following code example uses the method to return the optimum size for a value. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridColumnStyle.GetPreferredSize Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/GetPreferredSize/source.cs" id="Snippet1"::: @@ -1163,7 +1163,7 @@ property is typically used to display a caption that is different from the value when the value isn't easily understandable. For example, you can change the to "First Name" when the value is "FName". + The property is typically used to display a caption that is different from the value when the value isn't easily understandable. For example, you can change the to "First Name" when the value is "FName". @@ -1241,7 +1241,7 @@ method is typically called after an editing operation is interrupted. For example, you can call the method when implementing the method. + The method is typically called after an editing operation is interrupted. For example, you can call the method when implementing the method. ]]> @@ -1300,16 +1300,16 @@ to the data member is case-insensitive. + The comparison used to match the to the data member is case-insensitive. This is used to render the data in the indicated data member whenever the data source matches the one indicated by the property of the that contains this column style. - The property is usually set to the of a . + The property is usually set to the of a . ## Examples - The following code example creates a , and adds two objects to the . The for each is set to the of a . + The following code example creates a , and adds two objects to the . The for each is set to the of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/GridTableStylesCollectionExamples/CPP/gridtablestylescollectionexamples.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/MappingName/gridtablestylescollectionexamples.cs" id="Snippet4"::: @@ -1611,7 +1611,7 @@ for a column is set using the method of the . See the constructor for an example of using the to create a new . + The for a column is set using the method of the . See the constructor for an example of using the to create a new . @@ -1792,7 +1792,7 @@ , you will often use the derived class to host a control that is used to edit data. You should override the method to release any references to the control in order to free system resources. For example, the derived class uses this method to release the reference to the hosted . + If you create a class that derives from , you will often use the derived class to host a control that is used to edit data. You should override the method to release any references to the control in order to free system resources. For example, the derived class uses this method to release the reference to the hosted . ]]> @@ -1914,7 +1914,7 @@ method. + Typically, you should use the method. ]]> @@ -1994,7 +1994,7 @@ method allows the control to show a pencil in the row header indicating the row is being edited. + When called, the method allows the control to show a pencil in the row header indicating the row is being edited. ]]> @@ -2040,7 +2040,7 @@ to set a new value. + The following code example uses the to set a new value. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridColumnStyle.UpdateUI Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/UpdateUI/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DataGridTableStyle.xml b/xml/System.Windows.Forms/DataGridTableStyle.xml index a85b457d303..d1ecccbbb77 100644 --- a/xml/System.Windows.Forms/DataGridTableStyle.xml +++ b/xml/System.Windows.Forms/DataGridTableStyle.xml @@ -49,20 +49,20 @@ control displays data in the form of a grid. The is a class that represents the drawn grid only. This grid should not be confused with the class, which is a possible source of data for the grid. Instead, the strictly represents the grid as it is painted in the control. Therefore, through the you can control the appearance of the grid for each . To specify which is used when displaying data from a particular , set the to the of a . + The control displays data in the form of a grid. The is a class that represents the drawn grid only. This grid should not be confused with the class, which is a possible source of data for the grid. Instead, the strictly represents the grid as it is painted in the control. Therefore, through the you can control the appearance of the grid for each . To specify which is used when displaying data from a particular , set the to the of a . - The retrieved through the property contains all the objects used by a control. The collection can contain as many objects as you need, however the of each must be unique. At run time, this allows you to substitute a different for the same data, depending on the user's preference. To do this: + The retrieved through the property contains all the objects used by a control. The collection can contain as many objects as you need, however the of each must be unique. At run time, this allows you to substitute a different for the same data, depending on the user's preference. To do this: -1. Populate the with objects. If a exists in the whose property value equals the object's property, the is displayed with this . If no exists with a matching , the is displayed with the default style for data grid tables. +1. Populate the with objects. If a exists in the whose property value equals the object's property, the is displayed with this . If no exists with a matching , the is displayed with the default style for data grid tables. -2. When a different grid style is needed, use the `Item` property to select the appropriate (pass the to the property) and set the of the returned object to a new value. +2. When a different grid style is needed, use the `Item` property to select the appropriate (pass the to the property) and set the of the returned object to a new value. -3. Use the property to select the desired , and set its to the of the . +3. Use the property to select the desired , and set its to the of the . > [!CAUTION] -> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . +> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . - To determine which is currently displayed, use the and properties of the to return a . If the data source implements the interface, you can use the method to return the of the current table. This is shown in the C# code below: + To determine which is currently displayed, use the and properties of the to return a . If the data source implements the interface, you can use the method to return the of the current table. This is shown in the C# code below: ``` private void PrintCurrentListName(DataGrid myDataGrid){ @@ -74,56 +74,56 @@ private void PrintCurrentListName(DataGrid myDataGrid){ } ``` - If the contains objects related through objects, and the currently displayed is a child table, the will return a string in the form of TableName.RelationName (in the simplest case). If the is further down in the hierarchy, the string will consist of the parent table's name followed by the necessary values required to reach the table's level. For example, imagine three objects in a hierarchical relationship named (top to bottom) `Regions`, `Customers`, and `Orders`, and two objects named `RegionsToCustomers` and `CustomersToOrders`, the property will return "Regions.RegionsToCustomers.CustomersToOrders". However, the will then be "Orders". + If the contains objects related through objects, and the currently displayed is a child table, the will return a string in the form of TableName.RelationName (in the simplest case). If the is further down in the hierarchy, the string will consist of the parent table's name followed by the necessary values required to reach the table's level. For example, imagine three objects in a hierarchical relationship named (top to bottom) `Regions`, `Customers`, and `Orders`, and two objects named `RegionsToCustomers` and `CustomersToOrders`, the property will return "Regions.RegionsToCustomers.CustomersToOrders". However, the will then be "Orders". The collection of objects is returned through the property of the . When a is displayed, the settings for the will override the settings for the control. If a value is not set for a particular property, the control's value will be used instead. The following list shows the properties that can be set to override control properties: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- To bind the to a strongly typed array of objects, the object type must contain public properties. To create a that displays the array, set the property to `typename` where `typename` is replaced by the name of the object type. Also note that the property is case-sensitive; the type name must be matched exactly. See the property for an example. - You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound and the objects in the must contain public properties. An empty will result in an empty grid. When binding to an , set the of the to "ArrayList" (the type name). + You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound and the objects in the must contain public properties. An empty will result in an empty grid. When binding to an , set the of the to "ArrayList" (the type name). ## Examples - The following code example creates two instances and sets the of each object to the of a in a . The example then adds objects to the of each . For an example that runs, see the example. + The following code example creates two instances and sets the of each object to the of a in a . The example then adds objects to the of each . For an example that runs, see the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTableStyle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTableStyle/Overview/source.cs" id="Snippet1"::: @@ -379,7 +379,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ and sets the and properties to new values. The example requires that you have a with a that contains some data, and a on a . + The following code example creates an instance of and sets the and properties to new values. The example requires that you have a with a that contains some data, and a on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DataGridTableStyle_sample5/CPP/datagridtablestyle_sample5.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTableStyle/AlternatingBackColor/datagridtablestyle_sample5.cs" id="Snippet1"::: @@ -419,7 +419,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridTableStyle1`. Then ensure that the event handler is associated with the event. @@ -461,7 +461,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Examples - The following code example creates an instance of and sets the and properties to new values. The example requires that you have a with a that contains some data, and a on a . + The following code example creates an instance of and sets the and properties to new values. The example requires that you have a with a that contains some data, and a on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DataGridTableStyle_sample5/CPP/datagridtablestyle_sample5.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTableStyle/AlternatingBackColor/datagridtablestyle_sample5.cs" id="Snippet1"::: @@ -501,7 +501,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridTableStyle1`. Then ensure that the event handler is associated with the event. @@ -548,14 +548,14 @@ private void PrintCurrentListName(DataGrid myDataGrid){ method is intended to notify the control when the user has begun an editing operation. When the control is in edit mode, multiple edits can be made and the constraints will be temporarily unenforced. + The method is intended to notify the control when the user has begun an editing operation. When the control is in edit mode, multiple edits can be made and the constraints will be temporarily unenforced. - Call the method to quit the edit mode. + Call the method to quit the edit mode. ## Examples - The following code example calls the method on the current in a control. + The following code example calls the method on the current in a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTableStyle.BeginEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTableStyle/BeginEdit/source.cs" id="Snippet1"::: @@ -793,7 +793,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Examples - The following code example prints the of the displaying a . + The following code example prints the of the displaying a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTableStyle.DataGrid Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTableStyle/DataGrid/source.cs" id="Snippet1"::: @@ -859,7 +859,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ method on each contained by the collection before calling on the grid itself. + The method calls the method on each contained by the collection before calling on the grid itself. ]]> @@ -903,12 +903,12 @@ private void PrintCurrentListName(DataGrid myDataGrid){ method, the method is intended to notify the when an edit operation is ending. + Similar to the method, the method is intended to notify the when an edit operation is ending. ## Examples - The following code example calls the method on the current in a control. + The following code example calls the method on the current in a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTableStyle.EndEdit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTableStyle/EndEdit/source.cs" id="Snippet1"::: @@ -986,7 +986,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridTableStyle1`. Then ensure that the event handler is associated with the event. @@ -1037,9 +1037,9 @@ private void PrintCurrentListName(DataGrid myDataGrid){ returned by the property allows you to create a customized set of column styles. For each in a , set the of a to the . That column style will automatically be used when this is displayed. + The returned by the property allows you to create a customized set of column styles. For each in a , set the of a to the . That column style will automatically be used when this is displayed. - If you create a without adding any objects to the , a collection of objects will be created automatically when a with a valid is added to the . An exception will be thrown if you attempt to add objects with duplicate values to the collection. + If you create a without adding any objects to the , a collection of objects will be created automatically when a with a valid is added to the . An exception will be thrown if you attempt to add objects with duplicate values to the collection. @@ -1685,16 +1685,16 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks To bind the to a strongly typed array of objects, the object type must contain public properties. To create a that displays the array, set the property to `typename` where `typename` is replaced by the name of the object type. Also note that the property is case-sensitive; the type name must be matched exactly. See the property for an example. - You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound. An empty will result in an empty grid. When binding to an , set the of the to "ArrayList" (the type name). + You can also bind the to an . A feature of the is that it can contain objects of multiple types, but the can only bind to such a list when all items in the list are of the same type as the first item. This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. For example, if the first item in a list is a , the second item could be a (which inherits from ). If, on the other hand, the first item is a , the second object cannot be a . Further, the must have items in it when it is bound. An empty will result in an empty grid. When binding to an , set the of the to "ArrayList" (the type name). - The default is the name of the list managed by the for this grid. The for the is set using the constructor. + The default is the name of the list managed by the for this grid. The for the is set using the constructor. - The event occurs when the value changes. + The event occurs when the value changes. ## Examples - The following code example creates an array of `Widget` objects and binds a control to the array. The code then creates a and sets the to the name of the class plus brackets. + The following code example creates an array of `Widget` objects and binds a control to the array. The code then creates a and sets the to the name of the class plus brackets. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DataGridTable.MappingName Example/CPP/bindarray.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTableStyle/MappingName/bindarray.cs" id="Snippet1"::: @@ -1780,7 +1780,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1820,7 +1820,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1860,7 +1860,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1900,7 +1900,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1940,7 +1940,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1980,7 +1980,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2020,7 +2020,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2060,7 +2060,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2100,7 +2100,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2140,7 +2140,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2180,7 +2180,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2220,7 +2220,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2260,7 +2260,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2300,7 +2300,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2340,7 +2340,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2380,7 +2380,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2420,7 +2420,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2460,7 +2460,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2500,7 +2500,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2540,7 +2540,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2632,7 +2632,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridTableStyle1`. Then ensure that the event handler is associated with the event. @@ -2679,7 +2679,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ . A row will not be created with a height less than the specified value. If the font size requires it, however, the row height may be greater than the specified value. + The preferred height is the minimum height needed to accommodate the displayed text with the assigned . A row will not be created with a height less than the specified value. If the font size requires it, however, the row height may be greater than the specified value. @@ -2858,7 +2858,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -2940,7 +2940,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -2981,7 +2981,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -3022,7 +3022,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -3114,7 +3114,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -3161,7 +3161,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -3205,7 +3205,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. ]]> @@ -3241,7 +3241,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. ]]> @@ -3273,7 +3273,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. + You typically use this method if you are either creating a designer for the or creating your own control incorporating the . You can use the method to determine whether the property value has changed from its default. @@ -3648,7 +3648,7 @@ private void PrintCurrentListName(DataGrid myDataGrid){ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridTableStyle1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridTextBox.xml b/xml/System.Windows.Forms/DataGridTextBox.xml index 16bcdbfa3ea..19ad0769b36 100644 --- a/xml/System.Windows.Forms/DataGridTextBox.xml +++ b/xml/System.Windows.Forms/DataGridTextBox.xml @@ -59,7 +59,7 @@ ## Remarks The and the work together so that users can directly edit values in a control column. The derives from , and is designed to host the , which derives from the control. - In addition to the properties, events, and methods of the base control, you can call the and events with the and methods. + In addition to the properties, events, and methods of the base control, you can call the and events with the and methods. @@ -128,7 +128,7 @@ property is used within the to determine how to process key press events, to check the state of the . For example, if one of the navigation (arrow) keys is pressed, the appropriate action for the state of the control must occur. + The property is used within the to determine how to process key press events, to check the state of the . For example, if one of the navigation (arrow) keys is pressed, the appropriate action for the state of the control must occur. diff --git a/xml/System.Windows.Forms/DataGridTextBoxColumn.xml b/xml/System.Windows.Forms/DataGridTextBoxColumn.xml index 6b2a445dae5..53b8a167c26 100644 --- a/xml/System.Windows.Forms/DataGridTextBoxColumn.xml +++ b/xml/System.Windows.Forms/DataGridTextBoxColumn.xml @@ -39,7 +39,7 @@ ## Remarks The class derives from the `abstract` class . At run time, the hosts a control that allows users to edit text. - Special properties added to the class include , and . These properties allow you to access the hosted control and its attributes, and set the format for displaying values. + Special properties added to the class include , and . These properties allow you to access the hosted control and its attributes, and set the format for displaying values. If the data source is a containing objects, the property of the should be set to a data type that can logically be edited in a text box control. The following data types are automatically associated with a : , , , , , , , , , , , and . @@ -148,7 +148,7 @@ uses a to determine the type of data displayed in the column. To return a , use the method of the class. + The uses a to determine the type of data displayed in the column. To return a , use the method of the class. @@ -200,7 +200,7 @@ uses a to determine the type of data displayed in the column. To return a , use the method of the class. + The uses a to determine the type of data displayed in the column. To return a , use the method of the class. ]]> @@ -242,7 +242,7 @@ ## Remarks Use this constructor to create a custom format for the displayed data. - The uses a to determine the type of data displayed in the column. To return a , use the method of the class. + The uses a to determine the type of data displayed in the column. To return a , use the method of the class. For more information about formatting characters, see [Formatting Types](/dotnet/standard/base-types/formatting-types) and [Custom Date and Time Format Strings](/dotnet/standard/base-types/custom-date-and-time-format-strings). @@ -292,7 +292,7 @@ uses a to determine the type of data displayed in the column. To return a , use the method of the class. + The uses a to determine the type of data displayed in the column. To return a , use the method of the class. ]]> @@ -327,7 +327,7 @@ and methods. + This method rolls back any change made to the column and invokes the and methods. ]]> @@ -367,7 +367,7 @@ into the column; otherwise, it uses the method to commit the value. + The method checks to ensure that an edit is indeed occurring. If so, it formats the value appropriately. If the value is `null`, the method enters into the column; otherwise, it uses the method to commit the value. The method is called by the when an editing operation is committed. @@ -455,12 +455,12 @@ sites a control on the grid at the location of the cell being edited. The method is called by the class's method when an editing operation is about to begin. + The sites a control on the grid at the location of the cell being edited. The method is called by the class's method when an editing operation is about to begin. ## Examples - The following example uses the method to change the text of a clicked cell in the control. + The following example uses the method to change the text of a clicked cell in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTextBoxColumn.Edit Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTextBoxColumn/Edit/source.cs" id="Snippet1"::: @@ -499,12 +499,12 @@ object's before changing the value. You must invoke the method on both the and objects before the change is committed. + To edit the value of a cell, call the object's before changing the value. You must invoke the method on both the and objects before the change is committed. ## Examples - The following example invokes the method before editing a column's value. + The following example invokes the method before editing a column's value. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridTextBoxColumn/EndEdit/source.vb" id="Snippet1"::: @@ -536,12 +536,12 @@ value into the cell. + Enters the value into the cell. ## Examples - The following example tests a to determine its column type. If the column is a , and the allows `null` values, then the property is set and the method invoked. + The following example tests a to determine its column type. If the column is a , and the allows `null` values, then the property is set and the method invoked. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridTextBoxColumn/EnterNullValue/source.vb" id="Snippet1"::: @@ -712,7 +712,7 @@ is calculated by adding the size of the column's font plus a margin value. + The value returned by is calculated by adding the size of the column's font plus a margin value. ]]> @@ -752,7 +752,7 @@ to return the height a column is automatically resized to. + The following example uses the to return the height a column is automatically resized to. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTextBoxColumn.GetPreferredHeight Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTextBoxColumn/GetPreferredHeight/source.cs" id="Snippet1"::: @@ -801,7 +801,7 @@ ## Examples - The following example uses to return a . + The following example uses to return a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTextBoxColumn.GetPreferredSize Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTextBoxColumn/GetPreferredSize/source.cs" id="Snippet1"::: @@ -924,7 +924,7 @@ method uses the to determine the value to draw in the cell. The method is called to draw the cell and its contents. + The method uses the to determine the value to draw in the cell. The method is called to draw the cell and its contents. ]]> @@ -971,12 +971,12 @@ method uses the to determine the value to draw in the cell. The method is called to draw the cell and its contents. + The method uses the to determine the value to draw in the cell. The method is called to draw the cell and its contents. ## Examples - The following example uses the method to paint a clicked cell with new foreground and background color. + The following example uses the method to paint a clicked cell with new foreground and background color. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DataGridTextBoxColumn.Paint2 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridTextBoxColumn/Paint/source.cs" id="Snippet1"::: @@ -1032,9 +1032,9 @@ method uses the object set with the property to format the value before drawing it to the screen. + The method uses the object set with the property to format the value before drawing it to the screen. - The method calls the method. + The method calls the method. ]]> @@ -1081,9 +1081,9 @@ method uses the property to format the value before drawing it to the screen. + The method uses the property to format the value before drawing it to the screen. - The method calls the method. + The method calls the method. ]]> diff --git a/xml/System.Windows.Forms/DataGridView+DataGridViewAccessibleObject.xml b/xml/System.Windows.Forms/DataGridView+DataGridViewAccessibleObject.xml index 319db561ffe..20ed85becb0 100644 --- a/xml/System.Windows.Forms/DataGridView+DataGridViewAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridView+DataGridViewAccessibleObject.xml @@ -40,12 +40,12 @@ The class inherits from the class to provide information about the control to accessibility client applications. Each class that represents a visual part of the - , , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -133,7 +133,7 @@ method returns an accessible object for the row of objects when is `true` and `index` is 0. If is `false` and `index` is 0, returns an accessible object for the first . + The method returns an accessible object for the row of objects when is `true` and `index` is 0. If is `false` and `index` is 0, returns an accessible object for the first . ]]> @@ -175,7 +175,7 @@ method returns the number of visible rows in the , plus 1 for the column header row if it is visible and 1 for each visible scroll bar. If there are no columns in the control, this method always returns 0. + The method returns the number of visible rows in the , plus 1 for the column header row if it is visible and 1 for each visible scroll bar. If there are no columns in the control, this method always returns 0. ]]> @@ -291,7 +291,7 @@ method returns an that represents part of the . If the object itself is at the specified location, this method returns the calling object. The following table describes what the represents. + The method returns an that represents part of the . If the object itself is at the specified location, this method returns the calling object. The following table describes what the represents. |Area clicked|Object represented by accessible object| |------------------|---------------------------------------------| @@ -367,7 +367,7 @@ value to get the first child accessible object of the , and use to get the last child. The method will return `null` for all other values of the enumeration. + Use the value to get the first child accessible object of the , and use to get the last child. The method will return `null` for all other values of the enumeration. ]]> diff --git a/xml/System.Windows.Forms/DataGridView+DataGridViewControlCollection.xml b/xml/System.Windows.Forms/DataGridView+DataGridViewControlCollection.xml index e735454bc06..65df7cb1c48 100644 --- a/xml/System.Windows.Forms/DataGridView+DataGridViewControlCollection.xml +++ b/xml/System.Windows.Forms/DataGridView+DataGridViewControlCollection.xml @@ -115,7 +115,7 @@ method removes all controls from the , except the scroll bars and the editing control. + The method removes all controls from the , except the scroll bars and the editing control. ]]> diff --git a/xml/System.Windows.Forms/DataGridView+DataGridViewTopRowAccessibleObject.xml b/xml/System.Windows.Forms/DataGridView+DataGridViewTopRowAccessibleObject.xml index fe33d37e492..57c96ed4a25 100644 --- a/xml/System.Windows.Forms/DataGridView+DataGridViewTopRowAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridView+DataGridViewTopRowAccessibleObject.xml @@ -40,12 +40,12 @@ The class inherits from the class to provide information about a row of objects to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -221,7 +221,7 @@ properties of the columns. + The order of the child accessible objects that represent a column header corresponds to the properties of the columns. ]]> @@ -265,7 +265,7 @@ corresponds to the number of visible columns in the . If the property is `true`, the method includes the in the count of child accessible objects. + The number of child accessible objects that belong to the corresponds to the number of visible columns in the . If the property is `true`, the method includes the in the count of child accessible objects. ]]> @@ -342,7 +342,7 @@ that the method will return for each parameter value. + The following table describes the that the method will return for each parameter value. |Parameter value|Return value| |---------------------|------------------| diff --git a/xml/System.Windows.Forms/DataGridView+HitTestInfo.xml b/xml/System.Windows.Forms/DataGridView+HitTestInfo.xml index 75bbbaf8628..1d3be1bb0f9 100644 --- a/xml/System.Windows.Forms/DataGridView+HitTestInfo.xml +++ b/xml/System.Windows.Forms/DataGridView+HitTestInfo.xml @@ -33,7 +33,7 @@ method of the class returns a . You can use this method to determine which part of the control is located at the specified coordinates. For example, you can call this method specifying the coordinates of a mouse click to determine the row and column indexes of the clicked cell or whether a header cell or scroll bar was clicked. + The method of the class returns a . You can use this method to determine which part of the control is located at the specified coordinates. For example, you can call this method specifying the coordinates of a mouse click to determine the row and column indexes of the clicked cell or whether a header cell or scroll bar was clicked. @@ -231,7 +231,7 @@ method returns when the specified point is at an empty area of the . + The method returns when the specified point is at an empty area of the . ]]> @@ -354,7 +354,7 @@ method returns a string that includes the value of the , , and properties. + The method returns a string that includes the value of the , , and properties. ]]> diff --git a/xml/System.Windows.Forms/DataGridView.xml b/xml/System.Windows.Forms/DataGridView.xml index b5dfe7c45d6..15474e5cbd4 100644 --- a/xml/System.Windows.Forms/DataGridView.xml +++ b/xml/System.Windows.Forms/DataGridView.xml @@ -73,11 +73,11 @@ control provides a customizable table for displaying data. The class allows customization of cells, rows, columns, and borders through the use of properties such as , , , and . For more information, see [Basic Formatting and Styling in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/basic-formatting-and-styling-in-the-windows-forms-datagridview-control). + The control provides a customizable table for displaying data. The class allows customization of cells, rows, columns, and borders through the use of properties such as , , , and . For more information, see [Basic Formatting and Styling in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/basic-formatting-and-styling-in-the-windows-forms-datagridview-control). - You can use a control to display data with or without an underlying data source. Without specifying a data source, you can create columns and rows that contain data and add them directly to the using the and properties. You can also use the collection to access objects and the property to read or write cell values directly. The indexer also provides direct access to cells. + You can use a control to display data with or without an underlying data source. Without specifying a data source, you can create columns and rows that contain data and add them directly to the using the and properties. You can also use the collection to access objects and the property to read or write cell values directly. The indexer also provides direct access to cells. - As an alternative to populating the control manually, you can set the and properties to bind the to a data source and automatically populate it with data. For more information, see [Displaying Data in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/displaying-data-in-the-windows-forms-datagridview-control). + As an alternative to populating the control manually, you can set the and properties to bind the to a data source and automatically populate it with data. For more information, see [Displaying Data in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/displaying-data-in-the-windows-forms-datagridview-control). When working with very large amounts of data, you can set the property to `true` to display a subset of the available data. Virtual mode requires the implementation of a data cache from which the control is populated. For more information, see [Data Display Modes in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/data-display-modes-in-the-windows-forms-datagridview-control). @@ -106,7 +106,7 @@ The control replaces and extends the control. For more information, see [Differences Between the Windows Forms DataGridView and DataGrid controls](/dotnet/desktop/winforms/controls/differences-between-the-windows-forms-datagridview-and-datagrid-controls). > [!NOTE] -> The control inherits both the and properties from , but supports only the property. Using the property with the control has no effect. +> The control inherits both the and properties from , but supports only the property. Using the property with the control has no effect. ## Examples The following code example demonstrates how to initialize an unbound control. @@ -154,23 +154,23 @@ The control replaces and extends the |`true`| -||`true`| -||`false`| -||`true`| -||`true`| -||`true`| -||| -||| -||| -||| -||`true`| -||| -||`true`| -||`false`| -||`true`| -||| -||| +||`true`| +||`true`| +||`false`| +||`true`| +||`true`| +||`true`| +||| +||| +||| +||| +||`true`| +||| +||`true`| +||`false`| +||`true`| +||| +||| ]]> @@ -210,7 +210,7 @@ The control replaces and extends the method overload twice using the and values of the enumeration. The `objectID` and `childID` are determined by numbering only the visible rows and columns in their display order, counting the row or column headers if they are visible, and starting with 1. For example, if column headers are visible, the `objectID` for the first visible nonheader row is 2. + This method converts the specified row and column indexes into `objectID` and `childID` parameters and calls the method overload twice using the and values of the enumeration. The `objectID` and `childID` are determined by numbering only the visible rows and columns in their display order, counting the row or column headers if they are visible, and starting with 1. For example, if column headers are visible, the `objectID` for the first visible nonheader row is 2. ]]> @@ -274,10 +274,10 @@ The control replaces and extends the control internally calls the method to determine the appearance of the borders for the column header cells. The control typically uses the value of the property for the `dataGridViewAdvancedBorderStyleInput` parameter. + The control internally calls the method to determine the appearance of the borders for the column header cells. The control typically uses the value of the property for the `dataGridViewAdvancedBorderStyleInput` parameter. ## Examples - The following code example demonstrates how to override the method to customize the borders of the column header cells. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to customize the borders of the column header cells. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.vb" id="Snippet15"::: @@ -592,7 +592,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -693,7 +693,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -745,7 +745,7 @@ The control replaces and extends the [!NOTE] -> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. +> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. ## Examples The following code example illustrates the use of this property in a control intended primarily for display. In this example, the visual appearance of the control is customized in several ways and the control is configured for limited interactivity. This example is part of a larger example available in the class overview. @@ -797,7 +797,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -851,7 +851,7 @@ The control replaces and extends the [!NOTE] -> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. +> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. ## Examples The following code example illustrates how to use this property in a control intended primarily for display. In this example, the visual appearance of the control is customized in several ways and the control is configured for limited interactivity. This example is part of a larger example available in the class overview. @@ -903,7 +903,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -959,7 +959,7 @@ The control replaces and extends the [!NOTE] -> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. +> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. ## Examples The following code example illustrates how to use this property in a control intended primarily for display. In this example, the visual appearance of the control is customized in several ways and the control is configured for limited interactivity. This example is part of a larger example available in the class overview. @@ -1011,7 +1011,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -1053,7 +1053,7 @@ The control replaces and extends the control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in rows with odd index numbers, the styles specified through the property override the styles specified through the , , and , and are overridden by the styles specified through the and properties. + The control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in rows with odd index numbers, the styles specified through the property override the styles specified through the , , and , and are overridden by the styles specified through the and properties. For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -1113,7 +1113,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -1163,10 +1163,10 @@ The control replaces and extends the collection does not perform efficiently with large selections. To determine whether all the cells in the have been selected before you access the contents of the collection, check the return value of the method. However, this method can cause rows to become unshared. For more information about performance, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). + The collection does not perform efficiently with large selections. To determine whether all the cells in the have been selected before you access the contents of the collection, check the return value of the method. However, this method can cause rows to become unshared. For more information about performance, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). ## Examples - The following code example illustrates how to use this method to avoid calculations involving the collection. + The following code example illustrates how to use this method to avoid calculations involving the collection. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AreAllCellsSelected/DataGridViewSelectedCollections.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AreAllCellsSelected/DataGridViewSelectedCollections.vb" id="Snippet10"::: @@ -1224,17 +1224,17 @@ The control replaces and extends the or properties are set or changed. Columns can also be automatically generated when the property is changed from `false` to `true`. If this property is `true` and the changes so there are columns that do not match the columns of the previous value, data in the unmatched columns is discarded. This property is ignored if the or properties are not set. + Columns are automatically generated when this property is set to `true` and the or properties are set or changed. Columns can also be automatically generated when the property is changed from `false` to `true`. If this property is `true` and the changes so there are columns that do not match the columns of the previous value, data in the unmatched columns is discarded. This property is ignored if the or properties are not set. - When is set to `true`, the control generates one column for each public property of the objects in the data source. If the bound objects implement the interface, the control generates one column for each property returned by the method. Each column header will contain the value of the property name the column represents. + When is set to `true`, the control generates one column for each public property of the objects in the data source. If the bound objects implement the interface, the control generates one column for each property returned by the method. Each column header will contain the value of the property name the column represents. - If you set the property but set to `false`, you must add columns manually. You can bind each added column to the data source by setting the property to the name of a property exposed by the bound objects. + If you set the property but set to `false`, you must add columns manually. You can bind each added column to the data source by setting the property to the name of a property exposed by the bound objects. > [!NOTE] -> Setting the in the Windows Forms Designer automatically sets the property to `false` and generates code to add and bind a column for each property in the data source. The code that is generated at design-time is equivalent to the manually added code shown in the following example. It is not the same as the auto-generation of columns at run-time that occurs when the property is set to `true`. +> Setting the in the Windows Forms Designer automatically sets the property to `false` and generates code to add and bind a column for each property in the data source. The code that is generated at design-time is equivalent to the manually added code shown in the following example. It is not the same as the auto-generation of columns at run-time that occurs when the property is set to `true`. ## Examples - The following code example demonstrates how to add columns manually and bind them to a data source when you set to `false`. In this example, a control is bound to a list of `Task` business objects. Then, columns are added and are bound to `Task` properties through the property. This example is part of a larger example available in [How to: Access Objects in a Windows Forms DataGridViewComboBoxCell Drop-Down List](/dotnet/desktop/winforms/controls/access-objects-in-a-wf-datagridviewcomboboxcell-drop-down-list). + The following code example demonstrates how to add columns manually and bind them to a data source when you set to `false`. In this example, a control is bound to a list of `Task` business objects. Then, columns are added and are bound to `Task` properties through the property. This example is part of a larger example available in [How to: Access Objects in a Windows Forms DataGridViewComboBoxCell Drop-Down List](/dotnet/desktop/winforms/controls/access-objects-in-a-wf-datagridviewcomboboxcell-drop-down-list). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoGenerateColumns/form1.cs" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AutoGenerateColumns/form1.vb" id="Snippet100"::: @@ -1295,7 +1295,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -1355,7 +1355,7 @@ The control replaces and extends the method. To set the column to automatically resize whenever its contents change, use the property or the column property. + This method is useful if you want to control when a column resizes. The column width is adjusted only once per method call; if the contents of the column later change, the column will not automatically adjust. To resize all columns, use the method. To set the column to automatically resize whenever its contents change, use the property or the column property. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -1414,7 +1414,7 @@ The control replaces and extends the method. To set the column to automatically resize whenever its contents change, use the property or the column property. + This method is useful if you want to control when a column resizes. The column width is adjusted only once per method call; if the contents of the column later change, the column will not automatically adjust. To resize all columns, use the method. To set the column to automatically resize whenever its contents change, use the property or the column property. This overload lets you specify a sizing mode that calculates the new width based on values in a limited set of cells, such as those in displayed rows only. This improves performance when the control contains a large number of rows. @@ -1478,11 +1478,11 @@ The control replaces and extends the method. To set the column to automatically resize whenever its contents change, use the property or the column property. + This method is useful if you want to control when a column resizes. The column width is adjusted only once per method call; if the contents of the column later change, the column will not automatically adjust. To resize all columns, use the method. To set the column to automatically resize whenever its contents change, use the property or the column property. This overload lets you specify a sizing mode that calculates the new width based on values in a limited set of cells, such as those in displayed rows only. This improves performance when the control contains a large number of rows. - This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If `fixedHeight` is `false`, the column width will be calculated with the expectation that you will call the or method next. + This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If `fixedHeight` is `false`, the column width will be calculated with the expectation that you will call the or method next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -1655,7 +1655,7 @@ The control replaces and extends the property value of . - This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedColumnsWidth` or `fixedRowHeadersWidth` parameters are `false`, the height of the column headers will be calculated with the expectation that you will call the methods such as and next. + This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedColumnsWidth` or `fixedRowHeadersWidth` parameters are `false`, the height of the column headers will be calculated with the expectation that you will call the methods such as and next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -1707,7 +1707,7 @@ The control replaces and extends the property value of . - This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedColumnWidth` or `fixedRowHeadersWidth` parameters are `false`, the height of the column headers will be calculated with the expectation that you will call the methods such as and next. + This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedColumnWidth` or `fixedRowHeadersWidth` parameters are `false`, the height of the column headers will be calculated with the expectation that you will call the methods such as and next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -1763,7 +1763,7 @@ The control replaces and extends the method. To set the columns to automatically resize whenever their contents change, use the property or the column property. + This method is useful if you want to control when columns resize. The column widths are adjusted only once per method call; if the contents of the columns later change, the columns will not automatically adjust. To resize a specific column, use the method. To set the columns to automatically resize whenever their contents change, use the property or the column property. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -1818,7 +1818,7 @@ The control replaces and extends the method. To set the columns to automatically resize whenever their contents change, use the property or the column property. + This method is useful if you want to control when columns resize. The column widths are adjusted only once per method call; if the contents of the columns later change, the columns will not automatically adjust. To resize a specific column, use the method. To set the columns to automatically resize whenever their contents change, use the property or the column property. This overload lets you specify a sizing mode that calculates the new widths based on values in a limited set of cells, such as those in displayed rows only. This improves performance when the control contains a large number of rows. @@ -1878,11 +1878,11 @@ The control replaces and extends the method. To set the columns to automatically resize whenever their contents change, use the property or the column property. + This method is useful if you want to control when columns resize. The column widths are adjusted only once per method call; if the contents of the columns later change, the columns will not automatically adjust. To resize a specific column, use the method. To set the columns to automatically resize whenever their contents change, use the property or the column property. This overload lets you specify a sizing mode that calculates the new widths based on values in a limited set of cells, such as those in displayed rows only. This improves performance when the control contains a large number of rows. - This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If `fixedHeight` is `false`, the column widths will be calculated with the expectation that you will call the or method next. + This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If `fixedHeight` is `false`, the column widths will be calculated with the expectation that you will call the or method next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -1945,7 +1945,7 @@ The control replaces and extends the method. To set the row to automatically resize whenever its contents change, use the property. + This method is useful if you want to control when a row resizes. The row height is adjusted only once per method call; if the contents of the row later change, the row will not automatically adjust. To resize all rows, use the method. To set the row to automatically resize whenever its contents change, use the property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . @@ -2006,7 +2006,7 @@ The control replaces and extends the method. To set the row to automatically resize whenever its contents change, use the property. + This method is useful if you want to control when a row resizes. The row height is adjusted only once per method call; if the contents of the row later change, the row will not automatically adjust. To resize all rows, use the method. To set the row to automatically resize whenever its contents change, use the property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . @@ -2070,13 +2070,13 @@ The control replaces and extends the method. To set the row to automatically resize whenever its contents change, use the property. + This method is useful if you want to control when a row resizes. The row height is adjusted only once per method call; if the contents of the row later change, the row will not automatically adjust. To resize all rows, use the method. To set the row to automatically resize whenever its contents change, use the property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . This overload lets you specify a sizing mode that calculates the new height based on values in a limited set of cells, such as those in displayed rows only. This improves performance when the control contains a large number of rows. - This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If `fixedWidth` is `false`, the row height will be calculated with the expectation that you will call the or method next. + This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If `fixedWidth` is `false`, the row height will be calculated with the expectation that you will call the or method next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -2262,7 +2262,7 @@ The control replaces and extends the class. If the `fixedColumnHeadersHeight` or `fixedRowsHeight` parameters are `false`, the width of the row headers will be calculated with the expectation that you will call methods such as and next. + This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedColumnHeadersHeight` or `fixedRowsHeight` parameters are `false`, the width of the row headers will be calculated with the expectation that you will call methods such as and next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -2320,7 +2320,7 @@ The control replaces and extends the class. If the `fixedColumnHeadersHeight` or `fixedRowHeight` parameters are `false`, the width of the row headers will be calculated with the expectation that you will call methods such as and next. + This overload is protected, and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedColumnHeadersHeight` or `fixedRowHeight` parameters are `false`, the width of the row headers will be calculated with the expectation that you will call methods such as and next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -2380,7 +2380,7 @@ The control replaces and extends the method. To resize a subset of rows, use the overload. To set the rows to automatically resize whenever their contents change, use the property. + This method is useful if you want to control when rows resize. The row heights are adjusted only once per method call; if the contents of the rows later change, the rows will not automatically adjust. To resize a specific row, use the method. To resize a subset of rows, use the overload. To set the rows to automatically resize whenever their contents change, use the property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . @@ -2437,7 +2437,7 @@ The control replaces and extends the method. To resize a subset of rows, use the overload. To set the rows to automatically resize whenever their contents change, use the property. + This method is useful if you want to control when rows resize. The row heights are adjusted only once per method call; if the contents of the rows later change, the rows will not automatically adjust. To resize a specific row, use the method. To resize a subset of rows, use the overload. To set the rows to automatically resize whenever their contents change, use the property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . @@ -2499,13 +2499,13 @@ The control replaces and extends the method. To resize a subset of rows, use the overload. To set the rows to automatically resize whenever their contents change, use the property. + This method is useful if you want to control when rows resize. The row heights are adjusted only once per method call; if the contents of the rows later change, the rows will not automatically adjust. To resize a specific row, use the method. To resize a subset of rows, use the overload. To set the rows to automatically resize whenever their contents change, use the property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . This overload lets you specify a sizing mode that calculates the new heights based on values in a limited set of cells, such as those in displayed rows only. This improves performance when the control contains a large number of rows. - This overload is protected, and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedWidth` parameter is `false`, the row heights will be calculated with the expectation that you will call the or method next. + This overload is protected, and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedWidth` parameter is `false`, the row heights will be calculated with the expectation that you will call the or method next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -2560,13 +2560,13 @@ The control replaces and extends the method. To resize all rows, use a different overload of the method. To set the rows to automatically resize whenever their contents change, use the property. + This method is useful if you want to control when rows resize, but you want to resize only a specific subset of rows, such as those within a range of bound records that have been updated. The row heights for the specified rows are adjusted only once per method call; if the contents of the rows later change, the rows will not automatically adjust. To resize a specific row, use the method. To resize all rows, use a different overload of the method. To set the rows to automatically resize whenever their contents change, use the property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . This overload lets you specify a sizing mode that calculates the new heights based on values in a limited set of cells, such as those in displayed rows only. This improves performance when the control contains a large number of rows. - This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedWidth` parameter is `false`, the row heights will be calculated with the expectation that you will call the or method next. + This overload is protected and is designed to enable you to achieve ideal cell height-to-width ratios in a derived class. If the `fixedWidth` parameter is `false`, the row heights will be calculated with the expectation that you will call the or method next. For more information about programmatic resizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -2712,15 +2712,15 @@ The control replaces and extends the is enabled, whenever row heights change. Some content-based sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. + This property lets you configure the control so that column widths are automatically adjusted either to fill the control or to fit cell contents. Size adjustments occur in fill mode whenever the width of the control changes. In content-based sizing modes, size adjustments occur whenever cell contents change or, if is enabled, whenever row heights change. Some content-based sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. To change the sizing mode for an individual column, set its property. The default value of this property is , indicating that the column inherits its behavior and its property value from the control. - Columns in fill mode divide the available control width in proportions indicated by their property values. The width available for fill mode is determined by subtracting the widths of all other columns from the width of the client area of the control. If this width is smaller than the combined values of all fill-mode columns, the horizontal scroll bar is displayed, all fill-mode columns are shown with their minimum widths, and user column-resizing is disabled. For more information about column fill mode, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). + Columns in fill mode divide the available control width in proportions indicated by their property values. The width available for fill mode is determined by subtracting the widths of all other columns from the width of the client area of the control. If this width is smaller than the combined values of all fill-mode columns, the horizontal scroll bar is displayed, all fill-mode columns are shown with their minimum widths, and user column-resizing is disabled. For more information about column fill mode, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). Only columns with a property value of `true` are resized automatically, and changing the visibility of a column does not cause resizing to occur. Additionally, when columns are set to automatically resize, the user cannot adjust the column widths with the mouse. - To adjust column widths programmatically, use the or methods or set the column property. + To adjust column widths programmatically, use the or methods or set the column property. For more information about content-based automatic sizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -2782,7 +2782,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -2837,13 +2837,13 @@ The control replaces and extends the is enabled, row heights are also adjusted whenever column widths change. Some sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. + This property lets you configure the control so that row heights are automatically adjusted to fit their contents whenever the contents change. If is enabled, row heights are also adjusted whenever column widths change. Some sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. Only rows with a property value of `true` are resized automatically, and changing the visibility of a row does not cause resizing to occur. Additionally, when rows are set to automatically resize, the user cannot adjust the row heights with the mouse. - The value of an automatically sized row is recalculated during layout to account for the size of the font that is used. To get the correct , you should retrieve the value in the form's event instead of in the form's constructor. + The value of an automatically sized row is recalculated during layout to account for the size of the font that is used. To get the correct , you should retrieve the value in the form's event instead of in the form's constructor. - To adjust row heights programmatically, use the or methods, or set the row property. + To adjust row heights programmatically, use the or methods, or set the row property. For cell contents to wrap onto multiple lines when a row is resized, the cell style in effect for the cell must have a property value of . @@ -3053,7 +3053,7 @@ The control replaces and extends the property determines the color of the area of the that is not filled with cells. ## Examples - The following code example demonstrates how to set the property. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. + The following code example demonstrates how to set the property. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -3108,7 +3108,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -3489,7 +3489,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -3778,7 +3778,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -3832,7 +3832,7 @@ The control replaces and extends the event. - For clicks in a , this event occurs before the check box changes value, so if you do not want to calculate the expected value based on the current value, you will typically handle the event instead. Because that event occurs only when the user-specified value is committed, which typically occurs when focus leaves the cell, you must also handle the event. In that handler, if the current cell is a check box cell, call the method and pass in the value. + For clicks in a , this event occurs before the check box changes value, so if you do not want to calculate the expected value based on the current value, you will typically handle the event instead. Because that event occurs only when the user-specified value is committed, which typically occurs when focus leaves the cell, you must also handle the event. In that handler, if the current cell is a check box cell, call the method and pass in the value. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -3890,7 +3890,7 @@ The control replaces and extends the or link clicks for a . - For clicks in a , this event occurs before the check box changes value, so if you do not want to calculate the expected value based on the current value, you will typically handle the event instead. Because that event occurs only when the user-specified value is committed, which typically occurs when focus leaves the cell, you must also handle the event. In that handler, if the current cell is a check box cell, call the method and pass in the value. + For clicks in a , this event occurs before the check box changes value, so if you do not want to calculate the expected value based on the current value, you will typically handle the event instead. Because that event occurs only when the user-specified value is committed, which typically occurs when focus leaves the cell, you must also handle the event. In that handler, if the current cell is a check box cell, call the method and pass in the value. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -3945,7 +3945,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4000,7 +4000,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4058,9 +4058,9 @@ The control replaces and extends the event also occurs whenever the value of the property is retrieved, either programmatically or when the user right-clicks a cell. - You can use the and properties to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and properties to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). You can also specify shortcut menus for individual rows rather than individual cells by setting the row property or handling the event. The cell property setting overrides the row property setting, and the event overrides both the event and the row property setting. However, you can specify `null` for a cell shortcut menu to prevent a row shortcut menu from being overridden. @@ -4125,7 +4125,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4276,7 +4276,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4334,9 +4334,9 @@ The control replaces and extends the event also occurs whenever the value of the property is retrieved. - You can use the and property to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and property to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -4401,11 +4401,11 @@ The control replaces and extends the event. This event lets you indicate the exact display value as well as the cell styles, such as background and foreground color, to use for the cell display. This means you can handle this event for any kind of cell formatting, regardless of whether the cell value itself needs formatting. - The event occurs every time each cell is painted, so you should avoid lengthy processing when handling this event. This event also occurs when the cell is retrieved or its method is called. + The event occurs every time each cell is painted, so you should avoid lengthy processing when handling this event. This event also occurs when the cell is retrieved or its method is called. When you handle the event, the property is initialized with the cell value. If you provide custom conversion from the cell value to the display value, set the property to the converted value, ensuring that the new value is of the type specified by the cell property. To indicate that no further value formatting is necessary, set the property to `true`. - When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is formatted using the , , , and properties of the cell style returned by the property, which is initialized using the cell property. + When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is formatted using the , , , and properties of the cell style returned by the property, which is initialized using the cell property. Regardless of the value of the property, the display properties of the object returned by the property are used to render the cell. @@ -4540,12 +4540,12 @@ The control replaces and extends the , this event occurs before the check box changes value, so if you do not want to calculate the expected value based on the current value, you will typically handle the event instead. Because that event occurs only when the user-specified value is committed, which typically occurs when focus leaves the cell, you must also handle the event. In that handler, if the current cell is a check box cell, call the method and pass in the value. + For clicks in a , this event occurs before the check box changes value, so if you do not want to calculate the expected value based on the current value, you will typically handle the event instead. Because that event occurs only when the user-specified value is committed, which typically occurs when focus leaves the cell, you must also handle the event. In that handler, if the current cell is a check box cell, call the method and pass in the value. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4606,7 +4606,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4659,7 +4659,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4814,7 +4814,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4867,7 +4867,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -4915,7 +4915,7 @@ The control replaces and extends the or methods to paint other parts. You can also use the class to paint standard controls using the current theme. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). If you are using Visual Studio 2005, you also have access to a large library of standard images that you can use with the control. + You can handle this event to customize the appearance of cells in the control. You can paint entire cells yourself, or paint specific parts of cells and use the or methods to paint other parts. You can also use the class to paint standard controls using the current theme. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). If you are using Visual Studio 2005, you also have access to a large library of standard images that you can use with the control. When handling this event, you should access the cell through the parameters of the event handler, rather than access the cell directly. @@ -4979,13 +4979,13 @@ The control replaces and extends the event to provide custom value conversion to the required type. - Users can enter edit mode using the method specified by the property, and can leave edit mode, committing any changes to a cell, by moving to another cell or by pressing ENTER. Pressing ESC will revert any changes to the value before it is committed, and the event will not occur. The event occurs only if the cell value has actually been modified, even if the final value is the same as the original value. It also occurs when the method is called. + Users can enter edit mode using the method specified by the property, and can leave edit mode, committing any changes to a cell, by moving to another cell or by pressing ENTER. Pressing ESC will revert any changes to the value before it is committed, and the event will not occur. The event occurs only if the cell value has actually been modified, even if the final value is the same as the original value. It also occurs when the method is called. - When you handle the event, you can convert the value yourself or you can customize the default conversion. For example, you can convert the value yourself using the cell method with type converters of your choosing. Alternatively, you can let the default type converters parse the value, but modify the , , and properties of the object returned by the property, which is initialized using the cell property. + When you handle the event, you can convert the value yourself or you can customize the default conversion. For example, you can convert the value yourself using the cell method with type converters of your choosing. Alternatively, you can let the default type converters parse the value, but modify the , , and properties of the object returned by the property, which is initialized using the cell property. When you convert the value yourself, replace the initial, formatted value of the property with the converted value in the type specified by the cell property. To indicate that no further parsing is necessary, set the property to `true`. - When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is parsed using the cell method with default type converters. The default implementation of this method parses the value using the , , and properties of the cell style passed in. If the value is not equal to , the value is parsed using the property and the type converters passed in. + When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is parsed using the cell method with default type converters. The default implementation of this method parses the value using the , , and properties of the cell style passed in. If the value is not equal to , the value is parsed using the property and the type converters passed in. To customize the conversion of a cell value into a formatted value for display, handle the event. @@ -5115,7 +5115,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -5167,21 +5167,21 @@ The control replaces and extends the event occurs when a property value of a object returned by one of the following properties changes: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- If one of these properties is set to a different , however, the corresponding *PropertyName*`Changed` event occurs, but the event does not occur. @@ -5190,7 +5190,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -5246,7 +5246,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -5304,9 +5304,9 @@ The control replaces and extends the event also occurs whenever the value of the property is retrieved, either programmatically or when the user navigates to the cell with the mouse or keyboard. - You can use the and properties to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and properties to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -5370,7 +5370,7 @@ The control replaces and extends the event to clear out the property. In this example, the event sets the if the user enters data that is not valid into a cell. This example is part of a larger example available in the event. + The following code example demonstrates how to use the event to clear out the property. In this example, the event sets the if the user enters data that is not valid into a cell. This example is part of a larger example available in the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidated/form1.cs" id="Snippet50"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidated/form1.vb" id="Snippet50"::: @@ -5424,7 +5424,7 @@ The control replaces and extends the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. + The following code example handles the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet40"::: @@ -5478,9 +5478,9 @@ The control replaces and extends the event occurs when the user-specified value is committed, which typically occurs when focus leaves the cell. - In the case of check box cells, however, you will typically want to handle the change immediately. To commit the change when the cell is clicked, you must handle the event. In the handler, if the current cell is a check box cell, call the method and pass in the value. + In the case of check box cells, however, you will typically want to handle the change immediately. To commit the change when the cell is clicked, you must handle the event. In the handler, if the current cell is a check box cell, call the method and pass in the value. - Rows in the control are not automatically sorted when a cell value is changed. To sort the control when the user modifies a cell, call the method in a event handler. + Rows in the control are not automatically sorted when a cell value is changed. To sort the control when the user modifies a cell, call the method in a event handler. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -5542,7 +5542,7 @@ The control replaces and extends the event to populate cells with positive integers. This example is part of a larger example available in the reference topic. + The following code example handles the event to populate cells with positive integers. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet10"::: @@ -5607,7 +5607,7 @@ The control replaces and extends the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. + The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet10"::: @@ -5794,9 +5794,9 @@ The control replaces and extends the control copies the cells contained in the smallest rectangle that includes all selected cells. Rows and columns that do not contain any selected cells are not represented in the copied data. Any unselected cells in the remaining rows and columns are represented by blank placeholders. Depending on the copy mode and the selection mode, header values for the copied rows and columns may be copied, as well. - When users copy content, the control adds a to the Clipboard. This data object is retrieved from the method. You can call this method when you want to programmatically add the data object to the Clipboard. + When users copy content, the control adds a to the Clipboard. This data object is retrieved from the method. You can call this method when you want to programmatically add the data object to the Clipboard. - The method retrieves values for individual cells by calling the method. You can override either or both of these methods in derived classes to customize the layout of copied cells or to support additional data formats. + The method retrieves values for individual cells by calling the method. You can override either or both of these methods in derived classes to customize the layout of copied cells or to support additional data formats. For more information about Clipboard operations and data formats, see the class. @@ -5857,7 +5857,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -5908,7 +5908,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -5970,14 +5970,14 @@ The control replaces and extends the property to 0 will remove all columns from the . - If is reset to a value less than the current value, columns will be removed from the end of the collection. If is set to a value greater than the current value, columns will be added to the end of the collection. + If is reset to a value less than the current value, columns will be removed from the end of the collection. If is set to a value greater than the current value, columns will be added to the end of the collection. This property can be used with the property to create a simple for displaying and editing text. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. + The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -6026,7 +6026,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6079,7 +6079,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6132,7 +6132,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6187,7 +6187,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6238,7 +6238,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6289,7 +6289,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6340,7 +6340,7 @@ The control replaces and extends the , the default behavior is to order the grid rows based on the clicked column, or to reverse the sort order if the grid is already sorted by the clicked column. The following code example demonstrates how to use this event to perform a programmatic sort that emulates the default behavior of clicking a when the default behavior has been disabled. In this example, the is set to , so clicking the selects the contents of the column. For the example code to function as intended, the default column header click behavior needs to be changed each time the data is loaded into the . Add a event handler to provide the code that changes the default behavior. To run this example, paste the code into a form that contains a named `dataGridView1` and ensure that all events are associated with their event handlers. + When a column heading is clicked in a , the default behavior is to order the grid rows based on the clicked column, or to reverse the sort order if the grid is already sorted by the clicked column. The following code example demonstrates how to use this event to perform a programmatic sort that emulates the default behavior of clicking a when the default behavior has been disabled. In this example, the is set to , so clicking the selects the contents of the column. For the example code to function as intended, the default column header click behavior needs to be changed each time the data is loaded into the . Add a event handler to provide the code that changes the default behavior. To run this example, paste the code into a form that contains a named `dataGridView1` and ensure that all events are associated with their event handlers. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellBeginEdit/datagridviewmisc.cs" id="Snippet160"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellBeginEdit/datagridviewmisc.vb" id="Snippet160"::: @@ -6389,7 +6389,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6446,10 +6446,10 @@ The control replaces and extends the value, which is a read-only value indicating that the border style has been customized through the use of the property. > [!NOTE] -> If visual styles are enabled for the application through the method and the property is `true`, the column headers are painted using the current theme. In this case, the value of the property is ignored for all column headers except the , to which the theme is not applied. +> If visual styles are enabled for the application through the method and the property is `true`, the column headers are painted using the current theme. In this case, the value of the property is ignored for all column headers except the , to which the theme is not applied. ## Examples - The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named`dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. + The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named`dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -6505,7 +6505,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6557,22 +6557,22 @@ The control replaces and extends the |The value of the property.| -||The value of the property.| -||The value of the property.| -||The value of the property.| -||The value of the property.| -||| -||| +||The value of the property.| +||The value of the property.| +||The value of the property.| +||The value of the property.| +||The value of the property.| +||| +||| - These values automatically override the values set through the property. To force column headers to inherit the values, you must set the values in the object to the default values indicated for the class. + These values automatically override the values set through the property. To force column headers to inherit the values, you must set the values in the object to the default values indicated for the class. For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). - If visual styles are enabled and is set to `true`, all header cells except the are painted using the current theme and the values are ignored. + If visual styles are enabled and is set to `true`, all header cells except the are painted using the current theme and the values are ignored. ## Examples - The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. + The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -6624,7 +6624,7 @@ The control replaces and extends the returned by the property is set to a new value or when the property is set to a new with at least one property value different than the previous cell style object. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6717,7 +6717,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6775,7 +6775,7 @@ The control replaces and extends the , the height of the column headers cannot be adjusted by the user. - To adjust the height of the column headers programmatically, use the method or set the property. + To adjust the height of the column headers programmatically, use the method or set the property. To set the sizing mode for the row headers, use the property. @@ -6784,7 +6784,7 @@ The control replaces and extends the [!NOTE] -> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. +> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. ## Examples The following code example illustrates how to use this property in a control intended primarily for display. In this example, the visual appearance of the control is customized in several ways and the control is configured for limited interactivity. This example is part of a larger example available in the class overview. @@ -6837,7 +6837,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6940,7 +6940,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -6991,7 +6991,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -7042,7 +7042,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -7105,7 +7105,7 @@ The control replaces and extends the returned by this property, you can add columns, remove columns, and obtain a count of the columns contained in the control. For more information, see . ## Examples - The following code example demonstrates how to create an unbound ; set the , , and properties; and use the and properties. It also demonstrates how to use a version of the and methods to properly size the column headers and the rows. To run this example, paste the following code into a form that contains a named `dataGridView1` and a button named `Button1`, and then call the `InitializeDataGridView` method from the form's constructor or event handler. Ensure all events are connected with their event handlers. + The following code example demonstrates how to create an unbound ; set the , , and properties; and use the and properties. It also demonstrates how to use a version of the and methods to properly size the column headers and the rows. To run this example, paste the following code into a form that contains a named `dataGridView1` and a button named `Button1`, and then call the `InitializeDataGridView` method from the form's constructor or event handler. Ensure all events are connected with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewAutoSize/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView+HitTestInfo/Overview/form1.cs" id="Snippet2"::: @@ -7157,7 +7157,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -7207,22 +7207,22 @@ The control replaces and extends the in the control: -- +- -- +- -- +- -- +- -- +- -- +- For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -7277,7 +7277,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -7376,7 +7376,7 @@ The control replaces and extends the event, which you can handle to customize the type conversion. Otherwise, default type converters are used. Conversion errors may result in an exception if the event is not handled to prevent it. If the value is successfully converted, it is committed to the data store, raising the event for non-data-bound cells when the property value is `true`. If the value is successfully committed, the event occurs. ## Examples - The following code example calls the method within a event handler to raise the event. This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). + The following code example calls the method within a event handler to raise the event. This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CommitEdit/form1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CommitEdit/form1.vb" id="Snippet5"::: @@ -7789,7 +7789,7 @@ The control replaces and extends the event. In this example, the event handler calls the method to raise the event and determine the current value of a . This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). + The following code example demonstrates how to handle the event. In this example, the event handler calls the method to raise the event and determine the current value of a . This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CommitEdit/form1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CommitEdit/form1.vb" id="Snippet5"::: @@ -7884,7 +7884,7 @@ The control replaces and extends the , , or property changes. + This event is raised when the contents of the data source change or when the value of the , , or property changes. Handling this event is useful, for example, to programmatically resize rows and columns based on content updates. For more information, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -7949,7 +7949,7 @@ The control replaces and extends the [!NOTE] -> The and properties of the object associated with this event normally indicate the cell in which the data error occurred. When the error occurs in an external data source, however, the data source may not provide the column in which the error occurred. In this case, the property typically indicates the column of the current cell at the time of the error. +> The and properties of the object associated with this event normally indicate the cell in which the data error occurred. When the error occurs in an external data source, however, the data source may not provide the column in which the error occurred. In this case, the property typically indicates the column of the current cell at the time of the error. ## Examples The following code example demonstrates a event handler. This example is part of a larger example available in the class overview topic. @@ -8064,7 +8064,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -8131,7 +8131,7 @@ The control replaces and extends the interface, such as the and classes. -- The interface, such as the class. +- The interface, such as the class. - The interface, such as the class. @@ -8212,7 +8212,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -8262,15 +8262,15 @@ The control replaces and extends the control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . The styles specified through the property affect all cells except when overridden by the styles specified through the following properties: -- +- -- +- -- +- -- +- -- +- For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -8330,7 +8330,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -8746,7 +8746,7 @@ The control replaces and extends the property, which is `null` when the current cell is not in edit mode, the property is always available. ## Examples - The following code example illustrates how to use the property in a control to visually differentiate a cell when it is in edit mode. In this example, the of the cell's editing panel is set to . To run this example, paste the code into a form that contains a named `dataGridView1`. + The following code example illustrates how to use the property in a control to visually differentiate a cell when it is in edit mode. In this example, the of the cell's editing panel is set to . To run this example, paste the code into a form that contains a named `dataGridView1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellBeginEdit/datagridviewmisc.cs" id="Snippet069"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellBeginEdit/datagridviewmisc.vb" id="Snippet069"::: @@ -8851,7 +8851,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -8900,10 +8900,10 @@ The control replaces and extends the method before calling the method. If is set to `true`, all header cells except the are painted using the current theme. + You can enable visual styles for your application by calling the method before calling the method. If is set to `true`, all header cells except the are painted using the current theme. ## Examples - The following code example demonstrates how to disable visual styles for the row and column headers in an application that has visual styles enabled. In this example, visual styles have been enabled for the application by calling the method in `Main`. However, visual styles will not be applied to the row and column headers because is set to `false`. This code example is part of a larger example provided for the class. + The following code example demonstrates how to disable visual styles for the row and column headers in an application that has visual styles enabled. In this example, visual styles have been enabled for the application by calling the method in `Main`. However, visual styles will not be applied to the row and column headers because is set to `false`. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.vb" id="Snippet10"::: @@ -8962,7 +8962,7 @@ The control replaces and extends the overload, passing in a bitwise combination of the and values. + This method calls the overload, passing in a bitwise combination of the and values. This method raises the event. @@ -9277,11 +9277,11 @@ The control replaces and extends the property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. Because the is immutable (meaning that you cannot adjust any of its properties), you can only assign the property a new object. However, you can base the new font on the existing font. - The control uses the value of the property as the default value of the properties of objects returned by the , , and properties. Changing the value automatically updates the , , and properties, changing the font for any cell that inherits the value. Header cells override the value by default, and you can override the value for specific rows, columns, and cells. For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). + The control uses the value of the property as the default value of the properties of objects returned by the , , and properties. Changing the value automatically updates the , , and properties, changing the font for any cell that inherits the value. Header cells override the value by default, and you can override the value for specific rows, columns, and cells. For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). ## Examples The following code example illustrates the use of this property. This example is part of a larger example available in [How to: Create an Unbound Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-create-an-unbound-windows-forms-datagridview-control). @@ -9348,7 +9348,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -9405,11 +9405,11 @@ The control replaces and extends the property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. Because the is immutable (meaning that you cannot adjust any of its properties), you can only assign the property a new object. However, you can base the new font on the existing font. - The control uses the value of the property as the default value of the property of returned by the property. Changing the value automatically updates the property, changing the foreground text color for any cell that inherits the value. Header cells override the value by default, and you can override the value for specific rows, columns, and cells. For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). + The control uses the value of the property as the default value of the property of returned by the property. Changing the value automatically updates the property, changing the foreground text color for any cell that inherits the value. Header cells override the value by default, and you can override the value for specific rows, columns, and cells. For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). ]]> @@ -9468,7 +9468,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -9551,7 +9551,7 @@ The control replaces and extends the value. This is typically more efficient than using the property. ## Examples - The following code example illustrates how to use this method to determine whether there are any cells selected in a control. In this example, if any cells are selected, their values are retrieved through the method and displayed in a control. + The following code example illustrates how to use this method to determine whether there are any cells selected in a control. In this example, if any cells are selected, their values are retrieved through the method and displayed in a control. This code is part of a larger example illustrating the use of the Clipboard features of the control. This example is part of a larger example available in [How to: Enable Users to Copy Multiple Cells to the Clipboard from the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/enable-users-to-copy-multiple-cells-to-the-clipboard-datagridview). @@ -9650,7 +9650,7 @@ The control replaces and extends the method. Blank placeholder values are used for unselected cells in this region. This method combines these values into a containing several formats for copying to the clipboard. The supported clipboard formats include , , , and . + This method retrieves data that represents the region defined by the selected cells. This region is the smallest rectangle that includes all of the selected cells. The value for each selected cell in this region is retrieved by calling the method. Blank placeholder values are used for unselected cells in this region. This method combines these values into a containing several formats for copying to the clipboard. The supported clipboard formats include , , , and . For more information, see the class. @@ -9781,10 +9781,10 @@ The control replaces and extends the property to any color when you use a single border; with other types of borders, the colors are specified by the operating system. If visual styles are enabled for the application through the method, the property is ignored, and the current theme's colors are used. + You can set the property to any color when you use a single border; with other types of borders, the colors are specified by the operating system. If visual styles are enabled for the application through the method, the property is ignored, and the current theme's colors are used. ## Examples - The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. + The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -9839,7 +9839,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -10038,7 +10038,7 @@ The control replaces and extends the . + For more information about painting and invalidation, see . ## Examples The following code example illustrates how to use this method in a customized that is painted with a custom border when the mouse pointer rests on it. In the example, the cell is invalidated when the mouse pointer enters or leaves it. @@ -10095,7 +10095,7 @@ The control replaces and extends the . + For more information about painting and invalidation, see . ## Examples The following code example illustrates how to use this method in a custom cell type that changes a cell's appearance when the user rests the mouse pointer over it. This example is part of a larger example available in [How to: Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their Behavior and Appearance](/dotnet/desktop/winforms/controls/customize-cells-and-columns-in-the-datagrid-by-extending-behavior). @@ -10148,7 +10148,7 @@ The control replaces and extends the . + For more information about painting and invalidation, see . ]]> @@ -10193,10 +10193,10 @@ The control replaces and extends the or events. - For more information about painting and invalidation, see . + For more information about painting and invalidation, see . ## Examples - The following code example illustrates how to use the method in a row-painting scenario. In the example, the row is invalidated when the current cell changes, forcing the row to repaint itself. + The following code example illustrates how to use the method in a row-painting scenario. In the example, the row is invalidated when the current cell changes, forcing the row to repaint itself. This code is part of a larger example available in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). @@ -10252,7 +10252,7 @@ The control replaces and extends the is `true` and the current cell hosts an editing control, you can retrieve it through the property. + If is `true` and the current cell hosts an editing control, you can retrieve it through the property. ## Examples The following code example uses the property to determine whether to commit a cell value and raise the event from a handler for the event. This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). @@ -10302,10 +10302,10 @@ The control replaces and extends the that has focus is always in edit mode. If the current cell hosts an editing control and is `true`, you can retrieve the editing control through the property. + A that has focus is always in edit mode. If the current cell hosts an editing control and is `true`, you can retrieve the editing control through the property. ## Examples - The following code example illustrates the use of this property. This example is part of a larger example available in the reference topic. + The following code example illustrates the use of this property. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet10"::: @@ -10357,7 +10357,7 @@ The control replaces and extends the property will always equal the value of the property, unless the is bound to a data source that supports editing, or virtual mode has been implemented to use row-level commit scope. In these cases, the will evaluate this property at the row level. - When the user navigates away from the row, the control commits all row changes. The user can also press CTRL+ENTER to commit row changes without leaving the row. To commit row changes programmatically, call the form's method. If your data source is a , you can also call . + When the user navigates away from the row, the control commits all row changes. The user can also press CTRL+ENTER to commit row changes without leaving the row. To commit row changes programmatically, call the form's method. If your data source is a , you can also call . ]]> @@ -10497,7 +10497,7 @@ The control replaces and extends the collection of the collection. + This indexer is an alternative to accessing cells through the collection of the collection. ## Examples The following code example demonstrates the use of this indexer. @@ -10566,7 +10566,7 @@ The control replaces and extends the collection of the collection. + This indexer is an alternative to accessing cells through the collection of the collection. ## Examples The following code example demonstrates the use of this indexer. @@ -10620,11 +10620,11 @@ The control replaces and extends the property is set to `true`, multiple elements (cells, rows, or columns) can be selected in the control. To select multiple elements, the user can hold down the CTRL key while clicking the elements to select. Consecutive elements can be selected by clicking the first element to select and then, while holding down the SHIFT key, clicking the last element to select. The selection scope is based on the property. For example, if is set to , the user can select multiple columns. + When the property is set to `true`, multiple elements (cells, rows, or columns) can be selected in the control. To select multiple elements, the user can hold down the CTRL key while clicking the elements to select. Consecutive elements can be selected by clicking the first element to select and then, while holding down the SHIFT key, clicking the last element to select. The selection scope is based on the property. For example, if is set to , the user can select multiple columns. You can use the property to allow a user to select multiple elements in the control and perform an operation on all the selected elements. For example, the user could select multiple cells and then right-click a selected cell to display a shortcut menu that displays a set of tasks to perform on the selected cells. - To determine which cells, rows, or columns are selected in the control, you can access the , , or property. To determine the number of selected cells, call the method with an argument value of . Use the method to retrieve the number of selected rows and the method to retrieve the number of columns. These methods are more efficient than accessing the collections directly when working with large amounts of data. 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). + To determine which cells, rows, or columns are selected in the control, you can access the , , or property. To determine the number of selected cells, call the method with an argument value of . Use the method to retrieve the number of selected rows and the method to retrieve the number of columns. These methods are more efficient than accessing the collections directly when working with large amounts of data. 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). ## Examples The following code example demonstrates how to use the property. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. @@ -10677,7 +10677,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -10733,7 +10733,7 @@ The control replaces and extends the is `false`, the value of this property is equal to the number of rows in the control minus 1. + Unless is `false`, the value of this property is equal to the number of rows in the control minus 1. ]]> @@ -10781,7 +10781,7 @@ The control replaces and extends the event to track when a new row is being added, so logic in the event handler can initialize a new row's cell to an initial value. This example is part of a larger example available in the reference topic. + The following code example uses the event to track when a new row is being added, so logic in the event handler can initialize a new row's cell to an initial value. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet20"::: @@ -10829,7 +10829,7 @@ The control replaces and extends the when they have uncommitted changes. ## Examples - The following code example illustrates the use of this method in a custom cell scenario. In the example, an implementation derived from the class overrides the method and uses the method to indicate a change to the control. + The following code example illustrates the use of this method in a custom cell scenario. In the example, an implementation derived from the class overrides the method and uses the method to indicate a change to the control. This example is part of a larger example shown in [How to: Host Controls in Windows Forms DataGridView Cells](/dotnet/desktop/winforms/controls/how-to-host-controls-in-windows-forms-datagridview-cells). @@ -10876,7 +10876,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -10922,7 +10922,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -10968,7 +10968,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11014,7 +11014,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11059,7 +11059,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11104,7 +11104,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11151,7 +11151,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11196,7 +11196,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11242,7 +11242,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11289,7 +11289,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11334,7 +11334,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11379,7 +11379,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11424,7 +11424,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11469,7 +11469,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11514,7 +11514,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11564,7 +11564,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11609,7 +11609,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11659,7 +11659,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11709,7 +11709,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11759,7 +11759,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11809,7 +11809,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11860,7 +11860,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11910,7 +11910,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -11960,7 +11960,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12010,7 +12010,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12060,7 +12060,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12110,7 +12110,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12160,7 +12160,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12210,7 +12210,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12262,7 +12262,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12312,7 +12312,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12363,7 +12363,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12413,7 +12413,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12463,7 +12463,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12513,7 +12513,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12563,7 +12563,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12613,7 +12613,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -12663,7 +12663,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -12708,7 +12708,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12760,7 +12760,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12808,7 +12808,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12858,7 +12858,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12908,7 +12908,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -12958,7 +12958,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13009,7 +13009,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13059,7 +13059,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13110,7 +13110,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13161,7 +13161,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13207,7 +13207,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13253,7 +13253,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13299,7 +13299,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13347,7 +13347,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13393,7 +13393,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13438,7 +13438,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13484,7 +13484,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13530,7 +13530,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13576,7 +13576,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13621,7 +13621,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13666,7 +13666,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13713,7 +13713,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13758,7 +13758,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13803,7 +13803,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13849,7 +13849,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13895,7 +13895,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13940,7 +13940,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -13986,7 +13986,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14033,7 +14033,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14079,7 +14079,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14125,7 +14125,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14170,7 +14170,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14217,7 +14217,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14309,7 +14309,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14354,7 +14354,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14399,7 +14399,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14444,7 +14444,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14491,7 +14491,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14536,7 +14536,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14581,7 +14581,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14628,7 +14628,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14711,7 +14711,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14756,11 +14756,11 @@ The control replaces and extends the event, this method uses the new value of the property to update the properties of objects returned by the , , and properties. + In addition to raising the event, this method uses the new value of the property to update the properties of objects returned by the , , and properties. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14807,7 +14807,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14885,7 +14885,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -14930,7 +14930,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15015,7 +15015,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15067,7 +15067,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15118,7 +15118,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15163,7 +15163,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15212,7 +15212,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15290,7 +15290,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example demonstrates the use of this method. @@ -15376,7 +15376,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15455,7 +15455,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples The following code example illustrates the use of this method. This example is part of a larger example available in [How to: Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their Behavior and Appearance](/dotnet/desktop/winforms/controls/customize-cells-and-columns-in-the-datagrid-by-extending-behavior). @@ -15506,7 +15506,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15551,7 +15551,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15629,7 +15629,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15674,7 +15674,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15720,7 +15720,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15780,7 +15780,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15826,7 +15826,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15904,7 +15904,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15950,7 +15950,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -15995,7 +15995,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16043,7 +16043,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16088,7 +16088,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16133,7 +16133,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16179,7 +16179,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16224,7 +16224,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16270,7 +16270,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16316,7 +16316,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16428,7 +16428,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16473,7 +16473,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16520,7 +16520,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16565,7 +16565,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16610,7 +16610,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16656,7 +16656,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16701,7 +16701,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16746,7 +16746,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16791,7 +16791,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16837,7 +16837,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16882,7 +16882,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16927,7 +16927,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -16972,7 +16972,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17019,7 +17019,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17066,7 +17066,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17112,7 +17112,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17158,7 +17158,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17203,7 +17203,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17248,7 +17248,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17293,7 +17293,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17338,7 +17338,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17384,7 +17384,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17429,7 +17429,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17475,7 +17475,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17520,7 +17520,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17567,7 +17567,7 @@ The control replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -17875,10 +17875,10 @@ The control replaces and extends the method when F2 is pressed) and returns the return value of that method. + This method calls the key-processing method appropriate to the key pressed (for example, the method when F2 is pressed) and returns the return value of that method. ## Examples - The following code example demonstrates how to change the behavior of the ENTER key in a subclass by overriding the and methods. In the example, the ENTER key has the same behavior as the RIGHT ARROW key, making it easier for a user to edit multiple cells in a single row of data. + The following code example demonstrates how to change the behavior of the ENTER key in a subclass by overriding the and methods. In the example, the ENTER key has the same behavior as the RIGHT ARROW key, making it easier for a user to edit multiple cells in a single row of data. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet70"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet70"::: @@ -17980,7 +17980,7 @@ The control replaces and extends the subclass by overriding the and methods. In the example, the ENTER key has the same behavior as the RIGHT ARROW key, making it easier for a user to edit multiple cells in a single row of data. + The following code example demonstrates how to change the behavior of the ENTER key in a subclass by overriding the and methods. In the example, the ENTER key has the same behavior as the RIGHT ARROW key, making it easier for a user to edit multiple cells in a single row of data. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet70"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet70"::: @@ -18318,7 +18318,7 @@ The control replaces and extends the method on the base class. + For more information, see the method on the base class. ]]> @@ -18365,7 +18365,7 @@ The control replaces and extends the method on the base class. + For more information, see the method on the base class. ]]> @@ -18523,7 +18523,7 @@ The control replaces and extends the subclass by overriding the and methods. In the example, the ENTER key has the same behavior as the RIGHT ARROW key, making it easier for a user to edit multiple cells in a single row of data. + The following code example demonstrates how to change the behavior of the ENTER key in a subclass by overriding the and methods. In the example, the ENTER key has the same behavior as the RIGHT ARROW key, making it easier for a user to edit multiple cells in a single row of data. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet70"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet70"::: @@ -18776,7 +18776,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -18909,7 +18909,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -18969,7 +18969,7 @@ The control replaces and extends the property to determine the state of a row or the values it contains, and use this information to change or modify the property. This property is initialized with the value of the row property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -19040,12 +19040,12 @@ The control replaces and extends the is set to a value less than the current value, rows will be removed from the end of the collection. If is set to a value greater than the current value, rows will be added to the end of the collection. The additional rows are based on the row specified in the property. + If is set to a value less than the current value, rows will be removed from the end of the collection. If is set to a value greater than the current value, rows will be added to the end of the collection. The additional rows are based on the row specified in the property. - If you set the property to 0, all rows will be removed from the . This is equivalent to calling the method. + If you set the property to 0, all rows will be removed from the . This is equivalent to calling the method. > [!NOTE] -> If is `true`, you cannot set to 0. In this case, call the method to remove all rows except the row for new records. Calling has the same result as setting to 1 in this case, but is much faster. +> If is `true`, you cannot set to 0. In this case, call the method to remove all rows except the row for new records. Calling has the same result as setting to 1 in this case, but is much faster. The property can be used with the property to create a simple for displaying and editing text. If you set the property to a value greater than 0 for a control without columns, a is added automatically. @@ -19107,7 +19107,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19220,7 +19220,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19273,7 +19273,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19377,7 +19377,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19437,12 +19437,12 @@ The control replaces and extends the property to determine the state of a row or the values it contains, and use this information to change or modify the property. This property is initialized with the value of the row property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19501,7 +19501,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19601,7 +19601,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19658,7 +19658,7 @@ The control replaces and extends the value, which is a read-only value indicating that the border style has been customized through the use of the property. > [!NOTE] -> If visual styles are enabled for the application through the method and the property is `true`, the row headers are painted using the current theme. In this case, the value of the property is ignored for all row headers except the , to which the theme is not applied. +> If visual styles are enabled for the application through the method and the property is `true`, the row headers are painted using the current theme. In this case, the value of the property is ignored for all row headers except the , to which the theme is not applied. ## Examples The following code example illustrates the use of this property. @@ -19716,7 +19716,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19768,20 +19768,20 @@ The control replaces and extends the |The value of the property.| -||The value of the property.| -||The value of the property.| -||The value of the property.| -||The value of the property.| -||| -||| +||The value of the property.| +||The value of the property.| +||The value of the property.| +||The value of the property.| +||The value of the property.| +||| +||| - These values automatically override the values set through the property. To force row headers to inherit the values, you must set the values in the object to the default values indicated for the class. + These values automatically override the values set through the property. To force row headers to inherit the values, you must set the values in the object to the default values indicated for the class. For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). ## Examples - The following code example illustrates how to use this property in a with custom colors. Note how the property is set to so that the value is inherited from the object. + The following code example illustrates how to use this property in a with custom colors. Note how the property is set to so that the value is inherited from the object. This example is part of a larger example provided in the class overview. @@ -19836,7 +19836,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -19890,7 +19890,7 @@ The control replaces and extends the property is `false`, a row whose property is set to `true` can still be resized in the user interface (UI) by clicking the mouse cursor anywhere along the bottom border of the row to be resized. ## Examples - The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. + The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -19942,7 +19942,7 @@ The control replaces and extends the property can be used to resize the row header column to a specified width. To adjust the width of this column to fit the contents of the row header cells, use the method. + The property can be used to resize the row header column to a specified width. To adjust the width of this column to fit the contents of the row header cells, use the method. ## Examples The following code example illustrates how to use the property in a row-painting scenario. In the example, the value of this property is used to calculate the bounds within which a custom background is drawn. @@ -19998,7 +19998,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -20056,14 +20056,14 @@ The control replaces and extends the method or set the property. + To adjust the height of the row headers programmatically, use the method or set the property. To set the sizing mode for the column headers, use the property. For more information about header sizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). > [!NOTE] -> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. +> The control does not support double buffering. If is set to `true` in a derived control, users will not receive visual feedback when resizing rows, columns, or headers or when reordering columns. ## Examples The following code example illustrates how to use this property in a control intended primarily for display. In this example, the visual appearance of the control is customized in several ways and the control is configured for limited interactivity. This example is part of a larger example available in the class overview. @@ -20116,7 +20116,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -20222,7 +20222,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -20280,7 +20280,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -20381,7 +20381,7 @@ The control replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -20431,15 +20431,15 @@ The control replaces and extends the event to customize the appearance of rows in the control. You can paint entire rows yourself, or paint specific parts of rows and use the following methods of the class to paint other parts: -- +- -- +- -- +- -- +- -- +- You can also use the class to paint standard controls using the current theme. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). If you are using Visual Studio 2005, you also have access to a large library of standard images that you can use with the control. @@ -20494,15 +20494,15 @@ The control replaces and extends the event to customize the appearance of rows in the control. You can paint entire rows yourself, or paint specific parts of rows and use the following methods of the class to paint other parts: -- +- -- +- -- +- -- +- -- +- You can also use the class to paint standard controls using the current theme. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). If you are using Visual Studio 2005, you also have access to a large library of standard images that you can use with the control. @@ -20555,7 +20555,7 @@ The control replaces and extends the collection to manually populate a control instead of binding it to a data source. The following example shows you how to manually add and insert rows. This example assumes that you have added four instances to the control's collection. + You can use the collection to manually populate a control instead of binding it to a data source. The following example shows you how to manually add and insert rows. This example assumes that you have added four instances to the control's collection. ```vb Me.dataGridView1.Rows.Add("five", "six", "seven", "eight") @@ -20568,9 +20568,9 @@ this.dataGridView1.Rows.Add("five", "six", "seven", "eight");this.dataGridView1. For a detailed example that programmatically populates an unbound control, see the Example section. - Rows include style information in addition to cell values. For this reason, you might want to add or insert rows based on existing rows that you have already styled. You can do this using the , , , and methods. + Rows include style information in addition to cell values. For this reason, you might want to add or insert rows based on existing rows that you have already styled. You can do this using the , , , and methods. - You can also use the collection to modify the values in the control or to remove rows. You can modify values or remove rows regardless of whether the control is bound to an external data source. If there is a data source, the changes are made directly to the data source. You may still need to push the data source updates to a remote database, however. For more information, see [How to: Bind Data to the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-bind-data-to-the-windows-forms-datagridview-control). + You can also use the collection to modify the values in the control or to remove rows. You can modify values or remove rows regardless of whether the control is bound to an external data source. If there is a data source, the changes are made directly to the data source. You may still need to push the data source updates to a remote database, however. For more information, see [How to: Bind Data to the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-bind-data-to-the-windows-forms-datagridview-control). The following example shows you how to modify cell values programmatically. @@ -20590,7 +20590,7 @@ this.dataGridView1.Rows[1].Cells[0].Value = "new value"; this.dataGridView1[0, 1].Value = "new value"; ``` - In addition to the standard collection capabilities, you can use the collection to retrieve information about rows. Use the method to determine the state of a particular row. Use the and methods to determine the number of rows or the combined height of rows in a particular state. To retrieve the index of a row with a particular state, use the , , , and methods. + In addition to the standard collection capabilities, you can use the collection to retrieve information about rows. Use the method to determine the state of a particular row. Use the and methods to determine the number of rows or the combined height of rows in a particular state. To retrieve the index of a row with a particular state, use the , , , and methods. The following example shows you how to retrieve the index of the first selected row, and then use it to programmatically delete the row. @@ -20616,7 +20616,7 @@ if (rowToDelete > -1) 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). ## Examples - The following code example demonstrates how to create an unbound ; set the , , and properties; and use the and properties. It also demonstrates how to use a version of the and methods to properly size the column headers and the rows. To run this example, paste the following code into a form that contains a named `dataGridView1` and a button named `Button1`, and then call the `InitializeDataGridView` method from the form's constructor or event handler. Ensure all events are connected with their event handlers. + The following code example demonstrates how to create an unbound ; set the , , and properties; and use the and properties. It also demonstrates how to use a version of the and methods to properly size the column headers and the rows. To run this example, paste the following code into a form that contains a named `dataGridView1` and a button named `Button1`, and then call the `InitializeDataGridView` method from the form's constructor or event handler. Ensure all events are connected with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewAutoSize/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView+HitTestInfo/Overview/form1.cs" id="Snippet2"::: @@ -20663,16 +20663,16 @@ if (rowToDelete > -1) method in a event handler. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. - When the user adds a new row using the row for new records, the value in the handler for this event is equal to the index of the new location of the row for new records, which is one greater than the row just added. When you add rows programmatically, however, the value is the index of the first row added. + When the user adds a new row using the row for new records, the value in the handler for this event is equal to the index of the new location of the row for new records, which is one greater than the row just added. When you add rows programmatically, however, the value is the index of the first row added. In virtual mode, this event occurs before the event and can be used to create new records in your data store that you can then populate in the event handler. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example handles the event to increment the number of rows in a virtual . The number of rows is used in the handler so it knows when to show a blank cell versus an initialized cell for a new row. This example is part of a larger example available in the reference topic. + The following code example handles the event to increment the number of rows in a virtual . The number of rows is used in the handler so it knows when to show a blank cell versus an initialized cell for a new row. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet20"::: @@ -20718,7 +20718,7 @@ if (rowToDelete > -1) control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in all rows, excluding header cells, the styles specified through the property override the styles specified through the and properties, and are overridden by the styles specified through the , , and properties. + The control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in all rows, excluding header cells, the styles specified through the property override the styles specified through the and properties, and are overridden by the styles specified through the , , and properties. For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -20778,7 +20778,7 @@ if (rowToDelete > -1) For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -20885,7 +20885,7 @@ if (rowToDelete > -1) For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -20937,11 +20937,11 @@ if (rowToDelete > -1) rows than what is provided by the various cell style properties. The property lets you create and initialize a for use as a template by all rows, including the row for new records if is `true`. + Sometimes you want greater control over the appearance of rows than what is provided by the various cell style properties. The property lets you create and initialize a for use as a template by all rows, including the row for new records if is `true`. This is useful when you are setting default values for properties such as row height. For example, you may want to increase the default row height in order to provide extra room beneath ordinary cell content for displaying content that spans multiple columns. - Setting the row template is necessary when external data is displayed using custom types derived from the class. With unbound controls, you can programmatically populate the collection with instances of your custom row type. When displaying external data, however, the rows are generated automatically, but they are based on the row template, which you can set to an instance of your custom row type. + Setting the row template is necessary when external data is displayed using custom types derived from the class. With unbound controls, you can programmatically populate the collection with instances of your custom row type. When displaying external data, however, the rows are generated automatically, but they are based on the row template, which you can set to an instance of your custom row type. If this property has not been set the first time you retrieve its value, a new is created and returned. @@ -21003,7 +21003,7 @@ if (rowToDelete > -1) For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -21156,7 +21156,7 @@ if (rowToDelete > -1) For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -21256,7 +21256,7 @@ if (rowToDelete > -1) Conversely, when the is in row-selection mode and this method is called, each row's property is set to `true`, and each column's property is set to `false`. ## Examples - The following code example demonstrates the use of the method. To run this example, paste the code into a form that contains a named `dataGridView1` and a named `selectAllButton`, and ensure all events are associated with their event handlers. + The following code example demonstrates the use of the method. To run this example, paste the code into a form that contains a named `dataGridView1` and a named `selectAllButton`, and ensure all events are associated with their event handlers. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellBeginEdit/datagridviewmisc.cs" id="Snippet180"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellBeginEdit/datagridviewmisc.vb" id="Snippet180"::: @@ -21307,7 +21307,7 @@ if (rowToDelete > -1) This property contains a read-only snapshot of the selection at the time it is referenced. If you hold onto a copy of this collection, it may differ from the actual, subsequent state in which the user may have changed the selection. Therefore, you should not operate on a copy of the collection. ## Examples - The following code example demonstrates how to use the collection to find the sum of the values in the selection. In the example, this collection is iterated through and the valid values are added to the sum, which is displayed in a label. This example is part of a larger example available in the event. + The following code example demonstrates how to use the collection to find the sum of the values in the selection. In the example, this collection is iterated through and the valid values are added to the sum, which is displayed in a label. This example is part of a larger example available in the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidated/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidated/form1.vb" id="Snippet10"::: @@ -21358,7 +21358,7 @@ if (rowToDelete > -1) This property contains a read-only snapshot of the selection at the time it is referenced. If you hold onto a copy of this collection, it may differ from the actual, subsequent state in which the user may have changed the selection. Therefore, you should not operate on a copy of the collection. ## Examples - The following code example demonstrates how to use the property to get the selected column in a programmatic sort. In this example, this property is used in the method to determine the direction of the sort. + The following code example demonstrates how to use the property to get the selected column in a programmatic sort. In this example, this property is used in the method to determine the direction of the sort. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SelectedColumns/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SelectedColumns/form1.vb" id="Snippet10"::: @@ -21411,7 +21411,7 @@ if (rowToDelete > -1) To programmatically select a row, set its property to `true`. ## Examples - The following code example demonstrates how to use the property in the event. In this example, if the first row is contained in the collection, then the deletion is canceled. This example is part of a larger example available in the event. + The following code example demonstrates how to use the property in the event. In this example, if the first row is contained in the collection, then the deletion is canceled. This example is part of a larger example available in the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidated/form1.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidated/form1.vb" id="Snippet20"::: @@ -21525,7 +21525,7 @@ if (rowToDelete > -1) Changing the value of the property clears the current selection. ## Examples - The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. + The following code example demonstrates how to set the , , , , , , , , , and properties. In addition, the code example demonstrates how to set the and properties. To run this example, paste the code into a form that contains a named `dataGridView1`, and then call the `SetUpDataGridView` method from the form's constructor or event handler. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -21965,7 +21965,7 @@ if (rowToDelete > -1) property indicates if there is an error in one of the cells in a row. If is set to a value other than , then an error glyph (![ErrorProvider icon](~/add/media/vberrorprovidericon.gif "ErrorProvider icon")) is shown in the row header. + The property indicates if there is an error in one of the cells in a row. If is set to a value other than , then an error glyph (![ErrorProvider icon](~/add/media/vberrorprovidericon.gif "ErrorProvider icon")) is shown in the row header. The default width of the row header includes enough room to display the error glyph, whether or not the glyph is displayed. If the row header size is adjusted so that there is not enough space to display the glyph completely, the glyph is not rendered. @@ -22035,7 +22035,7 @@ if (rowToDelete > -1) Calling this method automatically sets the property to `null`. ## Examples - The following code example demonstrates how to use the method overload in a multiple column sort scenario. In this example, the interface is implemented in the `RowComparer` class. + The following code example demonstrates how to use the method overload in a multiple column sort scenario. In this example, the interface is implemented in the `RowComparer` class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/Sort/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/Sort/form1.vb" id="Snippet10"::: @@ -22088,9 +22088,9 @@ if (rowToDelete > -1) by comparing values in the specified column. By default, the sort operation will use the method to compare pairs of cells in the column using the property. + This method sorts the contents of the by comparing values in the specified column. By default, the sort operation will use the method to compare pairs of cells in the column using the property. - For columns with the property set to , the and properties are set automatically and the appropriate sorting glyph is displayed. For columns with the property set to , you must display the sorting glyph yourself through the property. + For columns with the property set to , the and properties are set automatically and the appropriate sorting glyph is displayed. For columns with the property set to , you must display the sorting glyph yourself through the property. You can customize the sorting operation used by this method by handling the event. This event occurs only when the property has not been set. @@ -22099,7 +22099,7 @@ if (rowToDelete > -1) If your control contains both bound and unbound columns, you must implement virtual mode to maintain the values of the unbound columns when the control is sorted by a bound column. You can do this by setting the property to `true` and handling the event. If the column is editable, you should also handle the event. For more information about virtual mode, see [How to: Implement Virtual Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-implement-virtual-mode-in-the-windows-forms-datagridview-control). Sorting by unbound columns when the control is data-bound is not supported. ## Examples - The following code example demonstrates how to use the in a programmatic sort. + The following code example demonstrates how to use the in a programmatic sort. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SelectedColumns/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SelectedColumns/form1.vb" id="Snippet10"::: @@ -22167,9 +22167,9 @@ if (rowToDelete > -1) ## Remarks This event occurs only when the property is not set and the property value is `false`. - This event compares pairs of cells in the column being sorted. It occurs only when the user clicks the header of a column with a property value of , or when you call the overload. When this event occurs for a column with a property value of , you must display the sorting glyph yourself through the property. + This event compares pairs of cells in the column being sorted. It occurs only when the user clicks the header of a column with a property value of , or when you call the overload. When this event occurs for a column with a property value of , you must display the sorting glyph yourself through the property. - You can use this event to sort rows using the cell values in one column or in multiple columns. Use the and properties to compare cell values in the column specified in the property. Use the and properties to access values in other columns through the collection. + You can use this event to sort rows using the cell values in one column or in multiple columns. Use the and properties to compare cell values in the column specified in the property. Use the and properties to access values in other columns through the collection. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -22295,7 +22295,7 @@ if (rowToDelete > -1) When the column has a property value of , you must display the sorting glyph yourself through the property. > [!NOTE] -> The value of this property is not meaningful when you sort the control using custom sorting. For more information about custom sorting, see the method and the event. +> The value of this property is not meaningful when you sort the control using custom sorting. For more information about custom sorting, see the method and the event. ## Examples The following code example demonstrates how to use the property in a programmatic sort. @@ -22351,7 +22351,7 @@ if (rowToDelete > -1) This property is used to determine which sorting glyph appears when the column specified by the property has a property value of . When the column has a property value of , you must display and hide the sorting glyph yourself through the property. When the column has a property value of , you can display the sorting glyph, but space is not reserved for it if the column is automatically resized. > [!NOTE] -> The value of this property is not meaningful when you sort the control using custom sorting. For more information about custom sorting, see the method and the event. +> The value of this property is not meaningful when you sort the control using custom sorting. For more information about custom sorting, see the method and the event. ## Examples The following code example demonstrates how to use the property in a programmatic sort. @@ -22410,7 +22410,7 @@ if (rowToDelete > -1) |Key combination|Result| |---------------------|------------| |TAB|If the property is `false`, the focus moves to the next cell in the row. If the focus is in the last cell in the row, the focus moves to the first cell in the next row. If the focus is in the last cell in the , the focus moves to the next control in the tab order.| -|SHIFT+TAB|If is `false`, the focus moves to the previous cell in the row. If the focus is in the first cell in the row, the focus moves to the last cell in the previous row. If the focus is in the first cell in the , the focus moves to the previous control in the tab order.| +|SHIFT+TAB|If is `false`, the focus moves to the previous cell in the row. If the focus is in the first cell in the row, the focus moves to the last cell in the previous row. If the focus is in the first cell in the , the focus moves to the previous control in the tab order.| |CTRL+TAB|The focus moves to the next control in the tab order.| ]]> @@ -23064,7 +23064,7 @@ if (rowToDelete > -1) For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -23350,7 +23350,7 @@ if (rowToDelete > -1) method on the base class. + For more information, see the method on the base class. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewAdvancedBorderStyle.xml b/xml/System.Windows.Forms/DataGridViewAdvancedBorderStyle.xml index ccf18ab2928..3be5f7cf6d4 100644 --- a/xml/System.Windows.Forms/DataGridViewAdvancedBorderStyle.xml +++ b/xml/System.Windows.Forms/DataGridViewAdvancedBorderStyle.xml @@ -37,12 +37,12 @@ control allows you to fully customize its appearance, including the borders of the cells and headers. The has , , and properties that allow you to set the appearance of the cell border. However, if you need to further customize the borders, the class allows you to set the style of the border on the individual sides of the cells. The , , , and properties of represent the left, right, top, and bottom border of a cell, respectively. You can set these properties on the , , properties of the to produce various appearances for the borders between the cells. + The control allows you to fully customize its appearance, including the borders of the cells and headers. The has , , and properties that allow you to set the appearance of the cell border. However, if you need to further customize the borders, the class allows you to set the style of the border on the individual sides of the cells. The , , , and properties of represent the left, right, top, and bottom border of a cell, respectively. You can set these properties on the , , properties of the to produce various appearances for the borders between the cells. ## Examples - The following code example adjusts the cell borders of a so that a double border separates the interior cells and the top left header cell from the row and column headers. This sample demonstrates how to override the , , and methods, and the property. These members use objects to modify individual cell borders. + The following code example adjusts the cell borders of a so that a double border separates the interior cells and the top left header cell from the row and column headers. This sample demonstrates how to override the , , and methods, and the property. These members use objects to modify individual cell borders. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.vb" id="Snippet0"::: @@ -130,7 +130,7 @@ , , , and properties are not set to the same value, the property value is . + If the , , , and properties are not set to the same value, the property value is . ]]> @@ -457,7 +457,7 @@ method returns a string that includes the values for the , , , , and properties. + The method returns a string that includes the values for the , , , , and properties. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnMode.xml b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnMode.xml index 4b8b9bc7947..859eb0e088e 100644 --- a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnMode.xml +++ b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnMode.xml @@ -32,7 +32,7 @@ Content-based automatic resizing prevents users from adjusting column widths with the mouse. User resizing is enabled in fill mode, however. - This enumeration is used by the and properties of columns and the method. + This enumeration is used by the and properties of columns and the method. For more information about sizing modes, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). For more information about column fill mode in particular, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). diff --git a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnModeEventArgs.xml b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnModeEventArgs.xml index e4d884b3f76..ee4fdcada9c 100644 --- a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnModeEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnModeEventArgs.xml @@ -191,7 +191,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsMode.xml b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsMode.xml index befc08e03fc..2dd0652fc57 100644 --- a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsMode.xml +++ b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsMode.xml @@ -32,7 +32,7 @@ Content-based automatic resizing prevents users from adjusting column widths with the mouse. User resizing is enabled in fill mode, however. - This enumeration is used by the control property and method. + This enumeration is used by the control property and method. For more information about sizing modes, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). For more information about column fill mode in particular, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). diff --git a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsModeEventArgs.xml b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsModeEventArgs.xml index ffeab4018a2..5afdd1c8129 100644 --- a/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsModeEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewAutoSizeColumnsModeEventArgs.xml @@ -40,7 +40,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -139,7 +139,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewAutoSizeModeEventArgs.xml b/xml/System.Windows.Forms/DataGridViewAutoSizeModeEventArgs.xml index 8828b3370d5..5bd48b18bd1 100644 --- a/xml/System.Windows.Forms/DataGridViewAutoSizeModeEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewAutoSizeModeEventArgs.xml @@ -141,12 +141,12 @@ class is used with the and events, so this property relates specifically to the previous state of either the or property + The class is used with the and events, so this property relates specifically to the previous state of either the or property ## Examples - The following code example uses the property to check the previous value for a . This code example is part of a larger example provided at [How to: Automatically Resize Cells When Content Changes in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/automatically-resize-cells-when-content-changes-in-the-datagrid). + The following code example uses the property to check the previous value for a . This code example is part of a larger example provided at [How to: Automatically Resize Cells When Content Changes in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/automatically-resize-cells-when-content-changes-in-the-datagrid). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.AutoSizing/CPP/autosizing.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoSizeRowsMode/autosizing.cs" id="Snippet10"::: diff --git a/xml/System.Windows.Forms/DataGridViewAutoSizeRowMode.xml b/xml/System.Windows.Forms/DataGridViewAutoSizeRowMode.xml index 6a243549347..3fa481f6789 100644 --- a/xml/System.Windows.Forms/DataGridViewAutoSizeRowMode.xml +++ b/xml/System.Windows.Forms/DataGridViewAutoSizeRowMode.xml @@ -30,7 +30,7 @@ Content-based automatic resizing prevents users from adjusting row heights with the mouse. - This enumeration is used by the control method. + This enumeration is used by the control method. For more information about sizing modes, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). diff --git a/xml/System.Windows.Forms/DataGridViewAutoSizeRowsMode.xml b/xml/System.Windows.Forms/DataGridViewAutoSizeRowsMode.xml index 03988926a40..a7e4cd8fc20 100644 --- a/xml/System.Windows.Forms/DataGridViewAutoSizeRowsMode.xml +++ b/xml/System.Windows.Forms/DataGridViewAutoSizeRowsMode.xml @@ -30,7 +30,7 @@ Content-based automatic resizing prevents users from adjusting row heights with the mouse. - This enumeration is used by the control property and method. + This enumeration is used by the control property and method. For more information about sizing modes, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). diff --git a/xml/System.Windows.Forms/DataGridViewBand.xml b/xml/System.Windows.Forms/DataGridViewBand.xml index c7bccd40836..50164bcc1be 100644 --- a/xml/System.Windows.Forms/DataGridViewBand.xml +++ b/xml/System.Windows.Forms/DataGridViewBand.xml @@ -375,10 +375,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> @@ -470,11 +470,11 @@ . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. + This method overrides . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). - When called by the garbage collector, this method calls the method. + When called by the garbage collector, this method calls the method. ]]> @@ -678,7 +678,7 @@ at run time (assuming the property is set to `true`), the value of the property of each column will not change. Instead, the column values change. Sorting rows, however, does change their values. + The value of this property does not necessarily correspond to the current visual position of the band within the collection. For example, if the user reorders columns in a at run time (assuming the property is set to `true`), the value of the property of each column will not change. Instead, the column values change. Sorting rows, however, does change their values. @@ -923,9 +923,9 @@ properties. By default, the property value is based on the property value for columns and the property value for rows. If you explicitly set to or , however, the control value is ignored. Set to to restore the inheritance. + You can prevent users from resizing individual rows or columns by setting their properties. By default, the property value is based on the property value for columns and the property value for rows. If you explicitly set to or , however, the control value is ignored. Set to to restore the inheritance. - Because restores the value inheritance, the property will never return a value unless the row or column has not been added to a control. If you need to determine whether the property value of a row or column is inherited, check its property. If the value includes the flag, the property value is not inherited. If the property value is , the user will not be able to manually adjust band size. + Because restores the value inheritance, the property will never return a value unless the row or column has not been added to a control. If you need to determine whether the property value of a row or column is inherited, check its property. If the value includes the flag, the property value is not inherited. If the property value is , the user will not be able to manually adjust band size. @@ -1106,7 +1106,7 @@ method. The returned string contains the class's name and property. + This method overrides the method. The returned string contains the class's name and property. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewBindingCompleteEventArgs.xml b/xml/System.Windows.Forms/DataGridViewBindingCompleteEventArgs.xml index 7870ab7fd22..9f05dea881a 100644 --- a/xml/System.Windows.Forms/DataGridViewBindingCompleteEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewBindingCompleteEventArgs.xml @@ -27,14 +27,14 @@ event is raised when the contents of the data source change or when the value of the , , or property of the control changes. + The event is raised when the contents of the data source change or when the value of the , , or property of the control changes. This class describes the change made by the to its underlying list. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -130,7 +130,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewBindingCompleteEventHandler.xml b/xml/System.Windows.Forms/DataGridViewBindingCompleteEventHandler.xml index b14364b6bee..5bf7ab51c4c 100644 --- a/xml/System.Windows.Forms/DataGridViewBindingCompleteEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewBindingCompleteEventHandler.xml @@ -43,7 +43,7 @@ event is raised when the contents of the data source change or when the value of the , , or property of the control changes. + The event is raised when the contents of the data source change or when the value of the , , or property of the control changes. When you create a 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/). diff --git a/xml/System.Windows.Forms/DataGridViewButtonCell+DataGridViewButtonCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewButtonCell+DataGridViewButtonCellAccessibleObject.xml index 03d6e30f236..7e24bb8dedb 100644 --- a/xml/System.Windows.Forms/DataGridViewButtonCell+DataGridViewButtonCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewButtonCell+DataGridViewButtonCellAccessibleObject.xml @@ -36,12 +36,12 @@ The class inherits from the class to provide information about the to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -166,7 +166,7 @@ method causes the button in the to be clicked. + The method causes the button in the to be clicked. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewButtonCell.xml b/xml/System.Windows.Forms/DataGridViewButtonCell.xml index 787836fc614..a0c546cb483 100644 --- a/xml/System.Windows.Forms/DataGridViewButtonCell.xml +++ b/xml/System.Windows.Forms/DataGridViewButtonCell.xml @@ -39,14 +39,14 @@ ## Remarks The class is a specialized type of used to display a button-like UI. - is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. + is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. To respond to user button clicks, handle the or event. In the event handler, you can use the property to determine whether the click occurred a the button column. You can use the property to determine whether the click occurred in a particular button cell. The cell-related properties of the column are wrappers for the similarly-named properties of the template cell. Changing the property values of the template cell will affect only cells based on the template that are added after the change. Changing the cell-related property values of the column, however, will update the template cell and all other cells in the column, and refresh the column display if necessary. > [!NOTE] -> When visual styles are enabled, the buttons in a button column are painted using a , and cell styles specified through properties such as have no effect. +> When visual styles are enabled, the buttons in a button column are painted using a , and cell styles specified through properties such as have no effect. @@ -131,7 +131,7 @@ method whenever you derive from and add new properties to the derived class. + Override the method whenever you derive from and add new properties to the derived class. ]]> @@ -172,7 +172,7 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the Accessibility assembly installed with the .NET Framework. @@ -520,7 +520,7 @@ method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + The method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -569,7 +569,7 @@ method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + The method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -616,7 +616,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -663,7 +663,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -709,7 +709,7 @@ method is called just before the method. must return `true` if the call to has the effect of unsharing the row specified by `rowIndex`. It should return `false` otherwise. + The method is called just before the method. must return `true` if the call to has the effect of unsharing the row specified by `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -756,7 +756,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row. It should return `false` otherwise. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -805,7 +805,7 @@ ## Remarks When activated by the SPACE key, this method updates the cell's user interface (UI). - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -857,9 +857,9 @@ and events on the owning . + When activated by the SPACE key, this method updates the cell's user interface (UI) and raises the and events on the owning . - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -914,7 +914,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -962,7 +962,7 @@ ## Remarks If activated by depressing the left mouse button, this method updates the cell's user interface (UI). - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1012,7 +1012,7 @@ ## Remarks If the cell's button is not in its normal state, this method causes the cell's user interface (UI) to be updated. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1058,7 +1058,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1105,7 +1105,7 @@ ## Remarks If activated by the left mouse button, this method updates the cell's user interface (UI). - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1269,7 +1269,7 @@ of a button cell is displayed as text on the button. The property allows you to either set the button text for each cell, or to use the property value of the parent column for all of the button cells. + The of a button cell is displayed as text on the button. The property allows you to either set the button text for each cell, or to use the property value of the parent column for all of the button cells. Setting the property of the owning column also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. diff --git a/xml/System.Windows.Forms/DataGridViewButtonColumn.xml b/xml/System.Windows.Forms/DataGridViewButtonColumn.xml index 8770a830978..28deefc5a88 100644 --- a/xml/System.Windows.Forms/DataGridViewButtonColumn.xml +++ b/xml/System.Windows.Forms/DataGridViewButtonColumn.xml @@ -54,7 +54,7 @@ To respond to user button clicks, handle the or event. In the event handler, you can use the property to determine whether the click occurred in the button column. You can use the property to determine whether the click occurred in a button cell and not on the column header. > [!NOTE] -> When visual styles are enabled, the buttons in a button column are painted using a , and cell styles specified through properties such as have no effect. +> When visual styles are enabled, the buttons in a button column are painted using a , and cell styles specified through properties such as have no effect. @@ -109,7 +109,7 @@ |Property|Value| |--------------|-----------| -||A new .| +||A new .| |The property of the object returned by the property.|| ]]> @@ -166,7 +166,7 @@ The constructor for the class initializes this property to a newly created . > [!CAUTION] -> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). +> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). @@ -273,7 +273,7 @@ The default returned by this property has an initial property value of . This value overrides the value specified in the property of the control, but may be overridden by other cell style properties. For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). > [!NOTE] -> When visual styles are enabled, the buttons in a button column are painted using a and cell styles specified through properties such as have no effect. +> When visual styles are enabled, the buttons in a button column are painted using a and cell styles specified through properties such as have no effect. @@ -506,7 +506,7 @@ of a button cell is displayed as the text on the button. The property allows you to either set the button text for each cell, or to use the property value for all of the button cells. + By default, the of a button cell is displayed as the text on the button. The property allows you to either set the button text for each cell, or to use the property value for all of the button cells. Getting or setting this property gets or sets the property of the object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. diff --git a/xml/System.Windows.Forms/DataGridViewCell+DataGridViewCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewCell+DataGridViewCellAccessibleObject.xml index 50f9efb0694..7fc19c5ed82 100644 --- a/xml/System.Windows.Forms/DataGridViewCell+DataGridViewCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewCell+DataGridViewCellAccessibleObject.xml @@ -40,12 +40,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -314,7 +314,7 @@ method returns an only if the that owns the is in edit mode and `index` is 0. + The method returns an only if the that owns the is in edit mode and `index` is 0. ]]> @@ -531,16 +531,16 @@ owns the that is returned by the method for each parameter value. + The following table describes which owns the that is returned by the method for each parameter value. |Parameter value|Description| |---------------------|-----------------| -||The to the right of the current cell. returns `null` if the current cell is in the right-most column.| -||The to the left of the current cell. returns an accessible object for the row header if the current cell is in the left-most column.| -||The that has the next higher index. returns `null` if the current cell is in the first column.| -||The that has the next lower index. returns `null` if the current cell is in the last column.| -||The in the same column and one row above the current cell. returns `null` if the current cell is in the first row.| -||The in the same column and one row below the current cell. returns `null` if the current cell is in the last row.| +||The to the right of the current cell. returns `null` if the current cell is in the right-most column.| +||The to the left of the current cell. returns an accessible object for the row header if the current cell is in the left-most column.| +||The that has the next higher index. returns `null` if the current cell is in the first column.| +||The that has the next lower index. returns `null` if the current cell is in the last column.| +||The in the same column and one row above the current cell. returns `null` if the current cell is in the first row.| +||The in the same column and one row below the current cell. returns `null` if the current cell is in the last row.| |All other values|`null`.| ]]> @@ -703,7 +703,7 @@ method for each `flags` value. + The following table describes the action performed by the method for each `flags` value. |Parameter value|Action| |---------------------|------------| @@ -793,13 +793,13 @@ property contains a string that represents the value of the cell property. If is `null`, contains the string "(null)". + The property contains a string that represents the value of the cell property. If is `null`, contains the string "(null)". Setting this property has no effect if the owning cell is a header cell, is read-only, or does not belong to a row. Otherwise, setting this property: - Ends any edit currently in progress and commits the value. -- Uses the cell and methods to convert the specified value to the type indicated by the cell property. +- Uses the cell and methods to convert the specified value to the type indicated by the cell property. - Sets the cell value to the converted value. diff --git a/xml/System.Windows.Forms/DataGridViewCell.xml b/xml/System.Windows.Forms/DataGridViewCell.xml index ab894fcf44c..6605124b34d 100644 --- a/xml/System.Windows.Forms/DataGridViewCell.xml +++ b/xml/System.Windows.Forms/DataGridViewCell.xml @@ -48,7 +48,7 @@ class represents an individual cell in a control. You can retrieve cells through the collection of a . + The class represents an individual cell in a control. You can retrieve cells through the collection of a . The row and column for a identify the cell's location in the . A typical cell contains data specific to the row and column in which it is contained. The cell can be customized in a number of ways by setting its properties and handling the events associated with it. @@ -133,7 +133,7 @@ method. + To control the instance returned from this method, override the method. If no is currently assigned to the control, a new instance of one is created. @@ -201,14 +201,14 @@ control internally calls the method to determine the appearance of the cell borders. The control typically uses the value of the property for the `dataGridViewAdvancedBorderStyleInput` parameter. + The control internally calls the method to determine the appearance of the cell borders. The control typically uses the value of the property for the `dataGridViewAdvancedBorderStyleInput` parameter. The value is not supported as an input style for cells. ## Examples - The following code example demonstrates how to override the method to customize the borders of the cells. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to customize the borders of the cells. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.vb" id="Snippet20"::: @@ -265,12 +265,12 @@ - The or values increase the default width by 1 pixel. - In addition, if the property is set for the cell's owning row, the rectangle's height is increased by the value of . If the property is set for the cell's owning column, the rectangle's width will be increased by the value of . + In addition, if the property is set for the cell's owning row, the rectangle's height is increased by the value of . If the property is set for the cell's owning column, the rectangle's width will be increased by the value of . ## Examples - The following code example demonstrates how to use the method of the class to determine the available drawing area in a cell. This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). + The following code example demonstrates how to use the method of the class to determine the available drawing area in a cell. This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CommitEdit/form1.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CommitEdit/form1.vb" id="Snippet20"::: @@ -317,7 +317,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -362,7 +362,7 @@ method whenever you derive from the class and add new properties to the derived class. + Override the method whenever you derive from the class and add new properties to the derived class. ]]> @@ -456,9 +456,9 @@ ## Remarks The returned rectangle reports client coordinates, in pixels. - This property calls the method to get its value. For the base type, this value is . + This property calls the method to get its value. For the base type, this value is . - To get the bounding rectangle of the cell rather than the cell contents, use the method. + To get the bounding rectangle of the cell rather than the cell contents, use the method. ]]> @@ -511,7 +511,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -557,7 +557,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -617,7 +617,7 @@ When the control property is set or its property is `true`, getting the value of the property raises the event of the control and returns the value of the property as specified in the event handler. If there are no handlers for the event, getting the value of the property returns the previously specified value or its default value of `null`. - Handling the event is primarily useful when working with large amounts of data to avoid performance penalties when setting the cell 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). + Handling the event is primarily useful when working with large amounts of data to avoid performance penalties when setting the cell 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). Changing this property raises the event on the owning , if one exists. @@ -667,10 +667,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -776,7 +776,7 @@ calls this method when the current cell hosts an editing control and editing mode ends. This method removes the from the , and then removes the from the collection of the . + The calls this method when the current cell hosts an editing control and editing mode ends. This method removes the from the , and then removes the from the collection of the . ]]> @@ -883,10 +883,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> @@ -977,7 +977,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the cell's row. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1164,7 +1164,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1221,7 +1221,7 @@ When the property is `false`, the value of this property is . - This property calls the method to get its value. For the base type, this value is always . + This property calls the method to get its value. For the base type, this value is always . ]]> @@ -1284,7 +1284,7 @@ When the property of the is `true`, you can provide error text for rows and cells using the and events. - When you assign a different string to a cell, the event of the control is raised. + When you assign a different string to a cell, the event of the control is raised. Starting with the .NET Framework 4.5.2, resizing of the error icon is determined by the system DPI setting when the app.config file contains the following entry: @@ -1345,9 +1345,9 @@ method with `false` as a parameter. + This method calls the method with `false` as a parameter. - This method overrides . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. + This method overrides . Application code should not call this method; an object's `Finalize` method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). @@ -1397,16 +1397,16 @@ property is the actual data object contained by the cell, whereas the is the formatted representation of this object. The and properties correspond to the data types of these values, respectively. + The property is the actual data object contained by the cell, whereas the is the formatted representation of this object. The and properties correspond to the data types of these values, respectively. - Getting the value of this property calls the method to convert the cell value into an equivalent display value of the type indicated by the property. This raises the event, which you can handle to customize the value conversion. + Getting the value of this property calls the method to convert the cell value into an equivalent display value of the type indicated by the property. This raises the event, which you can handle to customize the value conversion. If formatting is unsuccessful, the event occurs. If there is no handler for this event or the handler sets the property to `true`, an exception is thrown. ## Examples - The following code example demonstrates how to use the property. In this example, the property is used to determine if the current cell's contents have been edited and not committed and, if the cell has been modified, the is used. This example is part of a larger example available in the event. + The following code example demonstrates how to use the property. In this example, the property is used to determine if the current cell's contents have been edited and not committed and, if the cell has been modified, the is used. This example is part of a larger example available in the event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidated/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidated/form1.vb" id="Snippet10"::: @@ -1473,7 +1473,7 @@ property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. + The property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. @@ -1587,9 +1587,9 @@ method to retrieve a Clipboard-formatted value that represents the cell value. + This method is called by the method to retrieve a Clipboard-formatted value that represents the cell value. - The cell value is first retrieved in its display format from the method. This may raise the event to format the value and the event if formatting is unsuccessful. + The cell value is first retrieved in its display format from the method. This may raise the event to format the value and the event if formatting is unsuccessful. The position-related parameters of this method indicate where this cell is located in the table of data representing the region defined by the selected cells in the control. Depending on the cell's position, additional formatting information may be returned by this method along with the display-formatted cell value. For example, the HTML format for a cell in the first column of a row will include the tag that indicates the beginning of a row. @@ -1909,7 +1909,7 @@ This method raises the event. A handler for this event can modify both the `value` and `cellStyle` parameters. If the handler does not set the property to `true`, however, this method formats `value` using the formatting properties of the `cellStyle` object. > [!NOTE] -> This method does not convert `value` to the property value for values equal to the property value when is set to a value other than or `null`. In this case, you can handle the event to display the property value. For more information, see the code example in . +> This method does not convert `value` to the property value for values equal to the property value when is set to a value other than or `null`. In this case, you can handle the event to display the property value. For more information, see the code example in . If formatting is unsuccessful, the event occurs. If there is no handler for this event or the handler sets the property to `true`, an exception is thrown. @@ -1967,17 +1967,17 @@ ## Remarks If the cell does not have an associated , it will inherit one from its parents, using the following precedence: -1. This cell's +1. This cell's -2. The owning row's +2. The owning row's -3. The owning column's +3. The owning column's 4. The parent table's - Shortcut menus are Microsoft Windows native resources whose lifetimes are typically directed by the method or the destructor. + Shortcut menus are Microsoft Windows native resources whose lifetimes are typically directed by the method or the destructor. - Pass the method the row index you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is not a valid value for `rowIndex`. + Pass the method the row index you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is not a valid value for `rowIndex`. ]]> @@ -2026,7 +2026,7 @@ values of -1, which prevents you from using the property with cells in shared rows. To use this method, pass in the actual index of the row containing this cell. You can retrieve the actual index of a shared row by calling the method. + This method is useful to determine the state of a cell in a shared row. Shared rows have values of -1, which prevents you from using the property with cells in shared rows. To use this method, pass in the actual index of the row containing this cell. You can retrieve the actual index of a shared row by calling the method. ]]> @@ -2144,7 +2144,7 @@ method in the base class always returns a with a width and height of -1. However, this method is overridden in the derived cell classes to return proper values. + The method in the base class always returns a with a width and height of -1. However, this method is overridden in the derived cell classes to return proper values. ]]> @@ -2229,7 +2229,7 @@ method the row index you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is not a valid value for `rowIndex`. + Pass the method the row index you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is not a valid value for `rowIndex`. ]]> @@ -2442,14 +2442,14 @@ share a single hosted editing control. However, before the control is used by a cell, it needs to be initialized by the method. The first time it is called, this method adds the control to the list of editing controls in its parent . It also initializes some of the visual properties of the cell. For example, sets the background color of the editing area to match the supplied cell style parameter. Subsequent calls to do nothing. + As an optimization technique, typically all the cells of the same type and in the same share a single hosted editing control. However, before the control is used by a cell, it needs to be initialized by the method. The first time it is called, this method adds the control to the list of editing controls in its parent . It also initializes some of the visual properties of the cell. For example, sets the background color of the editing area to match the supplied cell style parameter. Subsequent calls to do nothing. Derived classes use this method to host an instance of the class corresponding to their type. For example, a table that contains one or more objects calls this method to add a single editing control to the owning . ## Examples - The following code example demonstrates how to override the method in a simple class that derives from the class. This example is part of a larger code example provided in [How to: Host Controls in Windows Forms DataGridView Cells](/dotnet/desktop/winforms/controls/how-to-host-controls-in-windows-forms-datagridview-cells). + The following code example demonstrates how to override the method in a simple class that derives from the class. This example is part of a larger code example provided in [How to: Host Controls in Windows Forms DataGridView Cells](/dotnet/desktop/winforms/controls/how-to-host-controls-in-windows-forms-datagridview-cells). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/EditingControl/datagridviewcalendarcolumn.cs" id="Snippet200"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/EditingControl/datagridviewcalendarcolumn.vb" id="Snippet200"::: @@ -2545,7 +2545,7 @@ method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -2639,7 +2639,7 @@ method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -2690,7 +2690,7 @@ method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -2743,7 +2743,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3155,7 +3155,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3208,7 +3208,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3253,7 +3253,7 @@ method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3307,7 +3307,7 @@ method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3359,7 +3359,7 @@ method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3411,7 +3411,7 @@ method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3463,7 +3463,7 @@ method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. + The method is called just before the method. In derived classes, it must return `true` if the call to has the effect of unsharing the row containing the cell. Otherwise, it should return `false`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -3513,7 +3513,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3555,7 +3555,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3597,7 +3597,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3670,7 +3670,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3715,7 +3715,7 @@ method. It is called in the same circumstances in which an event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which an event is raised, but it does not actually raise the event. ]]> @@ -3761,7 +3761,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3806,7 +3806,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3852,7 +3852,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3899,7 +3899,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -3943,7 +3943,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. @@ -3998,7 +3998,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -4048,7 +4048,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -4098,7 +4098,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. @@ -4155,7 +4155,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. @@ -4212,7 +4212,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -4262,7 +4262,7 @@ method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -4456,7 +4456,7 @@ method of a . This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). + The following code example demonstrates how to override the method of a . This code example is part of a larger example provided in [How to: Disable Buttons in a Button Column in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/disable-buttons-in-a-button-column-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CommitEdit/form1.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CommitEdit/form1.vb" id="Snippet20"::: @@ -4576,7 +4576,7 @@ , the method does nothing. + The `errorText` parameter signals the existence of an error. If `errorText` is `null` or , the method does nothing. ]]> @@ -4635,15 +4635,15 @@ control calls this method to convert the displayed value from the to the . The control then sets the underlying cell value or data source value to the converted value. + When the user edits a cell value and commits the change, the control calls this method to convert the displayed value from the to the . The control then sets the underlying cell value or data source value to the converted value. - The default implementation of this method parses the `formattedValue` parameter using the , , and properties of the cell style indicated by the `cellStyle` parameter. + The default implementation of this method parses the `formattedValue` parameter using the , , and properties of the cell style indicated by the `cellStyle` parameter. - If `formattedValue` is equal to , this method returns the value of the property or `null` if is and the cell is a reference type. + If `formattedValue` is equal to , this method returns the value of the property or `null` if is and the cell is a reference type. - If `formattedValue` is not equal to , this method parses `formattedValue` using the property and the specified or default converters. + If `formattedValue` is not equal to , this method parses `formattedValue` using the property and the specified or default converters. - If the cell is nullable, this method wraps the return value as a type. + If the cell is nullable, this method wraps the return value as a type. ]]> @@ -4737,7 +4737,7 @@ class, such as , host a control in the selected cell. The method positions the editing control inside of the host cell. Because the editing control may take up more space than a single cell, it may need to be positioned differently when editing a cell in the first visible column or first visible row so it does not paint outside the . + Some classes derived from the class, such as , host a control in the selected cell. The method positions the editing control inside of the host cell. Because the editing control may take up more space than a single cell, it may need to be positioned differently when editing a cell in the first visible column or first visible row so it does not paint outside the . ]]> @@ -4840,11 +4840,11 @@ property returns the natural size of the cell computed by the cell's owning row and column. returns a with a width and height of -1 if the cell is not contained in a table. + The property returns the natural size of the cell computed by the cell's owning row and column. returns a with a width and height of -1 if the cell is not contained in a table. If the cell is in a that has its property set to `false`, -1 is returned for the width. - This method relies on the method. + This method relies on the method. ]]> @@ -4904,11 +4904,11 @@ property indicates whether the data displayed by the cell can be edited. You can set for individual cells, or you can make an entire row or column of cells read-only by setting the or properties. By default, if a cell's parent row or column is set to read-only, the child cells will adopt the same value. You can override this default behavior by setting for individual cells. + The property indicates whether the data displayed by the cell can be edited. You can set for individual cells, or you can make an entire row or column of cells read-only by setting the or properties. By default, if a cell's parent row or column is set to read-only, the child cells will adopt the same value. You can override this default behavior by setting for individual cells. You can navigate to a read-only cell, and you can set a read-only cell to be the current cell. - only affects whether a cell is editable; it does not affect whether the user can delete rows. + only affects whether a cell is editable; it does not affect whether the user can delete rows. ]]> @@ -5334,7 +5334,7 @@ When the control property is set or its property is `true`, getting the value of the property raises the event of the control and returns the value of the property as specified in the event handler. If there are no handlers for the event, getting the value of the property returns the previously specified value or its default value of . - Handling the event is primarily useful when working with large amounts of data to avoid performance penalties when setting the cell 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). + Handling the event is primarily useful when working with large amounts of data to avoid performance penalties when setting the cell 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). Changing this property raises the event on the owning , if one exists. @@ -5388,7 +5388,7 @@ method for all the various cell types will return a string of the form shown in the following code example: + Unless otherwise noted, the method for all the various cell types will return a string of the form shown in the following code example: `Classname {RowIndex = #, ColumnIndex = #}` @@ -5440,9 +5440,9 @@ ## Remarks When you assign a different value to a cell, the event of the control is raised. - The property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. + The property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. - When you set the property, the specified value is not automatically converted from a formatted, display value to an underlying cell value. For example, the in effect for the cell is ignored, so setting to does not result in a property value of . + When you set the property, the specified value is not automatically converted from a formatted, display value to an underlying cell value. For example, the in effect for the cell is ignored, so setting to does not result in a property value of . @@ -5509,7 +5509,7 @@ ## Remarks If the property for the cell has not been set, the property for the owning column is used, if it exists. - The property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. + The property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. diff --git a/xml/System.Windows.Forms/DataGridViewCellCollection.xml b/xml/System.Windows.Forms/DataGridViewCellCollection.xml index 4c4f38d994d..34397a48228 100644 --- a/xml/System.Windows.Forms/DataGridViewCellCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewCellCollection.xml @@ -279,7 +279,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridViewCellCollection1`. Then ensure that the event handler is associated with the event. @@ -619,7 +619,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventArgs.xml index a63b507e93a..76455aade0b 100644 --- a/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventArgs.xml @@ -39,9 +39,9 @@ The event also occurs whenever the value of the property is retrieved, either programmatically or when the user right-clicks the cell. - You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). You can also specify shortcut menus for individual rows rather than individual cells by setting the row property or handling the control's event. The cell property setting overrides the row property setting, and the event overrides both the event and the row property setting. You can specify `null` for a cell shortcut menu, however, to prevent a row shortcut menu from being overridden. diff --git a/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventHandler.xml index 74ccbf0396e..77af7e061bd 100644 --- a/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellContextMenuStripNeededEventHandler.xml @@ -49,9 +49,9 @@ The event also occurs whenever the value of the property is retrieved, either programmatically or when the user right-clicks the cell. - You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). You can also specify shortcut menus for individual rows rather than individual cells by setting the row property or handling the control's event. The cell property setting overrides the row property setting, and the event overrides both the event and the row property setting. You can specify `null` for a cell shortcut menu, however, to prevent a row shortcut menu from being overridden. diff --git a/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventArgs.xml index 2c067399537..947ff7c79e2 100644 --- a/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventArgs.xml @@ -39,9 +39,9 @@ The event also occurs whenever the value of the property is retrieved. - You can use the and property to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and property to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). diff --git a/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventHandler.xml index 4b16c4486b9..b4c0b171bcb 100644 --- a/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellErrorTextNeededEventHandler.xml @@ -49,9 +49,9 @@ The event also occurs whenever the value of the property is retrieved. - You can use the and property to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and property to determine the state or value of a cell, and use this information to change or modify the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). diff --git a/xml/System.Windows.Forms/DataGridViewCellEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellEventHandler.xml index 39586570ff3..4d0bb3d7698 100644 --- a/xml/System.Windows.Forms/DataGridViewCellEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellEventHandler.xml @@ -82,7 +82,7 @@ ## Examples - The following code example demonstrates using and event handlers to determine whether a cell can be clicked. The example updates each to advertise the current image layout. This code is part of a larger example shown in [How to: Work with Image Columns in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-work-with-image-columns-in-the-windows-forms-datagridview-control). + The following code example demonstrates using and event handlers to determine whether a cell can be clicked. The example updates each to advertise the current image layout. This code is part of a larger example shown in [How to: Work with Image Columns in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-work-with-image-columns-in-the-windows-forms-datagridview-control). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ImageColumn_TicTacToe/CPP/tictactoe.cpp" id="Snippet15"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellClick/tictactoe.cs" id="Snippet15"::: diff --git a/xml/System.Windows.Forms/DataGridViewCellFormattingEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellFormattingEventArgs.xml index 953396bfa7e..d6110a20816 100644 --- a/xml/System.Windows.Forms/DataGridViewCellFormattingEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellFormattingEventArgs.xml @@ -35,11 +35,11 @@ ## Remarks Handle the event to customize the conversion of a cell value into a format suitable for display or to customize the appearance of a cell depending on its state or value. - The event occurs every time each cell is painted, so you should avoid lengthy processing when handling this event. This event also occurs when the cell is retrieved or its method is called. + The event occurs every time each cell is painted, so you should avoid lengthy processing when handling this event. This event also occurs when the cell is retrieved or its method is called. When you handle the event, the property is initialized with the cell value. If you provide custom conversion from the cell value to the display value, set the property to the converted value, ensuring that the new value is of the type specified by the cell property. To indicate that no further value formatting is necessary, set the property to `true`. - When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is formatted using the , , , and properties of the cell style returned by the property, which is initialized using the cell property. + When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is formatted using the , , , and properties of the cell style returned by the property, which is initialized using the cell property. Regardless of the value of the property, the display properties of the object returned by the property are used to render the cell. @@ -134,7 +134,7 @@ ## Remarks The `desiredType` parameter represents the type that the `value` parameter should be converted to, and `desiredType` is assigned the cell's property. For example, if a cell is formatting picture names as bitmaps, `value` is the that contains the picture name, and `desiredType` is a representing the type. - If the event handler does not set the property to a type that can be displayed by the cell, the cell contents will be formatted using the , , and properties. + If the event handler does not set the property to a type that can be displayed by the cell, the cell contents will be formatted using the , , and properties. @@ -214,7 +214,7 @@ ## Examples - The following code example demonstrates how to use the property to color the background of cells that contain the string "Pink" to . + The following code example demonstrates how to use the property to color the background of cells that contain the string "Pink" to . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet1"::: @@ -324,7 +324,7 @@ event, set the property to `true` after setting the property if no further value formatting is required. If the property value is `false` when the event handler exits, the formatting will be applied to the value as indicated by the , , , and properties of the object returned by the property. + When handling the event, set the property to `true` after setting the property if no further value formatting is required. If the property value is `false` when the event handler exits, the formatting will be applied to the value as indicated by the , , , and properties of the object returned by the property. diff --git a/xml/System.Windows.Forms/DataGridViewCellFormattingEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellFormattingEventHandler.xml index 53edb1f98b7..9d822532e51 100644 --- a/xml/System.Windows.Forms/DataGridViewCellFormattingEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellFormattingEventHandler.xml @@ -45,11 +45,11 @@ ## Remarks Handle the event to customize the conversion of a cell value into a format suitable for display or to customize the appearance of a cell depending on its state or value. - The event occurs every time each cell is painted, so you should avoid lengthy processing when handling this event. This event also occurs when the cell is retrieved or its method is called. + The event occurs every time each cell is painted, so you should avoid lengthy processing when handling this event. This event also occurs when the cell is retrieved or its method is called. When you handle the event, the property is initialized with the cell value. If you provide custom conversion from the cell value to the display value, set the property to the converted value, ensuring that the new value is of the type specified by the cell property. To indicate that no further value formatting is necessary, set the property to `true`. - When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is formatted using the , , , and properties of the cell style returned by the property, which is initialized using the cell property. + When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is formatted using the , , , and properties of the cell style returned by the property, which is initialized using the cell property. Regardless of the value of the property, the display properties of the object returned by the property are used to render the cell. diff --git a/xml/System.Windows.Forms/DataGridViewCellPaintingEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellPaintingEventArgs.xml index b8240ac8c94..33ad97fe164 100644 --- a/xml/System.Windows.Forms/DataGridViewCellPaintingEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellPaintingEventArgs.xml @@ -33,7 +33,7 @@ event is raised for each that is visible on a . To improve performance, set the properties in a to change the appearance of the cell instead of directly accessing a cell in the . If you manually paint the cell, set the property to `true`. If you do not set to `true`, the cell will paint over your customizations. + The event is raised for each that is visible on a . To improve performance, set the properties in a to change the appearance of the cell instead of directly accessing a cell in the . If you manually paint the cell, set the property to `true`. If you do not set to `true`, the cell will paint over your customizations. @@ -338,7 +338,7 @@ property represents the area of the that needs to be repainted. For example, if a user covers the entire with another window, and then uncovers it, then represents the entire . If a user covers a small area of the , and then uncovers it, then represents the small area that was covered. + The property represents the area of the that needs to be repainted. For example, if a user covers the entire with another window, and then uncovers it, then represents the entire . If a user covers a small area of the , and then uncovers it, then represents the small area that was covered. @@ -445,7 +445,7 @@ is a row header cell, the property is the same as the property of the . When the current cell is a data cell, is the same as the property of the . + When the current is a row header cell, the property is the same as the property of the . When the current cell is a data cell, is the same as the property of the . @@ -503,7 +503,7 @@ property contains the value of the cell after the or property has been applied to it, and after the event has been handled. + The property contains the value of the cell after the or property has been applied to it, and after the event has been handled. diff --git a/xml/System.Windows.Forms/DataGridViewCellParsingEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellParsingEventArgs.xml index 74b8b3618e5..66fc62c5f29 100644 --- a/xml/System.Windows.Forms/DataGridViewCellParsingEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellParsingEventArgs.xml @@ -35,11 +35,11 @@ ## Remarks Handle the event to provide custom value conversion from a user-specified value to a value in the type specified by the cell property. - When you handle the event, you can convert the value yourself or you can customize the default conversion. For example, you can convert the value yourself using the cell method with type converters of your choosing. Alternately, you can let the default type converters parse the value, but modify the , , and properties of the object returned by the property, which is initialized using the cell property. + When you handle the event, you can convert the value yourself or you can customize the default conversion. For example, you can convert the value yourself using the cell method with type converters of your choosing. Alternately, you can let the default type converters parse the value, but modify the , , and properties of the object returned by the property, which is initialized using the cell property. When you convert the value yourself, replace the initial, formatted value of the property with the converted value in the type specified by the cell property. To indicate that no further parsing is necessary, set the property to `true`. - When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is parsed using the cell method with default type converters. The default implementation of this method parses the value using the , , and properties of the cell style passed in. If the value is not equal to , the value is parsed using the property and the type converters passed in. + When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is parsed using the cell method with default type converters. The default implementation of this method parses the value using the , , and properties of the cell style passed in. If the value is not equal to , the value is parsed using the property and the type converters passed in. To customize the conversion of a cell value into a formatted value for display, handle the event. @@ -166,7 +166,7 @@ ## Examples - The following code example demonstrates using to discover if the changed cell is in the date column. + The following code example demonstrates using to discover if the changed cell is in the date column. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet2"::: @@ -220,12 +220,12 @@ is `false` when the event handler exits. In this case, the , , and properties of the cell style are used to parse the cell value. + You can use this property to determine the formatting in effect for the cell. Setting this property or changing the properties of the object that this property returns has no effect unless the is `false` when the event handler exits. In this case, the , , and properties of the cell style are used to parse the cell value. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -286,7 +286,7 @@ ## Examples - The following code example sets to `true` when the cell's value is successfully parsed. + The following code example sets to `true` when the cell's value is successfully parsed. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet2"::: @@ -341,7 +341,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewCellParsingEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellParsingEventHandler.xml index e708e4cec16..a3f812f861e 100644 --- a/xml/System.Windows.Forms/DataGridViewCellParsingEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellParsingEventHandler.xml @@ -45,11 +45,11 @@ ## Remarks Handle the event to provide custom value conversion from a user-specified value to a value in the type specified by the cell property. - When you handle the event, you can convert the value yourself or you can customize the default conversion. For example, you can convert the value yourself using the cell method with type converters of your choosing. Alternatively, you can let the default type converters parse the value, but modify the , , and properties of the object returned by the property, which is initialized using the cell property. + When you handle the event, you can convert the value yourself or you can customize the default conversion. For example, you can convert the value yourself using the cell method with type converters of your choosing. Alternatively, you can let the default type converters parse the value, but modify the , , and properties of the object returned by the property, which is initialized using the cell property. When you convert the value yourself, replace the initial, formatted value of the property with the converted value in the type specified by the cell property. To indicate that no further parsing is necessary, set the property to `true`. - When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is parsed using the cell method with default type converters. The default implementation of this method parses the value using the , , and properties of the cell style passed in. If the value is not equal to , the value is parsed using the property and the type converters passed in. + When the event handler completes, if the is `null` or is not of the correct type, or the property is `false`, the is parsed using the cell method with default type converters. The default implementation of this method parses the value using the , , and properties of the cell style passed in. If the value is not equal to , the value is parsed using the property and the type converters passed in. To customize the conversion of a cell value into a formatted value for display, handle the event. diff --git a/xml/System.Windows.Forms/DataGridViewCellStateChangedEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellStateChangedEventArgs.xml index d6ca2e398ad..dc1a982f418 100644 --- a/xml/System.Windows.Forms/DataGridViewCellStateChangedEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellStateChangedEventArgs.xml @@ -88,7 +88,7 @@ and properties. + This method uses the parameter values to initialize the and properties. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewCellStyle.xml b/xml/System.Windows.Forms/DataGridViewCellStyle.xml index dab61634a56..496547fac2e 100644 --- a/xml/System.Windows.Forms/DataGridViewCellStyle.xml +++ b/xml/System.Windows.Forms/DataGridViewCellStyle.xml @@ -233,7 +233,7 @@ method applies the values of the properties that are set in the `dataGridViewCellStyle` parameter to the current . If a property is not set in `dataGridViewCellStyle`, the current retains its value of that property. + The method applies the values of the properties that are set in the `dataGridViewCellStyle` parameter to the current . If a property is not set in `dataGridViewCellStyle`, the current retains its value of that property. ]]> @@ -365,15 +365,15 @@ property. When the user commits the change, the underlying cell value is set to the value of the property or to `null` if is and the cell is a reference type. This conversion does not occur when you set the property programmatically. + The user can enter a null value into a cell by pressing CTRL+0 or by typing the value of the property. When the user commits the change, the underlying cell value is set to the value of the property or to `null` if is and the cell is a reference type. This conversion does not occur when you set the property programmatically. > [!NOTE] -> The control does not display the property value for cell values equal to the property value when is set to a value other than or `null`. In this case, you can handle the event to display the property value. For more information, see the code example in this topic. +> The control does not display the property value for cell values equal to the property value when is set to a value other than or `null`. In this case, you can handle the event to display the property value. For more information, see the code example in this topic. ## Examples - The following code example illustrates the use of this property. In this example, a event handler displays the value of the property when the cell value equals . + The following code example illustrates the use of this property. In this example, a event handler displays the value of the property when the cell value equals . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet50"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet50"::: @@ -467,7 +467,7 @@ ## Examples - The following code example sets the font for column headers. To run this example, paste the code into a form that contains a named `GridView1`, and then call the `SetupUpDataGridView` and `PopulateDataGridView` methods from the form's constructor or method. Ensure all events are associated with their event-handling methods. + The following code example sets the font for column headers. To run this example, paste the code into a form that contains a named `GridView1`, and then call the `SetupUpDataGridView` and `PopulateDataGridView` methods from the form's constructor or method. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GridViewUnbound/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BackgroundColor/form1.cs" id="Snippet5"::: @@ -514,7 +514,7 @@ ## Examples - The following code example demonstrates how to set the and properties for cells in alternating rows. This code example is part of a larger example provided for the class. + The following code example demonstrates how to set the and properties for cells in alternating rows. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AllowUserToAddRows/form1.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AllowUserToAddRows/form1.vb" id="Snippet20"::: @@ -855,17 +855,17 @@ cell with this cell style has a value of or `null` or the user edits the cell and presses CTRL+0, the control displays the property value. When a user edits a cell with this cell style and enters the value of this property or presses CTRL+0, the control sets the cell value to the value of the property or to `null` if is and the cell is a reference type. This conversion does not occur when you set the property programmatically. + When a cell with this cell style has a value of or `null` or the user edits the cell and presses CTRL+0, the control displays the property value. When a user edits a cell with this cell style and enters the value of this property or presses CTRL+0, the control sets the cell value to the value of the property or to `null` if is and the cell is a reference type. This conversion does not occur when you set the property programmatically. > [!NOTE] -> The control does not display the property value for cell values equal to the property value when is set to a value other than or `null`. In this case, you can handle the event to display the property value. For more information, see the code example in this topic. +> The control does not display the property value for cell values equal to the property value when is set to a value other than or `null`. In this case, you can handle the event to display the property value. For more information, see the code example in this topic. This property takes any object, which enables you to specify a value with a type appropriate to the display type of the cell. For example, you can set this property to string values for use by text box cells or images for use by image cells. ## Examples - The following code example illustrates the use of this property. In this example, a event handler displays the value of the property when the cell value equals . + The following code example illustrates the use of this property. In this example, a event handler displays the value of the property when the cell value equals . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet50"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet50"::: @@ -911,7 +911,7 @@ property affects where the editing control of the is drawn. For example, if you set on a to a that has a value of 10 for its , , , and properties, the content of the cell is drawn in the middle of the cell with a space of 10 pixels between the edges of the text box and the edges of the cell. + Setting the property affects where the editing control of the is drawn. For example, if you set on a to a that has a value of 10 for its , , , and properties, the content of the cell is drawn in the middle of the cell with a space of 10 pixels between the edges of the text box and the edges of the cell. @@ -1178,7 +1178,7 @@ is for a cell that contains text, the cell displays the text on a single line, and displays any embedded newline characters as box characters. If is for a cell that contains text, the cell displays newline characters as line breaks, but also wraps any lines that exceed the width of the cell. + If is for a cell that contains text, the cell displays the text on a single line, and displays any embedded newline characters as box characters. If is for a cell that contains text, the cell displays newline characters as line breaks, but also wraps any lines that exceed the width of the cell. diff --git a/xml/System.Windows.Forms/DataGridViewCellStyleContentChangedEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellStyleContentChangedEventArgs.xml index 8f2af384466..faa66651ea5 100644 --- a/xml/System.Windows.Forms/DataGridViewCellStyleContentChangedEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellStyleContentChangedEventArgs.xml @@ -35,21 +35,21 @@ ## Remarks The event occurs when a property value of a object returned by one of the following properties changes: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- If one of these properties is set to a different object, however, the corresponding *PropertyName*`Changed` event occurs but the event does not occur. @@ -60,7 +60,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -119,7 +119,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -170,7 +170,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventArgs.xml index 3f80fc59f6a..a08cbd2dc75 100644 --- a/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventArgs.xml @@ -39,16 +39,16 @@ The event also occurs whenever the value of the property is retrieved, either programmatically or when the mouse pointer enters a cell. - You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example fills the with information from hidden cells in the . + The following code example fills the with information from hidden cells in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellToolTipTextNeeded/Form1.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellToolTipTextNeeded/Form1.vb" id="Snippet20"::: @@ -113,7 +113,7 @@ ## Examples - The following code example sets the property depending on which cell the cursor is over. In this example, the is filled with information from hidden columns in the . + The following code example sets the property depending on which cell the cursor is over. In this example, the is filled with information from hidden columns in the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellToolTipTextNeeded/Form1.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellToolTipTextNeeded/Form1.vb" id="Snippet20"::: diff --git a/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventHandler.xml index 36943e398b1..99c30e37847 100644 --- a/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellToolTipTextNeededEventHandler.xml @@ -49,9 +49,9 @@ The event also occurs whenever the value of the property is retrieved, either programmatically or when the mouse pointer enters a cell. - You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. + You can use the and properties to determine the state or value of a cell, and use this information to set the property. This property is initialized with the value of the cell property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the cell 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). diff --git a/xml/System.Windows.Forms/DataGridViewCellValidatingEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellValidatingEventArgs.xml index 3a31b54d414..1d07345b32d 100644 --- a/xml/System.Windows.Forms/DataGridViewCellValidatingEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellValidatingEventArgs.xml @@ -33,14 +33,14 @@ event lets you cancel changes to the current cell when the new value is not valid. Use the property to determine the current value. To determine the state of the current cell, use the and properties to access the cell through the collection. To cancel the change, set the property to `true`. + The event lets you cancel changes to the current cell when the new value is not valid. Use the property to determine the current value. To determine the state of the current cell, use the and properties to access the cell through the collection. To cancel the change, set the property to `true`. When this event is canceled in data-bound mode, the new value is not pushed to the underlying data source. When this event is canceled in virtual mode, the event will not be raised. ## Examples - The following code example handles the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. + The following code example handles the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet40"::: @@ -152,7 +152,7 @@ ## Examples - The following code example handles the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. + The following code example handles the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet40"::: diff --git a/xml/System.Windows.Forms/DataGridViewCellValidatingEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellValidatingEventHandler.xml index bf3cfa1924c..7c5575e5609 100644 --- a/xml/System.Windows.Forms/DataGridViewCellValidatingEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellValidatingEventHandler.xml @@ -40,22 +40,22 @@ A that contains the event data. Represents the method that will handle the event of a control. - event occurs when a cell loses input focus, enabling content validation. Canceling this event cancels the changes to the current cell. When this event is canceled in data-bound mode, the new value is not pushed to the underlying data source. When this event is canceled in virtual mode, the event will not be raised. - - When you create a 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/). - - - -## Examples - The following code example handles the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. - + event occurs when a cell loses input focus, enabling content validation. Canceling this event cancels the changes to the current cell. When this event is canceled in data-bound mode, the new value is not pushed to the underlying data source. When this event is canceled in virtual mode, the event will not be raised. + + When you create a 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/). + + + +## Examples + The following code example handles the event to ensure that only positive integers are entered by the user. This example is part of a larger example available in the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet40"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidating/virtual.vb" id="Snippet40"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidating/virtual.vb" id="Snippet40"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewCellValueEventArgs.xml b/xml/System.Windows.Forms/DataGridViewCellValueEventArgs.xml index 1e5707fa435..8b9ab17ba8a 100644 --- a/xml/System.Windows.Forms/DataGridViewCellValueEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewCellValueEventArgs.xml @@ -40,7 +40,7 @@ ## Examples - The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. + The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet10"::: @@ -190,7 +190,7 @@ ## Examples - The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. + The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet10"::: @@ -248,7 +248,7 @@ ## Examples - The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. + The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet10"::: diff --git a/xml/System.Windows.Forms/DataGridViewCellValueEventHandler.xml b/xml/System.Windows.Forms/DataGridViewCellValueEventHandler.xml index 8ab5c9461a0..4fe6160ab3d 100644 --- a/xml/System.Windows.Forms/DataGridViewCellValueEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewCellValueEventHandler.xml @@ -50,7 +50,7 @@ ## Examples - The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. + The following code example handles the event to store updates and new entries in a data store object. This example is part of a larger example available in the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet10"::: diff --git a/xml/System.Windows.Forms/DataGridViewCheckBoxCell+DataGridViewCheckBoxCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewCheckBoxCell+DataGridViewCheckBoxCellAccessibleObject.xml index 5a21664f750..e0cee42c14a 100644 --- a/xml/System.Windows.Forms/DataGridViewCheckBoxCell+DataGridViewCheckBoxCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewCheckBoxCell+DataGridViewCheckBoxCellAccessibleObject.xml @@ -36,12 +36,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -161,7 +161,7 @@ method selects the check box if it is not selected, and clears the check box if it is selected. + The method selects the check box if it is not selected, and clears the check box if it is selected. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewCheckBoxCell.xml b/xml/System.Windows.Forms/DataGridViewCheckBoxCell.xml index 9f965c6483e..9c47ac8a376 100644 --- a/xml/System.Windows.Forms/DataGridViewCheckBoxCell.xml +++ b/xml/System.Windows.Forms/DataGridViewCheckBoxCell.xml @@ -43,13 +43,13 @@ ## Remarks The class is a specialized type of used to display binary or ternary information presented through a check box UI. In the default binary mode, the cells can hold values of `true` or `false`. In ternary mode, the cells take on one of the values. The property determines whether binary or ternary mode is in effect. - The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. + The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. The cell-related properties of the column are wrappers for the similarly-named properties of the template cell. Changing the property values of the template cell will affect only cells based on the template that are added after the change. Changing the cell-related property values of the column, however, will update the template cell and all other cells in the column, and refresh the column display if necessary. When the current cell is a , the property is always `true`. - Typically, check box cell values are intended either for storage, like any other data, or for performing bulk operations. If you want to respond immediately when users click a check box cell, you can handle the event, but this event occurs before the cell value is updated. If you need the new value at the time of the click, one option is to calculate what the expected value will be based on the current value. Another approach is to commit the change immediately, and handle the event to respond to it. To commit the change when the cell is clicked, you must handle the event. In the handler, if the current cell is a check box cell, call the method and pass in the value. + Typically, check box cell values are intended either for storage, like any other data, or for performing bulk operations. If you want to respond immediately when users click a check box cell, you can handle the event, but this event occurs before the cell value is updated. If you need the new value at the time of the click, one option is to calculate what the expected value will be based on the current value. Another approach is to commit the change immediately, and handle the event to respond to it. To commit the change when the cell is clicked, you must handle the event. In the handler, if the current cell is a check box cell, call the method and pass in the value. @@ -191,7 +191,7 @@ method whenever you derive from and add new properties to the derived class. + Override the method whenever you derive from and add new properties to the derived class. ]]> @@ -242,7 +242,7 @@ is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -294,7 +294,7 @@ is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -336,10 +336,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -537,7 +537,7 @@ , , and properties determine the associated values of these states as they occur in the underlying data source. + The , , and properties determine the associated values of these states as they occur in the underlying data source. Setting the property of the owning column also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -840,7 +840,7 @@ ## Remarks The control calls this method to convert a cell value into an equivalent display value of the type indicated by the property. The control passes the cell value to this method in the `value` parameter. - This method first attempts to convert `value` to a or value using the , , and properties if they have been set. + This method first attempts to convert `value` to a or value using the , , and properties if they have been set. If the conversion is unsuccessful, the event occurs. If there is no handler for this event or the handler sets the property to `true`, an exception is thrown. @@ -948,7 +948,7 @@ , , and properties determine the associated values of these states as they occur in the underlying data source. + The , , and properties determine the associated values of these states as they occur in the underlying data source. Setting the property of the owning column also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -1006,7 +1006,7 @@ is called just before . It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1054,7 +1054,7 @@ is called just before . It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to with the same argument has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1101,7 +1101,7 @@ ## Remarks Pressing the mouse button always unshares a row containing a cell of this type. - is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1147,7 +1147,7 @@ is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1193,7 +1193,7 @@ is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1241,7 +1241,7 @@ ## Remarks For this cell type, releasing the mouse while the pointer is over the cell always unshares the row containing the cell. - is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1367,7 +1367,7 @@ ## Remarks When activated by the space key, this method causes the cell's user interface (UI) to be updated. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1413,9 +1413,9 @@ value), this method updates the cell's user interface (UI) and raises the event on the owning . + When activated by the SPACEBAR key (equivalent to the value), this method updates the cell's user interface (UI) and raises the event on the owning . - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1464,7 +1464,7 @@ ## Remarks If the button is in a pushed state, this method updates the cell's user interface (UI). - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1508,7 +1508,7 @@ ## Remarks This method causes the cell's user interface (UI) to be updated. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1553,7 +1553,7 @@ ## Remarks If the cell's current is normal, this method causes the cell's user interface (UI) to be updated. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1599,7 +1599,7 @@ ## Remarks This method causes the cell's user interface (UI) to be updated. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1643,7 +1643,7 @@ ## Remarks This method updates the cell's user interface (UI). - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1775,9 +1775,9 @@ control calls this method to convert the displayed value from the to the . The control then sets the underlying cell value or data source value to the converted value. + When the user edits a cell value and commits the change, the control calls this method to convert the displayed value from the to the . The control then sets the underlying cell value or data source value to the converted value. - This method converts the display value of the cell to an actual cell value using the values of the , , and properties if they have been set. + This method converts the display value of the cell to an actual cell value using the values of the , , and properties if they have been set. ]]> @@ -1982,7 +1982,7 @@ , , and properties determine the associated values of these states as they occur in the underlying data source. + The , , and properties determine the associated values of these states as they occur in the underlying data source. Setting the property of the owning column also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -2044,7 +2044,7 @@ If no owning column exists, then this property is set to the default type appropriate for its mode: for binary mode and for ternary mode. - The is the actual data object contained in the cell, whereas the property is the formatted representation of this object. The and properties correspond to the data types of these values, respectively. + The is the actual data object contained in the cell, whereas the property is the formatted representation of this object. The and properties correspond to the data types of these values, respectively. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewCheckBoxColumn.xml b/xml/System.Windows.Forms/DataGridViewCheckBoxColumn.xml index 0c796325344..3a448af9884 100644 --- a/xml/System.Windows.Forms/DataGridViewCheckBoxColumn.xml +++ b/xml/System.Windows.Forms/DataGridViewCheckBoxColumn.xml @@ -45,7 +45,7 @@ The default sort mode for this column type is . - Typically, check box cell values are intended either for storage, like any other data, or for performing bulk operations. If you want to respond immediately when users click a check box cell, you can handle the event, but this event occurs before the cell value is updated. If you need the new value at the time of the click, one option is to calculate what the expected value will be based on the current value. Another approach is to commit the change immediately, and handle the event to respond to it. To commit the change when the cell is clicked, you must handle the event. In the handler, if the current cell is a check box cell, call the method and pass in the value. + Typically, check box cell values are intended either for storage, like any other data, or for performing bulk operations. If you want to respond immediately when users click a check box cell, you can handle the event, but this event occurs before the cell value is updated. If you need the new value at the time of the click, one option is to calculate what the expected value will be based on the current value. Another approach is to commit the change immediately, and handle the event to respond to it. To commit the change when the cell is clicked, you must handle the event. In the handler, if the current cell is a check box cell, call the method and pass in the value. @@ -114,7 +114,7 @@ constructor. + Using this parameterless constructor is equivalent to supplying an argument of `false` to the constructor. ]]> @@ -156,9 +156,9 @@ |Property|Value| |--------------|-----------| -||A new with its property initialized to the `threeState` parameter value.| -||The value of the `threeState` parameter.| -||| +||A new with its property initialized to the `threeState` parameter value.| +||The value of the `threeState` parameter.| +||| |The property of the object returned by the property.|| |The property of the object returned by the property.| if `threeState` is `true`; otherwise, `false`.| @@ -219,7 +219,7 @@ The constructors for the class initialize this property to a newly created . > [!CAUTION] -> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). +> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). @@ -284,12 +284,12 @@ |`DataGridViewCellStyle` property|Default value| |--------------------------------------|-------------------| -||| -|| if the initial property value is `true`; otherwise, `false`.| +||| +|| if the initial property value is `true`; otherwise, `false`.| These values override the value specified in the property of the control, but may be overridden by other cell style properties. For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). - If the property of the object returned by the property has a value of `false`, changing the property value to `true` automatically sets to . If has a value of , changing the property value to `false` automatically sets to `false`. + If the property of the object returned by the property has a value of `false`, changing the property value to `true` automatically sets to . If has a value of , changing the property value to `false` automatically sets to `false`. @@ -360,7 +360,7 @@ , , and properties determine the associated values of these states as they occur in the underlying data source. + The , , and properties determine the associated values of these states as they occur in the underlying data source. Getting or setting this property gets or sets the property of the cell object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -433,7 +433,7 @@ and call the method before . + To display the check box cells using visual styles, set this property to and call the method before . Getting or setting this property gets or sets the property of the cell object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -510,7 +510,7 @@ , , and properties determine the associated values of these states as they occur in the underlying data source. + The , , and properties determine the associated values of these states as they occur in the underlying data source. Getting or setting this property gets or sets the property of the cell object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -588,7 +588,7 @@ Getting or setting this property gets or sets the property of the cell object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. - If the property of the object returned by the property has a value of `false`, changing the property value to `true` automatically sets to . If has a value of , changing the property value to `false` automatically sets to `false`. + If the property of the object returned by the property has a value of `false`, changing the property value to `true` automatically sets to . If has a value of , changing the property value to `false` automatically sets to `false`. @@ -695,7 +695,7 @@ , , and properties determine the associated values of these states as they occur in the underlying data source. + The , , and properties determine the associated values of these states as they occur in the underlying data source. Getting or setting this property gets or sets the property of the cell object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. diff --git a/xml/System.Windows.Forms/DataGridViewColumn.xml b/xml/System.Windows.Forms/DataGridViewColumn.xml index 5b04ac48a9c..5b3ca9e60bd 100644 --- a/xml/System.Windows.Forms/DataGridViewColumn.xml +++ b/xml/System.Windows.Forms/DataGridViewColumn.xml @@ -64,7 +64,7 @@ class represents a logical column in a control. You can retrieve columns through the collection of the control. + The class represents a logical column in a control. You can retrieve columns through the collection of the control. Unlike a , which contains the actual collection of cells in a , is used mainly to adjust the appearance and behavior of the column user interface (UI), such as column width and cell style. For more information about cell styles, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -218,13 +218,13 @@ ## Remarks The automatic sizing behavior of the column is determined by the value of the property, which is the same as the value of the property for all values except , which indicates that the value is inherited from the property instead. - When the property value is , the column is resized along with other columns in that mode. All fill-mode columns in the control divide the available space in proportions determined by their property values. The width available for fill mode is determined by subtracting the widths of all other columns from the width of the client area of the control. If this width is smaller than the combined values of all fill-mode columns, the horizontal scroll bar is displayed, all fill-mode columns are shown with their minimum widths, and user column-resizing is disabled. For more information about column fill mode, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). + When the property value is , the column is resized along with other columns in that mode. All fill-mode columns in the control divide the available space in proportions determined by their property values. The width available for fill mode is determined by subtracting the widths of all other columns from the width of the client area of the control. If this width is smaller than the combined values of all fill-mode columns, the horizontal scroll bar is displayed, all fill-mode columns are shown with their minimum widths, and user column-resizing is disabled. For more information about column fill mode, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). - When the property is set to any other value except , the column will manage its width so that its cell values are fully displayed without clipping. In content-based sizing modes, size adjustments occur whenever cell contents change or, if is enabled, whenever row heights change. Some content-based sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. + When the property is set to any other value except , the column will manage its width so that its cell values are fully displayed without clipping. In content-based sizing modes, size adjustments occur whenever cell contents change or, if is enabled, whenever row heights change. Some content-based sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. Only columns with a property value of `true` are resized, and changing the visibility of a column does not cause resizing to occur. Additionally, when columns are set to automatically resize, the user cannot adjust the column widths with the mouse. - To adjust column widths programmatically, use the control's or methods or set the column property. + To adjust column widths programmatically, use the control's or methods or set the column property. For more information about content-based automatic sizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -309,7 +309,7 @@ The constructors for the class initialize this property. The parameterless constructor sets the property to `null`; the other constructor copies the cell template from its parameter. > [!NOTE] -> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). +> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). @@ -369,7 +369,7 @@ is . Use this property to determine the actual derived type. + The base type of the is . Use this property to determine the actual derived type. ]]> @@ -590,7 +590,7 @@ control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in this column, the styles specified through the property override the styles specified through the property, but are overridden by the styles specified through the , , , and properties. + The control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in this column, the styles specified through the property override the styles specified through the property, but are overridden by the styles specified through the , , , and properties. For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -654,16 +654,16 @@ property, the property corresponds to the current position of the column as displayed by the user interface (UI). By default, each column's is set to numbers of increasing order, which reflects the order in which they were added. The property value does not affect the value. To determine the display position of a column based on its visibility or other state, use the , , or method of the class. + Unlike the property, the property corresponds to the current position of the column as displayed by the user interface (UI). By default, each column's is set to numbers of increasing order, which reflects the order in which they were added. The property value does not affect the value. To determine the display position of a column based on its visibility or other state, use the , , or method of the class. - Every column in the control has a unique value. The values start with 0 and proceed in numerical order without skipping any values. When you change the value for a column, the values for other columns are changed to reflect the new order. + Every column in the control has a unique value. The values start with 0 and proceed in numerical order without skipping any values. When you change the value for a column, the values for other columns are changed to reflect the new order. If the column has an associated control, setting this property will cause the control to redraw itself. ## Examples - The following code example uses the property to swap the visual position of the first and last columns. Note that insertions occur before the . This code example is part of a larger example provided for the class. + The following code example uses the property to swap the visual position of the first and last columns. Note that insertions occur before the . This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewColumnDemo.cpp" id="Snippet170"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewColumnDemo.cs" id="Snippet170"::: @@ -771,7 +771,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridViewColumn1`. Then ensure that the event handler is associated with the event. @@ -878,7 +878,7 @@ ## Remarks When the property value is , the column is resized along with other columns in that mode so that all visible columns in the control exactly fill the horizontal width of the available display area. All fill-mode columns in the control divide the available space in proportions determined by their property values. For more information about column fill mode, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). - The maximum sum of values for all columns in a control is 65535. + The maximum sum of values for all columns in a control is 65535. @@ -1055,7 +1055,7 @@ and properties, users can also click the column header to sort or select the column. + The header of a column is typically used to display a column label. Depending on the current values of the and properties, users can also click the column header to sort or select the column. @@ -1114,7 +1114,7 @@ This property is useful only when the column has an associated header cell. For more information, see the property. > [!NOTE] -> There is no corresponding header text property for rows. To display labels in row headers, you must handle the event and paint your own labels when is -1. +> There is no corresponding header text property for rows. To display labels in row headers, you must handle the event and paint your own labels when is -1. @@ -1179,11 +1179,11 @@ When the property value is , the column is resized along with other columns in that mode so that all visible columns in the control exactly fill the horizontal width of the available display area. All fill-mode columns in the control divide the available space in proportions determined by their property values. For more information about column fill mode, see [Column Fill Mode in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/column-fill-mode-in-the-windows-forms-datagridview-control). - When the property is set to any other value except , the column will manage its width so that its cell values are fully displayed without clipping. In content-based sizing modes, size adjustments occur whenever cell contents change or, if is enabled, whenever row heights change. Some content-based sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. + When the property is set to any other value except , the column will manage its width so that its cell values are fully displayed without clipping. In content-based sizing modes, size adjustments occur whenever cell contents change or, if is enabled, whenever row heights change. Some content-based sizing modes let you limit the size adjustment to the currently displayed rows in order to increase performance. Only columns with a property value of `true` are resized, and changing the visibility of a column does not cause resizing to occur. Additionally, when columns are set to automatically resize, the user cannot adjust the column widths with the mouse. - To adjust column widths programmatically, use the control's or methods or set the column property. + To adjust column widths programmatically, use the control's or methods or set the column property. For more information about content-based automatic sizing, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). @@ -1234,7 +1234,7 @@ property inherits its values from the and the property. + This property is useful to determine which cell styles are applied to all cells in a column regardless of any row styles that are also applied to the cells. The column property inherits its values from the and the property. For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -1401,7 +1401,7 @@ and methods of the class use the property. The name is case-insensitive. The will treat `column1` and `COLUMN1` as the same column. + This property represents a formal name associated with the column that can be used to identify the column in a collection. For example, the and methods of the class use the property. The name is case-insensitive. The will treat `column1` and `COLUMN1` as the same column. @@ -1500,7 +1500,7 @@ ## Remarks If the property is , the user will not be able to manually adjust the column width. - By default, the property value is based on the property value. If you explicitly set to or , however, the control value is ignored. Set to to restore the value-inheritance behavior. + By default, the property value is based on the property value. If you explicitly set to or , however, the control value is ignored. Set to to restore the value-inheritance behavior. Because restores the value inheritance, the property will never return a value unless the column has not been added to a control. If you need to determine whether the property value of a column is inherited, check its property. If the property value includes the flag, the property value is not inherited. @@ -1620,7 +1620,7 @@ The default sort mode of a is . The default sort mode for other column types is . - The value does not prevent you from sorting a column programmatically, although other restrictions may apply. For more information, see the method. + The value does not prevent you from sorting a column programmatically, although other restrictions may apply. For more information, see the method. A property value of will not prevent the event from occurring, but it will prevent the header from changing its appearance when it is clicked. @@ -1732,7 +1732,7 @@ method. The returned string contains the and properties of the . + This method overrides the method. The returned string contains the and properties of the . ]]> @@ -1843,7 +1843,7 @@ . To completely remove a column, use the method. + Use this property to hide a column from view while keeping the column in the . To completely remove a column, use the method. To hide a column that is automatically generated when binding to a data source, set this property in a event handler. diff --git a/xml/System.Windows.Forms/DataGridViewColumnCollection.xml b/xml/System.Windows.Forms/DataGridViewColumnCollection.xml index 11287535c5b..52603132a4c 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnCollection.xml @@ -249,7 +249,7 @@ and properties, respectively. + The `columnName` and `headerText` parameters are related to the and properties, respectively. ]]> @@ -519,7 +519,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridViewColumnCollection1`. Then ensure that the event handler is associated with the event. @@ -836,14 +836,14 @@ value, regardless of whether the column is actually visible on the screen. + The first column in display order is the column with the lowest value, regardless of whether the column is actually visible on the screen. This method lets you determine the first column that fits the given criteria without having to compare index values directly. ## Examples - The following code example uses the method to swap the first displayed column and the last displayed column. + The following code example uses the method to swap the first displayed column and the last displayed column. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewColumnDemo.cpp" id="Snippet170"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewColumnDemo.cs" id="Snippet170"::: @@ -896,7 +896,7 @@ value, regardless of whether the column is actually visible on the screen. + The first column in display order is the column with the lowest value, regardless of whether the column is actually visible on the screen. This method lets you determine the first column that fits the given criteria without having to compare index values directly. @@ -946,14 +946,14 @@ value, regardless of whether the column is actually visible on the screen. + The last column in display order is the column with the highest value, regardless of whether the column is actually visible on the screen. This method lets you determine the last column that fits the given criteria without having to compare index values directly. ## Examples - The following code example uses the method to swap the last displayed column and the first displayed column. + The following code example uses the method to swap the last displayed column and the first displayed column. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView.ButtonDemos/CPP/DataGridViewColumnDemo.cpp" id="Snippet170"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AutoResizeColumn/DataGridViewColumnDemo.cs" id="Snippet170"::: @@ -1007,7 +1007,7 @@ value higher than the value of the specified column, regardless of whether the column is actually visible on the screen. + The next column in display order is the column with the lowest value higher than the value of the specified column, regardless of whether the column is actually visible on the screen. This method lets you determine the next column after the current column that fits the given criteria without having to compare index values directly. @@ -1061,7 +1061,7 @@ value lower than the value of the specified column, regardless of whether the column is actually visible on the screen. + The previous column in display order is the column with the highest value lower than the value of the specified column, regardless of whether the column is actually visible on the screen. This method lets you determine the first column before the current column that fits the given criteria without having to compare index values directly. @@ -1371,7 +1371,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewColumnDividerDoubleClickEventArgs.xml b/xml/System.Windows.Forms/DataGridViewColumnDividerDoubleClickEventArgs.xml index 23bf35a8984..cf95753f302 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnDividerDoubleClickEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnDividerDoubleClickEventArgs.xml @@ -32,7 +32,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -125,12 +125,12 @@ ## Remarks This method indicates the column to the left of the double-clicked divider if the has a property value of ; otherwise, it indicates the column to the right of the double-clicked divider. - The index is the zero-based index of the column in the collection. + The index is the zero-based index of the column in the collection. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewColumnEventArgs.xml b/xml/System.Windows.Forms/DataGridViewColumnEventArgs.xml index a12e922cb29..9ec48bfa6b3 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnEventArgs.xml @@ -30,43 +30,43 @@ Provides data for column-related events of a . - provides data for the following events: - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + provides data for the following events: + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet314"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet314"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet314"::: + ]]> @@ -140,16 +140,16 @@ Gets the column that the event occurs for. The that the event occurs for. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet314"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet314"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet314"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewColumnHeaderCell+DataGridViewColumnHeaderCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewColumnHeaderCell+DataGridViewColumnHeaderCellAccessibleObject.xml index 1eea24bcfcb..bc637904a61 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnHeaderCell+DataGridViewColumnHeaderCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnHeaderCell+DataGridViewColumnHeaderCellAccessibleObject.xml @@ -36,12 +36,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -295,7 +295,7 @@ owns the that is returned by the method. + The following table describes which owns the that is returned by the method. |Parameter value|Description| |---------------------|-----------------| @@ -303,11 +303,11 @@ ||The to the left of the current header cell.| ||The after the current header cell.| ||The before the current header cell.| -||The first . returns the if the property is `true`.| +||The first . returns the if the property is `true`.| ||The last .| > [!NOTE] -> The direction that the method moves when you specify or depends on whether the has right-to-left support enabled. For example, if right-to-left support is enabled, will return the same accessible object when you specify or . If right-to-left support is not enabled, will return the same object when you specify or . +> The direction that the method moves when you specify or depends on whether the has right-to-left support enabled. For example, if right-to-left support is enabled, will return the same accessible object when you specify or . If right-to-left support is not enabled, will return the same object when you specify or . ]]> @@ -469,7 +469,7 @@ property value always includes the value. The includes the value if the that contains the cell is selected. The includes the value if the owning cell is not currently displayed. + The property value always includes the value. The includes the value if the that contains the cell is selected. The includes the value if the owning cell is not currently displayed. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewColumnHeaderCell.xml b/xml/System.Windows.Forms/DataGridViewColumnHeaderCell.xml index af012dfce54..da94377be4f 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnHeaderCell.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnHeaderCell.xml @@ -132,10 +132,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -193,7 +193,7 @@ property of the control, this method is called by the control's method to retrieve a clipboard-formatted value that represents the cell. + Depending on the value of the property of the control, this method is called by the control's method to retrieve a clipboard-formatted value that represents the cell. The position-related parameters of this method indicate where this cell is located in the table of data representing the region defined by the selected cells in the control. Depending on the cell's position, formatting information may be returned by this method in addition to the cell value. For example, the HTML format for a cell in the first column of a row will include the tag that indicates the beginning of a row. @@ -348,7 +348,7 @@ that inherits its settings from the objects returned by the and properties of the . For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). + This method returns a that inherits its settings from the objects returned by the and properties of the . For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). ]]> diff --git a/xml/System.Windows.Forms/DataGridViewColumnHeadersHeightSizeMode.xml b/xml/System.Windows.Forms/DataGridViewColumnHeadersHeightSizeMode.xml index 179df43ce1b..b6266a7a27d 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnHeadersHeightSizeMode.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnHeadersHeightSizeMode.xml @@ -28,7 +28,7 @@ ## Remarks By default, users can resize the height of the column headers. You can disable this ability to set a fixed height or you can use the automatic sizing mode to fit the height to the header contents. Automatic sizing also disables user resizing. - This enumeration is used by the control property and method. + This enumeration is used by the control property and method. For more information about sizing modes, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). diff --git a/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventArgs.xml b/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventArgs.xml index ea0a1bbb33f..c9ab01b4ea2 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventArgs.xml @@ -30,33 +30,33 @@ Provides data for the event. - in a control - -- - -- - -- - -- - -- - -- - + in a control + +- + +- + +- + +- + +- + +- + For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet328"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet328"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet328"::: + ]]> @@ -143,16 +143,16 @@ Gets the column whose state changed. The whose state changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet328"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet328"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet328"::: + ]]> @@ -194,16 +194,16 @@ Gets the new column state. One of the values. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet328"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet328"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet328"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventHandler.xml b/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventHandler.xml index 67b997390a0..ddccea20245 100644 --- a/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewColumnStateChangedEventHandler.xml @@ -40,25 +40,25 @@ A that contains the event data. Represents the method that will handle the event of a . - in a control - -- - -- - -- - -- - -- - -- - - For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). - + in a control + +- + +- + +- + +- + +- + +- + + For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewComboBoxCell+ObjectCollection.xml b/xml/System.Windows.Forms/DataGridViewComboBoxCell+ObjectCollection.xml index 2c2348abaff..1361d0ac856 100644 --- a/xml/System.Windows.Forms/DataGridViewComboBoxCell+ObjectCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewComboBoxCell+ObjectCollection.xml @@ -512,7 +512,7 @@ The cell is in a shared row. is `false`, then the `index` value represents the position at which the `item` value is inserted. If is `true`, then `index` is ignored and `item` is placed in the collection in a position determined by the sorting order. + If is `false`, then the `index` value represents the position at which the `item` value is inserted. If is `true`, then `index` is ignored and `item` is placed in the collection in a position determined by the sorting order. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewComboBoxCell.xml b/xml/System.Windows.Forms/DataGridViewComboBoxCell.xml index 82a5834b69a..b2614a7b6e1 100644 --- a/xml/System.Windows.Forms/DataGridViewComboBoxCell.xml +++ b/xml/System.Windows.Forms/DataGridViewComboBoxCell.xml @@ -39,9 +39,9 @@ ## Remarks The class is a specialized type of used to display a combo box control, which is an editing field combined with a list selection field. The currently selected hosts a in which the user can change the cell's value, assuming the cell's property is set to `false`. - Unlike the control, the does not have and properties. Instead, selecting a value from a drop-down list sets the cell property. + Unlike the control, the does not have and properties. Instead, selecting a value from a drop-down list sets the cell property. - The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. + The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. The cell-related properties of the column are wrappers for the similarly-named properties of the template cell. Changing the property values of the template cell will affect only cells based on the template that are added after the change. Changing the cell-related property values of the column, however, will update the template cell and all other cells in the column, and refresh the column display if necessary. @@ -50,7 +50,7 @@ ## Examples - The following code example demonstrates the class, which makes use of the class. You can set the cell , , and properties in the same way that the corresponding column properties are set in this example. This example is part of a larger example available in the class overview topic. + The following code example demonstrates the class, which makes use of the class. You can set the cell , , and properties in the same way that the corresponding column properties are set in this example. This example is part of a larger example available in the class overview topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridViewColumn_AllColumns_Bound_Employees/CPP/employees.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellContentClick/employees.cs" id="Snippet40"::: @@ -170,7 +170,7 @@ method whenever you derive from and add new properties to the derived class. +Override the method whenever you derive from and add new properties to the derived class. ]]> @@ -258,15 +258,15 @@ For additional information, see [What's New in Accessibility in the .NET Framewo ## Remarks Typically this property is set for an entire column of cells through the property. - If possible, set to a source containing only the possible selections, like a column of selections. Then the property doesn't need to be set. But if the source is more complicated, set to the name of the property or column from which to retrieve possible selections. + If possible, set to a source containing only the possible selections, like a column of selections. Then the property doesn't need to be set. But if the source is more complicated, set to the name of the property or column from which to retrieve possible selections. - If is set to a string array, then and do not need to be set because each string in the array will be used for both value and display. + If is set to a string array, then and do not need to be set because each string in the array will be used for both value and display. - Changing the property causes the cell to reinitialize its collection and redraw itself. + Changing the property causes the cell to reinitialize its collection and redraw itself. - When you change the value of the property, the control attempts to use the and property values with the new data source, and sets each property to `null` if its value cannot be found. Any exception that occurs during this process is ignored unless it is one of the following critical exceptions: , , , , , , or . + When you change the value of the property, the control attempts to use the and property values with the new data source, and sets each property to `null` if its value cannot be found. Any exception that occurs during this process is ignored unless it is one of the following critical exceptions: , , , , , , or . - When the is set, the attaches to the event of the data source. When the is detached from the , the resource is not immediately released. The resource is released when the attached data source is disposed. To release the resource for garbage collection immediately, set the property to `null`. + When the is set, the attaches to the event of the data source. When the is detached from the , the resource is not immediately released. The resource is released when the attached data source is disposed. To release the resource for garbage collection immediately, set the property to `null`. @@ -357,13 +357,13 @@ For additional information, see [What's New in Accessibility in the .NET Framewo represents the text information displayed in the combo box drop-down list. In contrast, the property represents the corresponding value of a selection. + represents the text information displayed in the combo box drop-down list. In contrast, the property represents the corresponding value of a selection. - If the data for the selections displayed by the is supposed to be drawn from a nondefault property or column of the , then must be set in addition to . + If the data for the selections displayed by the is supposed to be drawn from a nondefault property or column of the , then must be set in addition to . - When is set to a string array, does not need to be set because each string in the array will be used as a valid display string and a valid underlying value. + When is set to a string array, does not need to be set because each string in the array will be used as a valid display string and a valid underlying value. - Another way of loading combo box selections is to use the property. must contain the property name from which to gather the selections. + Another way of loading combo box selections is to use the property. must contain the property name from which to gather the selections. @@ -828,7 +828,7 @@ For additional information, see [What's New in Accessibility in the .NET Framewo This method first determines whether `value` is valid by determining whether one of the following conditions is met. -- `value` is present in the or the collection. +- `value` is present in the or the collection. - `value` is `null` or . @@ -944,11 +944,11 @@ For additional information, see [What's New in Accessibility in the .NET Framewo method initializes the hosted control as described in the base method. In addition, for every invocation, does the following: + The method initializes the hosted control as described in the base method. In addition, for every invocation, does the following: -- Sets the visual properties of the hosted control, such as , , and , to match the corresponding properties of the current cell. +- Sets the visual properties of the hosted control, such as , , and , to match the corresponding properties of the current cell. -- Sets the data-bound properties of the hosted control, such as , , and , to match the corresponding properties of the current cell. +- Sets the data-bound properties of the hosted control, such as , , and , to match the corresponding properties of the current cell. - Reinitializes the property of the hosted control. @@ -998,16 +998,16 @@ For additional information, see [What's New in Accessibility in the .NET Framewo . With this reference, you can add items, remove items, and obtain a count of the items in the collection. For more information on the tasks that can be performed with the collection, see . + This property enables you to obtain a reference to the list of items that are currently stored in the . With this reference, you can add items, remove items, and obtain a count of the items in the collection. For more information on the tasks that can be performed with the collection, see . - If strings are added to , then and do not need to be set because each string added will be used for both value and display. + If strings are added to , then and do not need to be set because each string added will be used for both value and display. > [!NOTE] > does not support the use of multiple items with identical display values. If the property is set, then the property cannot be used. - The formatted value of the cell must always be one of the values in the collection or an error will occur and the cell value will revert to the first item in the collection. You can customize this behavior by handling the and events. + The formatted value of the cell must always be one of the values in the collection or an error will occur and the cell value will revert to the first item in the collection. You can customize this behavior by handling the and events. Setting this property to a value other than the value of the parent column's property will force the row to become unshared, allocating extra memory. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -1610,15 +1610,15 @@ For additional information, see [What's New in Accessibility in the .NET Framewo represents the corresponding value of a selection. In contrast, the property represents the text information displayed in the drop-down list. + represents the corresponding value of a selection. In contrast, the property represents the text information displayed in the drop-down list. The property specifies the data source for the value of the selections displayed in the drop-down list. - If the data for the selections displayed by the is supposed to be drawn from a nondefault property or column of the , then must be set in addition to . + If the data for the selections displayed by the is supposed to be drawn from a nondefault property or column of the , then must be set in addition to . - When is set to a string array, does not need to be set because each string in the array will be used as a valid display string and a valid underlying value. + When is set to a string array, does not need to be set because each string in the array will be used as a valid display string and a valid underlying value. - Another way of loading combo box selections is to use the property. must contain the property name from which to gather the selections. + Another way of loading combo box selections is to use the property. must contain the property name from which to gather the selections. diff --git a/xml/System.Windows.Forms/DataGridViewComboBoxColumn.xml b/xml/System.Windows.Forms/DataGridViewComboBoxColumn.xml index 7142a36a236..974adbb9fa4 100644 --- a/xml/System.Windows.Forms/DataGridViewComboBoxColumn.xml +++ b/xml/System.Windows.Forms/DataGridViewComboBoxColumn.xml @@ -55,17 +55,17 @@ ## Remarks The class is a specialized type of used to logically host cells that enable users to select values from a list of choices. A has an associated in every that intersects it. - You can populate the cells manually by setting their properties. Alternatively, you can bind the column to the data source indicated by the property. If the is bound to a database table, set the column property to the name of a column in the table. If the is bound to a collection of objects, set the property to the name of an object property. + You can populate the cells manually by setting their properties. Alternatively, you can bind the column to the data source indicated by the property. If the is bound to a database table, set the column property to the name of a column in the table. If the is bound to a collection of objects, set the property to the name of an object property. - You can populate the column drop-down list manually by adding values to the collection. Alternatively, you can bind the drop-down list to its own data source by setting the column property. If the values are objects in a collection or records in a database table, you must also set the and properties. The property indicates which object property or database column provides the values that are displayed in the drop-down list. The property indicates which object property or database column is used to set the cell property. + You can populate the column drop-down list manually by adding values to the collection. Alternatively, you can bind the drop-down list to its own data source by setting the column property. If the values are objects in a collection or records in a database table, you must also set the and properties. The property indicates which object property or database column provides the values that are displayed in the drop-down list. The property indicates which object property or database column is used to set the cell property. One typical scenario is to bind the control to a parent database table and bind the drop-down list to a related child table. For example, you might bind the control to an `Orders` table that contains a `ProductID` column and set the column property to a `Products` table that contains `ProductID` and `ProductName` columns. In this case, you would set the column property to "ProductID" to populate its cell values from the `Orders.ProductID` column. However, to display the actual product names in the cells and the drop-down list, you would map these values to the `Products` table by setting the property to "ProductID" and the property to "ProductName". The drop-down list values (or the values indicated by the property) must include the actual cell values or the control will throw an exception. - Setting the column , , and properties automatically sets the corresponding properties of all cells in the column including the . To override these property values for specific cells, set the column property first, and then set the cell properties. + Setting the column , , and properties automatically sets the corresponding properties of all cells in the column including the . To override these property values for specific cells, set the column property first, and then set the cell properties. - Unlike the control, the does not have and properties. Instead, selecting a value from a drop-down list sets the cell property. + Unlike the control, the does not have and properties. Instead, selecting a value from a drop-down list sets the cell property. The default sort mode for this column type is . @@ -245,7 +245,7 @@ The constructor for the class initializes this property to a newly created . > [!CAUTION] -> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). +> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). @@ -364,9 +364,9 @@ or properties specify where to retrieve the selection data shown in the combo box drop-down list. When using the property, if the data must be drawn from a nondefault property or column, then the property must be set to the name of the nondefault property or column. + The or properties specify where to retrieve the selection data shown in the combo box drop-down list. When using the property, if the data must be drawn from a nondefault property or column, then the property must be set to the name of the nondefault property or column. - If the property is set to a string array, then and do not need to be set because each string in the array will be used for both value and display. + If the property is set to a string array, then and do not need to be set because each string in the array will be used for both value and display. Getting or setting this property gets or sets the property of the object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -459,9 +459,9 @@ objects is obtained from the . If this data comes from a nondefault property or column, then the property must be set to the necessary property name or column name. + The data for the values stored in a column of objects is obtained from the . If this data comes from a nondefault property or column, then the property must be set to the necessary property name or column name. - If the cell values are internal values not visible to the user, then use and to map the internal cell values to user-viewable values. + If the cell values are internal values not visible to the user, then use and to map the internal cell values to user-viewable values. When the property is set to a string array, the property does not need to be set because each string in the array will be used as a valid display string and as a valid underlying value. @@ -470,7 +470,7 @@ ## Examples - The following code example demonstrates how to use a to aid in data entry of the title column. is set to the property name responsible for containing the user-viewable text. In this example, the is set to the same value as because no mapping is necessary. This example is part of a larger example available in the class overview topic. + The following code example demonstrates how to use a to aid in data entry of the title column. is set to the property name responsible for containing the user-viewable text. In this example, the is set to the same value as because no mapping is necessary. This example is part of a larger example available in the class overview topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridViewColumn_AllColumns_Bound_Employees/CPP/employees.cpp" id="Snippet40"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellContentClick/employees.cs" id="Snippet40"::: @@ -669,7 +669,7 @@ property of the member. + This property corresponds to the property of the member. Getting or setting this property gets or sets the property of the object returned by the property. Setting this property also sets the property of every cell in the column. To override the specified value for individual cells, set the cell values after you set the column value. @@ -818,14 +818,14 @@ ## Remarks This property returns the value of the property of the returned by the property. - The or properties are used to populate the selections of the combo boxes. + The or properties are used to populate the selections of the combo boxes. - If strings are added to , then the and properties do not need to be set because each string added will be used for both value and display. + If strings are added to , then the and properties do not need to be set because each string added will be used for both value and display. > [!NOTE] > does not support the use of multiple items with identical display values. - If the property is set, then cannot be used. + If the property is set, then cannot be used. @@ -1085,7 +1085,7 @@ for more information about its relationship with . + See for more information about its relationship with . When the property is set to a string array, the property does not need to be set because each string in the array will be used as a valid display string and as a valid underlying value. diff --git a/xml/System.Windows.Forms/DataGridViewComboBoxEditingControl.xml b/xml/System.Windows.Forms/DataGridViewComboBoxEditingControl.xml index 3283977da85..5a21c2738d4 100644 --- a/xml/System.Windows.Forms/DataGridViewComboBoxEditingControl.xml +++ b/xml/System.Windows.Forms/DataGridViewComboBoxEditingControl.xml @@ -145,7 +145,7 @@ , , and properties of the control align with the corresponding properties of the `dataGridViewCellStyle` parameter value. + The , , and properties of the control align with the corresponding properties of the `dataGridViewCellStyle` parameter value. ]]> @@ -282,7 +282,7 @@ property contains the actual data contained in the control. This data is the string shown in the text box portion of the control. In contrast, the method returns the formatted representation of this string. Because a combo box uses plain text strings, these two properties are essentially the same. + The property contains the actual data contained in the control. This data is the string shown in the text box portion of the control. In contrast, the method returns the formatted representation of this string. Because a combo box uses plain text strings, these two properties are essentially the same. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewDataErrorEventArgs.xml b/xml/System.Windows.Forms/DataGridViewDataErrorEventArgs.xml index 9e2e9e3fdf7..202ef28bf19 100644 --- a/xml/System.Windows.Forms/DataGridViewDataErrorEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewDataErrorEventArgs.xml @@ -35,7 +35,7 @@ ## Remarks Handling the event lets you handle exceptions thrown by code outside your control (for example, by an external data source). Use the property to determine the state of the at the time of the exception. Use the property to retrieve the exception data. If you want to handle the exception by additional event handlers, set the property to `true`. - The and properties normally indicate the cell in which the data error occurred. When the error occurs in an external data source, however, the data source may not provide the column in which the error occurred. In this case, the property typically indicates the column of the current cell at the time of the error. + The and properties normally indicate the cell in which the data error occurred. When the error occurs in an external data source, however, the data source may not provide the column in which the error occurred. In this case, the property typically indicates the column of the current cell at the time of the error. diff --git a/xml/System.Windows.Forms/DataGridViewHeaderCell.xml b/xml/System.Windows.Forms/DataGridViewHeaderCell.xml index 71ae4648b77..ad08e85d5ff 100644 --- a/xml/System.Windows.Forms/DataGridViewHeaderCell.xml +++ b/xml/System.Windows.Forms/DataGridViewHeaderCell.xml @@ -154,7 +154,7 @@ method whenever you derive from and add new properties to the derived class. + Override the method whenever you derive from and add new properties to the derived class. ]]> @@ -273,7 +273,7 @@ property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. + The property is the actual data object contained by the cell, whereas the property is the formatted representation of the data. The and properties correspond to the data types of these values, respectively. ]]> @@ -370,7 +370,7 @@ does not have a shortcut menu, the will inherit the shortcut menu from the . If the also does not have a shortcut menu, then the method will return `null`. + If the does not have a shortcut menu, the will inherit the shortcut menu from the . If the also does not have a shortcut menu, then the method will return `null`. ]]> @@ -463,7 +463,7 @@ method returns the size necessary to fit in a row of column headers if the header cell is a column header, the size necessary to fit in a column of row headers if the header cell is a row header, or the size necessary to be a if the cell is a top left header cell. + The method returns the size necessary to fit in a row of column headers if the header cell is a column header, the size necessary to fit in a column of row headers if the header cell is a row header, or the size necessary to be a if the cell is a top left header cell. If the cell is not attached to a , the property of the returns the value (-1,-1). @@ -566,9 +566,9 @@ ## Remarks -For information about enabling visual styles, see the method. +For information about enabling visual styles, see the method. - is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -620,9 +620,9 @@ For more information about row sharing, see [Best Practices for Scaling the Wind ## Remarks -For information about enabling visual styles, see the method. +For information about enabling visual styles, see the method. - is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -675,9 +675,9 @@ For more information about row sharing, see [Best Practices for Scaling the Wind ## Remarks -For information about enabling visual styles, see the method. +For information about enabling visual styles, see the method. - is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -727,9 +727,9 @@ For more information about row sharing, see [Best Practices for Scaling the Wind ## Remarks -For information about enabling visual styles, see the method. +For information about enabling visual styles, see the method. - is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row `rowIndex`. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -776,9 +776,9 @@ For more information about row sharing, see [Best Practices for Scaling the Wind method sets the to if the cell is clicked with the left mouse button and visual styles are enabled for headers. For more information about visual styles for headers, see the property. + The method sets the to if the cell is clicked with the left mouse button and visual styles are enabled for headers. For more information about visual styles for headers, see the property. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -828,9 +828,9 @@ For more information about row sharing, see [Best Practices for Scaling the Wind method sets the to if the left mouse button is pressed when the pointer enters the cell and visual styles are enabled for headers. For more information about visual styles for headers, see the property. + The method sets the to if the left mouse button is pressed when the pointer enters the cell and visual styles are enabled for headers. For more information about visual styles for headers, see the property. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -880,9 +880,9 @@ For more information about row sharing, see [Best Practices for Scaling the Wind method sets the to if it was in another state and visual styles are enabled for headers. For more information about visual styles for headers, see the property. + The method sets the to if it was in another state and visual styles are enabled for headers. For more information about visual styles for headers, see the property. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -932,9 +932,9 @@ For more information about row sharing, see [Best Practices for Scaling the Wind method sets the to if the left mouse button was released and visual styles are enabled for headers. For more information about visual styles for headers, see the property. + The method sets the to if the left mouse button was released and visual styles are enabled for headers. For more information about visual styles for headers, see the property. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -1279,7 +1279,7 @@ For more information about row sharing, see [Best Practices for Scaling the Wind property is `true`. If the cell is a column header cell, then it is visible if its column is visible and the property is `true`. If the cell is the top left header cell, it is visible if both and are true. + If the cell is a row header cell, then it is visible if its row is visible and the property is `true`. If the cell is a column header cell, then it is visible if its column is visible and the property is `true`. If the cell is the top left header cell, it is visible if both and are true. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewImageCell+DataGridViewImageCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewImageCell+DataGridViewImageCellAccessibleObject.xml index f50f61be7e6..0ab35af9d82 100644 --- a/xml/System.Windows.Forms/DataGridViewImageCell+DataGridViewImageCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewImageCell+DataGridViewImageCellAccessibleObject.xml @@ -36,12 +36,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -279,7 +279,7 @@ property contains a string that represents the value of the cell property. For the type, this is typically a string representation of the value. + The property contains a string that represents the value of the cell property. For the type, this is typically a string representation of the value. Setting this property has no effect. diff --git a/xml/System.Windows.Forms/DataGridViewImageCell.xml b/xml/System.Windows.Forms/DataGridViewImageCell.xml index e1cd2eaf796..1c41ba06298 100644 --- a/xml/System.Windows.Forms/DataGridViewImageCell.xml +++ b/xml/System.Windows.Forms/DataGridViewImageCell.xml @@ -35,7 +35,7 @@ ## Remarks The class is a specialized type of used to display an or an , depending on the value of the property. Typically, the property of a is set to `true` to indicate that the user cannot edit the cell contents. - The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. + The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. The cell-related properties of the column are wrappers for the similarly-named properties of the template cell. Changing the property values of the template cell will affect only cells based on the template that are added after the change. Changing the cell-related property values of the column, however, will update the template cell and all other cells in the column, and refresh the column display if necessary. @@ -104,7 +104,7 @@ with a `valueIsIcon` parameter value of `false`. + This constructor calls with a `valueIsIcon` parameter value of `false`. ]]> @@ -145,7 +145,7 @@ To ensure that the alpha channel of values is painted correctly, use this constructor with a `valueIsIcon` parameter value of `true`. - If the `valueIsIcon` parameter is `true`, the and properties return a object representing the type. + If the `valueIsIcon` parameter is `true`, the and properties return a object representing the type. ]]> @@ -188,7 +188,7 @@ method whenever you derive from and add new properties to the derived class. + Override the method whenever you derive from and add new properties to the derived class. ]]> @@ -229,10 +229,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -862,7 +862,7 @@ values is painted correctly, set this property to `true`. When this property is `true`, the and properties return a object representing the type. + To ensure that the alpha channel of values is painted correctly, set this property to `true`. When this property is `true`, the and properties return a object representing the type. Setting the property of the owning column also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. @@ -917,9 +917,9 @@ for the cell has not been set, then the for the owning column is used, if it exists. If no owning column exists, the default value type is used, which is the type if the property is set to `false` and the type otherwise. + When retrieving this property, if the for the cell has not been set, then the for the owning column is used, if it exists. If no owning column exists, the default value type is used, which is the type if the property is set to `false` and the type otherwise. - The is the actual data object contained in the cell, whereas the property is the formatted representation of this object. The and properties correspond to the data types of these values, respectively. + The is the actual data object contained in the cell, whereas the property is the formatted representation of this object. The and properties correspond to the data types of these values, respectively. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewImageColumn.xml b/xml/System.Windows.Forms/DataGridViewImageColumn.xml index c04bc9c41d4..5fd929c8808 100644 --- a/xml/System.Windows.Forms/DataGridViewImageColumn.xml +++ b/xml/System.Windows.Forms/DataGridViewImageColumn.xml @@ -116,7 +116,7 @@ with a `valuesAreIcons` parameter value of `false`. + This constructor calls with a `valuesAreIcons` parameter value of `false`. ]]> @@ -160,8 +160,8 @@ |Property|Value| |--------------|-----------| -||A new with its property initialized to the `valuesAreIcons` parameter value.| -||The value of the `valuesAreIcons` parameter.| +||A new with its property initialized to the `valuesAreIcons` parameter value.| +||The value of the `valuesAreIcons` parameter.| |The property of the object returned by the property.|| |The property of the object returned by the property.|A standard error graphic of type if `valuesAreIcons` is `true` and type if `valuesAreIcons` is `false`.| @@ -228,7 +228,7 @@ The constructors for the class initialize this property to a newly created . > [!CAUTION] -> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). +> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). @@ -330,14 +330,14 @@ |`DataGridViewCellStyle` property|Default value| |--------------------------------------|-------------------| -||| -||A standard error graphic of type if the initial property value is `true`; otherwise, a standard error graphic of type .| +||| +||A standard error graphic of type if the initial property value is `true`; otherwise, a standard error graphic of type .| These values override the value specified in the property of the control, but may be overridden by other cell style properties. For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). To prevent the standard error graphic from appearing for `null` or cell values, set the property for this cell style object to `null` or your own error graphic before adding rows to the control. This does not affect the row for new records, however. To prevent the error graphic from appearing in the row for new records when the control property value is `true`, you must also either explicitly set the cell value to `null` or your own error graphic in a handler for the control event or set the column property to an instance of a -derived type with an overridden property that returns `null` or your own error graphic. - If the property of the object returned by the property has a value equal to the standard error graphic of type , changing the property value to `true` automatically sets to the standard error graphic of type . If has a value equal to the standard error graphic of type , changing the property value to `false` automatically sets to the standard error graphic of type . + If the property of the object returned by the property has a value equal to the standard error graphic of type , changing the property value to `true` automatically sets to the standard error graphic of type . If has a value equal to the standard error graphic of type , changing the property value to `false` automatically sets to the standard error graphic of type . @@ -411,7 +411,7 @@ property to describe the image provided by the or property. This description provides an accessible alternative to the image. Additionally, the description text is used when the cell value is copied onto the Clipboard. + You can use the property to describe the image provided by the or property. This description provides an accessible alternative to the image. Additionally, the description text is used when the cell value is copied onto the Clipboard. Getting or setting this property gets or sets the property of the object returned by the property. Setting this property also sets the property of every cell in the column. To override the specified value for individual cells, set the cell values after you set the column value. @@ -482,7 +482,7 @@ ## Remarks The property specifies an icons that is displayed in cells with no values when the column is not data-bound and the cell's property is set to `true`. For a data-bound column whose cells do not have an associated image, a standard error graphic is displayed. - Using the property rather than the property ensures that an alpha channel in an icon is painted correctly. If you want to display an instead of an , set the property instead and set the property to `false`. You can also set the property of individual cells to indicate whether the cell displays the or the property value. + Using the property rather than the property ensures that an alpha channel in an icon is painted correctly. If you want to display an instead of an , set the property instead and set the property to `false`. You can also set the property of individual cells to indicate whether the cell displays the or the property value. ]]> @@ -538,7 +538,7 @@ ## Remarks The property specifies an image that is displayed in cells with no values when the column is not data-bound and the cell's property is set to `false`. For a data-bound column whose cells do not have an associated image, a standard error graphic is displayed. - If you want to display an instead of an , set the property instead and set the property to `true`. This ensures that the alpha channel of the is painted correctly. You can also set the property of individual cells to indicate whether the cell displays the or the property value when there is no cell value. + If you want to display an instead of an , set the property instead and set the property to `true`. This ensures that the alpha channel of the is painted correctly. You can also set the property of individual cells to indicate whether the cell displays the or the property value when there is no cell value. @@ -716,7 +716,7 @@ Getting or setting this property gets or sets the property of the object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. - If the property of the object returned by the property has a value equal to the standard error graphic of type , changing the property value to `true` automatically sets to the standard error graphic of type . If has a value equal to the standard error graphic of type , changing the property value to `false` automatically sets to the standard error graphic of type . + If the property of the object returned by the property has a value equal to the standard error graphic of type , changing the property value to `true` automatically sets to the standard error graphic of type . If has a value equal to the standard error graphic of type , changing the property value to `false` automatically sets to the standard error graphic of type . ]]> diff --git a/xml/System.Windows.Forms/DataGridViewLinkCell+DataGridViewLinkCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewLinkCell+DataGridViewLinkCellAccessibleObject.xml index cbea929d7a4..033dc68d087 100644 --- a/xml/System.Windows.Forms/DataGridViewLinkCell+DataGridViewLinkCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewLinkCell+DataGridViewLinkCellAccessibleObject.xml @@ -36,12 +36,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -159,7 +159,7 @@ method navigates to the link provided in the . + The method navigates to the link provided in the . ]]> diff --git a/xml/System.Windows.Forms/DataGridViewLinkCell.xml b/xml/System.Windows.Forms/DataGridViewLinkCell.xml index 40b42a4ab0a..15e7d03cc80 100644 --- a/xml/System.Windows.Forms/DataGridViewLinkCell.xml +++ b/xml/System.Windows.Forms/DataGridViewLinkCell.xml @@ -35,7 +35,7 @@ ## Remarks The class is a specialized type of used to display links. - The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. + The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. The cell-related properties of the column are wrappers for the similarly-named properties of the template cell. Changing the property values of the template cell will affect only cells based on the template that are added after the change. Changing the cell-related property values of the column, however, will update the template cell and all other cells in the column, and refresh the column display if necessary. @@ -169,7 +169,7 @@ method whenever you derive from and add new properties to the derived class. + Override the method whenever you derive from and add new properties to the derived class. ]]> @@ -210,10 +210,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -509,7 +509,7 @@ is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -698,7 +698,7 @@ is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -744,7 +744,7 @@ is called just before . must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -790,7 +790,7 @@ method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + The method is called just before the method. It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). @@ -836,7 +836,7 @@ is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. + is called just before . It must return `true` if the call to has the effect of unsharing the row containing the cell. It should return `false` otherwise. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). diff --git a/xml/System.Windows.Forms/DataGridViewLinkColumn.xml b/xml/System.Windows.Forms/DataGridViewLinkColumn.xml index ab952c56585..1c7e10b643b 100644 --- a/xml/System.Windows.Forms/DataGridViewLinkColumn.xml +++ b/xml/System.Windows.Forms/DataGridViewLinkColumn.xml @@ -226,7 +226,7 @@ The constructor for the class initializes this property to a newly created . > [!CAUTION] -> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). +> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). @@ -563,7 +563,7 @@ is true, the property value is used to display links that have already been visited. + When is true, the property value is used to display links that have already been visited. Getting or setting this property gets or sets the property of the object returned by the property. Setting this property also sets the property of every cell in the column and refreshes the column display. To override the specified value for individual cells, set the cell values after you set the column value. diff --git a/xml/System.Windows.Forms/DataGridViewPaintParts.xml b/xml/System.Windows.Forms/DataGridViewPaintParts.xml index 744c8ac1fbc..1edea2c8680 100644 --- a/xml/System.Windows.Forms/DataGridViewPaintParts.xml +++ b/xml/System.Windows.Forms/DataGridViewPaintParts.xml @@ -32,7 +32,7 @@ method and by handlers for the , , and events of the control. + This enumeration is used by the protected method and by handlers for the , , and events of the control. diff --git a/xml/System.Windows.Forms/DataGridViewRow+DataGridViewRowAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewRow+DataGridViewRowAccessibleObject.xml index d538f17e9df..8b28da28fd9 100644 --- a/xml/System.Windows.Forms/DataGridViewRow+DataGridViewRowAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewRow+DataGridViewRowAccessibleObject.xml @@ -40,12 +40,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -419,13 +419,13 @@ The that the method will return for each `navdir` value. + The following table describes the that the method will return for each `navdir` value. |Parameter value|Return value| |---------------------|------------------| | or |An accessible object for the below the current row.| | or |An accessible object for the above the current row.| -||An accessible object for the first in the row. The is the first cell if is `true`.| +||An accessible object for the first in the row. The is the first cell if is `true`.| ||An accessible object for the last in the row.| |All other values|`null`.| @@ -582,7 +582,7 @@ The method will perform for each `flags` value. + The following table describes the action that method will perform for each `flags` value. |Parameter value|Action| |---------------------|------------| @@ -632,7 +632,7 @@ The property includes the value if the all of the objects in the row are selected. does not indicate whether the row has scrolled out of view. + The property includes the value if the all of the objects in the row are selected. does not indicate whether the row has scrolled out of view. ]]> @@ -679,7 +679,7 @@ The property includes the property for each cell in the row. returns the string "(Create New)" if the current row is a new row. + The property includes the property for each cell in the row. returns the string "(Create New)" if the current row is a new row. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewRow.xml b/xml/System.Windows.Forms/DataGridViewRow.xml index 64f9db3ffbb..a9dd748a45a 100644 --- a/xml/System.Windows.Forms/DataGridViewRow.xml +++ b/xml/System.Windows.Forms/DataGridViewRow.xml @@ -37,13 +37,13 @@ class represents a row in a control. You can retrieve rows through the and collections of the control. + The class represents a row in a control. You can retrieve rows through the and collections of the control. Unlike a , a physically contains a collection of all of the cells in that row. You can access this collection through the property. The class is used to access the individual cell elements, as well as to adjust the appearance and behavior of the row user interface (UI), such as height and cell style. Typically, you will want all rows or most rows in the control to share the same characteristics. To set cell styles for all rows in the control, set the properties of the object returned by the property. To set styles for alternating rows, use the property. For more information about cell styles, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). You can also use the property to define a row that will be used as a basis for all rows added to the control. - The control will share objects across multiple data rows whenever possible to avoid performance penalties. Unless you are working with large amounts of data and experiencing performance issues, you can typically ignore row sharing. A shared row is indicated by an property value of -1. Some members of the class cannot be used with shared rows, but you can unshare a row by accessing it through the property. Rows can also become unshared in other ways. To access a row without unsharing it, use the method. When working with large amounts of data, you should be aware of how rows are shared and unshared to avoid performance penalties. 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). + The control will share objects across multiple data rows whenever possible to avoid performance penalties. Unless you are working with large amounts of data and experiencing performance issues, you can typically ignore row sharing. A shared row is indicated by an property value of -1. Some members of the class cannot be used with shared rows, but you can unshare a row by accessing it through the property. Rows can also become unshared in other ways. To access a row without unsharing it, use the method. When working with large amounts of data, you should be aware of how rows are shared and unshared to avoid performance penalties. 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). @@ -135,7 +135,7 @@ method. + To control the instance returned from this method, override the method. If no is currently assigned to the control, a new instance of one is created. @@ -206,12 +206,12 @@ control internally calls the method to determine the appearance of the borders for the row header cells. The control typically uses the value of the property for the `dataGridViewAdvancedBorderStyleInput` parameter. + The control internally calls the method to determine the appearance of the borders for the row header cells. The control typically uses the value of the property for the `dataGridViewAdvancedBorderStyleInput` parameter. ## Examples - The following code example demonstrates how to override the method to customize the borders of the row header cells. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to customize the borders of the row header cells. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.cs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/AdjustColumnHeaderBorderStyle/advancedborderstyle.vb" id="Snippet30"::: @@ -267,7 +267,7 @@ will be created by a call to the method. + If the row does not contain any cells when this property is accessed, a new empty will be created by a call to the method. @@ -317,14 +317,14 @@ method copies the row and its property values, but does not copy the cell values that the row contains. For information about how to copy cell values when cloning a row, see the example section. + The method copies the row and its property values, but does not copy the cell values that the row contains. For information about how to copy cell values when cloning a row, see the example section. - Override the method whenever you derive from and add new properties to the derived class. + Override the method whenever you derive from and add new properties to the derived class. ## Examples - The following example demonstrates how to use the method to copy a row, and then populate the copy with the cell values from the original row. + The following example demonstrates how to use the method to copy a row, and then populate the copy with the cell values from the original row. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet60"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet60"::: @@ -382,11 +382,11 @@ When the control property is set or its property is `true`, getting the value of the property raises the event of the control and returns the value of the property as specified in the event handler. If there are no handlers for the event, getting the value of the property returns the previously specified value or its default value of `null`. - Handling the event is primarily useful when working with large amounts of data to avoid performance penalties when setting the row value for multiple rows. 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). + Handling the event is primarily useful when working with large amounts of data to avoid performance penalties when setting the row value for multiple rows. 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). Changing this property raises the event on the owning , if one exists. - If the current row is shared, use the method rather than getting the value of this property. + If the current row is shared, use the method rather than getting the value of this property. @@ -440,10 +440,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -722,7 +722,7 @@ control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in this row, the styles specified through the property override the styles specified through the , , , and properties, but are overridden by the styles specified through the property. + The control displays its cells using the styles indicated by the cell property, which inherits styles from other properties of type . For cells in this row, the styles specified through the property override the styles specified through the , , , and properties, but are overridden by the styles specified through the property. For more information, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -894,7 +894,7 @@ method, although it can be used when overriding this method in a derived class. + The `rowIndex` parameter is not used in the base-class implementation of the method, although it can be used when overriding this method in a derived class. ]]> @@ -1073,7 +1073,7 @@ method the indexer you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is an invalid value for `rowIndex`. + Pass the method the indexer you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is an invalid value for `rowIndex`. ]]> @@ -1119,7 +1119,7 @@ method the index you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is an invalid value for `rowIndex`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). + Pass the method the index you used to retrieve the . Do not use the property for the `rowIndex` parameter. If the row is shared, is -1, which is an invalid value for `rowIndex`. For more information about row sharing, see [Best Practices for Scaling the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/best-practices-for-scaling-the-windows-forms-datagridview-control). ]]> @@ -1179,7 +1179,7 @@ ## Examples - The following code example uses the method to determine the new padding for a row that has been resized. This code example is part of a larger example provided in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). + The following code example uses the method to determine the new padding for a row that has been resized. This code example is part of a larger example provided in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.vb" id="Snippet40"::: @@ -1238,7 +1238,7 @@ values of -1, which prevents you from using the property with shared rows. To use this method, pass in the actual row index. You can retrieve the actual index of a shared row by calling the method. + This method is useful to determine the state of a shared row. Shared rows have values of -1, which prevents you from using the property with shared rows. To use this method, pass in the actual row index. You can retrieve the actual index of a shared row by calling the method. ]]> @@ -1405,13 +1405,13 @@ ## Remarks This property is useful to determine which cell styles are applied to all cells in a row regardless of any column styles that are also applied to the cells. The row property inherits its values from the following properties: -- +- -- (for rows with odd index number) +- (for rows with odd index number) -- +- -- +- For more information about cell style inheritance, see [Cell Styles in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/cell-styles-in-the-windows-forms-datagridview-control). @@ -1469,7 +1469,7 @@ collection, use the property to determine whether a row is the row for new records or is a populated row. + Because the row for new records is in the collection, use the property to determine whether a row is the row for new records or is a populated row. A row stops being the new row when data entry into the row begins. @@ -1597,7 +1597,7 @@ ## Remarks The control calls this method to paint the row. - Calling this method raises the event. If a handler for the event does not set the property to `true`, this method also calls the and methods and raises the event. + Calling this method raises the event. If a handler for the event does not set the property to `true`, this method also calls the and methods and raises the event. ]]> @@ -1670,7 +1670,7 @@ control calls this method to paint the cells in the row except when a handler for the event sets the property to `true`. For more information, see . + The control calls this method to paint the cells in the row except when a handler for the event sets the property to `true`. For more information, see . ]]> @@ -1738,7 +1738,7 @@ control calls this method to paint the row header except when a handler for the event sets the property to `true`. For more information, see . + The control calls this method to paint the row header except when a handler for the event sets the property to `true`. For more information, see . ]]> @@ -1857,9 +1857,9 @@ If the property is , the user will not be able to manually adjust the row height. - By default, the property value is based on the property value. If you explicitly set to or , however, the control value is ignored. Set to to restore the value-inheritance behavior. + By default, the property value is based on the property value. If you explicitly set to or , however, the control value is ignored. Set to to restore the value-inheritance behavior. - Because restores the value inheritance, the property will never return a value unless the row has not been added to a control. If you need to determine whether the property value of a row is inherited or has been specified explicitly, check its property. If the value includes the flag, the property value is not inherited. + Because restores the value inheritance, the property will never return a value unless the row has not been added to a control. If you need to determine whether the property value of a row is inherited or has been specified explicitly, check its property. If the value includes the flag, the property value is not inherited. @@ -2024,7 +2024,7 @@ method. + You cannot use this property with shared rows because shared rows do not store their state locally. To get the state of a shared row, use the method. ]]> @@ -2066,7 +2066,7 @@ method supplies the class name and the information for this instance of the class. + This overridden version of the method supplies the class name and the information for this instance of the class. ]]> @@ -2111,7 +2111,7 @@ . To completely remove a row, use the method. + Use this property to hide a row from view while keeping the row in the . To completely remove a row, use the method. diff --git a/xml/System.Windows.Forms/DataGridViewRowCollection.xml b/xml/System.Windows.Forms/DataGridViewRowCollection.xml index aa73f6ffa0e..d5f0670c8ec 100644 --- a/xml/System.Windows.Forms/DataGridViewRowCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewRowCollection.xml @@ -146,9 +146,9 @@ overload adds rows that are based on the of the . The new row is shared, if possible. Be sure that the row specified in the property can be shared for best scalability. 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). + The overload adds rows that are based on the of the . The new row is shared, if possible. Be sure that the row specified in the property can be shared for best scalability. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -235,9 +235,9 @@ method adds shared rows to the . The new rows are based on the of the . Be sure that the row specified in the property can be shared for best scalability. 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). + The method adds shared rows to the . The new rows are based on the of the . Be sure that the row specified in the property can be shared for best scalability. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -335,9 +335,9 @@ method adds an unshared row to the . 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). + The method adds an unshared row to the . 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -426,9 +426,9 @@ method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). + The method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -524,9 +524,9 @@ property of the new has the same values as the of the positioned at `indexSource`. The method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). + The property of the new has the same values as the of the positioned at `indexSource`. The method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -607,9 +607,9 @@ property of the new row has the same values as the of the row positioned at `indexSource`. The method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). + The property of the new row has the same values as the of the row positioned at `indexSource`. The method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -698,17 +698,17 @@ method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). + The method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. > [!IMPORTANT] -> Due to a bug, the method will make your application stop responding if the property is `true` and the row for new records is selected. To work around this bug, you must cancel the selection of the row before calling this method, and then reselect the row. For more information, see the code example in this topic. +> Due to a bug, the method will make your application stop responding if the property is `true` and the row for new records is selected. To work around this bug, you must cancel the selection of the row before calling this method, and then reselect the row. For more information, see the code example in this topic. ## Examples - The following code example demonstrates how to use the method when the row for new records is selected to work around the bug indicated in the Remarks section. + The following code example demonstrates how to use the method when the row for new records is selected to work around the bug indicated in the Remarks section. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet30"::: @@ -886,7 +886,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridViewRowCollection1`. Then ensure that the event handler is associated with the event. @@ -1215,7 +1215,7 @@ method begins looking for the row that matches the criteria starting with the row positioned after `indexStart`. + The method begins looking for the row that matches the criteria starting with the row positioned after `indexStart`. ]]> @@ -1265,7 +1265,7 @@ method begins looking for the row that matches the criteria starting with the row positioned after `indexStart`. + The method begins looking for the row that matches the criteria starting with the row positioned after `indexStart`. ]]> @@ -1321,7 +1321,7 @@ method begins looking for the row that matches the criteria starting with the row positioned before `indexStart`. + The method begins looking for the row that matches the criteria starting with the row positioned before `indexStart`. ]]> @@ -1371,7 +1371,7 @@ method begins looking for the row that matches the criteria starting with the row positioned before `indexStart`. + The method begins looking for the row that matches the criteria starting with the row positioned before `indexStart`. ]]> @@ -1582,9 +1582,9 @@ method adds rows that are based on the of the . The new row is shared, if possible. Be sure that the row specified in the property can be shared for best scalability. 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). + The method adds rows that are based on the of the . The new row is shared, if possible. Be sure that the row specified in the property can be shared for best scalability. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -1685,9 +1685,9 @@ method adds an unshared row to the . + The method adds an unshared row to the . - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -1784,9 +1784,9 @@ method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). + The method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -1886,9 +1886,9 @@ property of the new objects has the same values as the of the positioned at `indexSource`. The method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). + The property of the new objects has the same values as the of the positioned at `indexSource`. The method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -1980,9 +1980,9 @@ property of the new has the same values as the of the positioned at `indexSource`. The method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). + This method assigns the new row the index specified in the `indexDestination` parameter and increments the indexes for all subsequent rows. The property of the new has the same values as the of the positioned at `indexSource`. The method adds a shared row to the , if possible. Otherwise, the new row is unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -2071,17 +2071,17 @@ method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). + The method adds shared rows to the , if possible. Otherwise, the new rows are unshared. 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). - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. > [!IMPORTANT] -> Due to a bug, the method will make your application stop responding if any rows with an index greater than `rowIndex` are selected. To work around this bug, you must cancel the selection of these rows before calling this method, and reselect the rows afterward. For more information, see the code example in this topic. +> Due to a bug, the method will make your application stop responding if any rows with an index greater than `rowIndex` are selected. To work around this bug, you must cancel the selection of these rows before calling this method, and reselect the rows afterward. For more information, see the code example in this topic. ## Examples - The following code example demonstrates how to use the method to insert rows before selected rows to work around the bug indicated in the Remarks section. + The following code example demonstrates how to use the method to insert rows before selected rows to work around the bug indicated in the Remarks section. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/BeginEdit/misc2.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/BeginEdit/misc2.vb" id="Snippet40"::: @@ -2235,7 +2235,7 @@ unshares all the rows in the , so you should avoid using this property. + The unshares all the rows in the , so you should avoid using this property. ]]> @@ -2279,7 +2279,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2468,7 +2468,7 @@ method returns a without unsharing the row. If you modify a shared row, all the rows that share that row will be modified. + The method returns a without unsharing the row. If you modify a shared row, all the rows that share that row will be modified. ]]> @@ -2750,9 +2750,9 @@ ## Remarks This method is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - This method calls the overload, passing in `value` after casting it to a . + This method calls the overload, passing in `value` after casting it to a . - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> @@ -3025,9 +3025,9 @@ ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - This method calls the overload, passing in value after casting it to a . + This method calls the overload, passing in value after casting it to a . - Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. + Rows in the control are not automatically sorted when new rows are added. To sort new rows into their correct position, call the method in a event handler. You might also want to call the method in a event handler to sort the rows when the user modifies a cell. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventArgs.xml index f1aed6bda01..2cd64563f38 100644 --- a/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventArgs.xml @@ -41,7 +41,7 @@ You can use the property to determine the state of a row or the values it contains, and use this information to change or modify the property. This property is initialized with the value of the row property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). diff --git a/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventHandler.xml b/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventHandler.xml index db35c5ed598..8bea1dd6a8d 100644 --- a/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewRowContextMenuStripNeededEventHandler.xml @@ -51,7 +51,7 @@ You can use the property to determine the state of a row or the values it contains, and use this information to change or modify the property. This property is initialized with the value of the row property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). diff --git a/xml/System.Windows.Forms/DataGridViewRowDividerDoubleClickEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowDividerDoubleClickEventArgs.xml index c933b14e06d..c31052fa334 100644 --- a/xml/System.Windows.Forms/DataGridViewRowDividerDoubleClickEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowDividerDoubleClickEventArgs.xml @@ -32,7 +32,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -122,12 +122,12 @@ collection. + The index is the zero-based index of the row in the collection. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventArgs.xml index bc8304b792c..84bef4cfa3b 100644 --- a/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventArgs.xml @@ -41,14 +41,14 @@ You can use the property to determine the state or value of a row, and use this information to change or modify the property. This property is initialized with the value of the row property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -166,7 +166,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventHandler.xml b/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventHandler.xml index b5367f16b47..86258fcdde4 100644 --- a/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewRowErrorTextNeededEventHandler.xml @@ -51,7 +51,7 @@ You can use the property to determine the state or value of a row, and use this information to change or modify the property. This property is initialized with the value of the row property, which the event value overrides. - Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). + Handle the event when working with large amounts of data to avoid the performance penalties of setting the row value for multiple rows. 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). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). diff --git a/xml/System.Windows.Forms/DataGridViewRowHeaderCell+DataGridViewRowHeaderCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewRowHeaderCell+DataGridViewRowHeaderCellAccessibleObject.xml index b8978a944cd..c7c5510b944 100644 --- a/xml/System.Windows.Forms/DataGridViewRowHeaderCell+DataGridViewRowHeaderCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewRowHeaderCell+DataGridViewRowHeaderCellAccessibleObject.xml @@ -36,12 +36,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -194,7 +194,7 @@ method selects the row if the property is set to or . + The method selects the row if the property is set to or . ]]> @@ -277,13 +277,13 @@ owns the that is returned by the method. + The following table describes which owns the that is returned by the method. |Parameter value|Description| |---------------------|-----------------| -||The first in the row, not including the . returns the below the current row if the has no other columns.| -||The above the current row. returns `null` if the current row is the first row.| -||The below the current row. returns `null` if the current row is the last row.| +||The first in the row, not including the . returns the below the current row if the has no other columns.| +||The above the current row. returns `null` if the current row is the first row.| +||The below the current row. returns `null` if the current row is the last row.| |All other values|`null`.| ]]> diff --git a/xml/System.Windows.Forms/DataGridViewRowHeaderCell.xml b/xml/System.Windows.Forms/DataGridViewRowHeaderCell.xml index 6a2d31e9150..d0f596f5d07 100644 --- a/xml/System.Windows.Forms/DataGridViewRowHeaderCell.xml +++ b/xml/System.Windows.Forms/DataGridViewRowHeaderCell.xml @@ -144,10 +144,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -205,7 +205,7 @@ property of the control, this method is called by the control's method to retrieve a clipboard-formatted value that represents the cell. + Depending on the value of the property of the control, this method is called by the control's method to retrieve a clipboard-formatted value that represents the cell. The position-related parameters of this method indicate where this cell is located in the table of data representing the region defined by the selected cells in the control. Depending on the cell's position, formatting information may be returned by this method in addition to the cell value. For example, the HTML format for a cell in the first column of a row will include the tag that indicates the beginning of a row. diff --git a/xml/System.Windows.Forms/DataGridViewRowHeadersWidthSizeMode.xml b/xml/System.Windows.Forms/DataGridViewRowHeadersWidthSizeMode.xml index 26b7b935341..c9ab33ecda1 100644 --- a/xml/System.Windows.Forms/DataGridViewRowHeadersWidthSizeMode.xml +++ b/xml/System.Windows.Forms/DataGridViewRowHeadersWidthSizeMode.xml @@ -30,7 +30,7 @@ The control can adjust the width of its row headers to fit all their contents, only the contents of the first header, or only the contents of currently displayed headers. Calculating the new width using a subset of headers is useful to avoid a performance penalty when working with many rows of data. - This enumeration is used by the control property and method. + This enumeration is used by the control property and method. For more information about sizing modes, see [Sizing Options in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/sizing-options-in-the-windows-forms-datagridview-control). diff --git a/xml/System.Windows.Forms/DataGridViewRowHeightInfoNeededEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowHeightInfoNeededEventArgs.xml index 8c28f42757a..1313f53204f 100644 --- a/xml/System.Windows.Forms/DataGridViewRowHeightInfoNeededEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowHeightInfoNeededEventArgs.xml @@ -24,21 +24,21 @@ Provides data for the event of a . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet351"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: + ]]> @@ -79,16 +79,16 @@ Gets or sets the height of the row the event occurred for. The row height. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet351"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: + ]]> The specified value when setting this property is greater than 65,536. @@ -131,16 +131,16 @@ Gets or sets the minimum height of the row the event occurred for. The minimum row height. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet351"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: + ]]> The specified value when setting this property is less than 2. @@ -183,16 +183,16 @@ Gets the index of the row associated with this . The zero-based index of the row the event occurred for. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet351"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet351"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewRowHeightInfoPushedEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowHeightInfoPushedEventArgs.xml index 4c467b08add..7870201c690 100644 --- a/xml/System.Windows.Forms/DataGridViewRowHeightInfoPushedEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowHeightInfoPushedEventArgs.xml @@ -24,21 +24,21 @@ Provides data for the event of a . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet352"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: + ]]> @@ -81,16 +81,16 @@ Gets the height of the row the event occurred for. The row height, in pixels. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet352"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: + ]]> @@ -132,16 +132,16 @@ Gets the minimum height of the row the event occurred for. The minimum row height, in pixels. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet352"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: + ]]> @@ -183,16 +183,16 @@ Gets the index of the row the event occurred for. The zero-based index of the row. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet352"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet352"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.xml index 5f2771ccb6c..bde8063b82e 100644 --- a/xml/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowPostPaintEventArgs.xml @@ -162,7 +162,7 @@ property represents the area of the that needs to be repainted. For example, if a user covers the entire with another window and then uncovers it, then represents the entire . If a user covers a small area of the and then uncovers it, then represents the small area that was covered. + The property represents the area of the that needs to be repainted. For example, if a user covers the entire with another window and then uncovers it, then represents the entire . If a user covers a small area of the and then uncovers it, then represents the small area that was covered. @@ -216,12 +216,12 @@ method when you draw the and its cells' contents yourself. + Use the method when you draw the and its cells' contents yourself. ## Examples - The following code example demonstrates how to use the method to draw a focus around the visible cells of the row. This example is part of a larger example available in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). + The following code example demonstrates how to use the method to draw a focus around the visible cells of the row. This example is part of a larger example available in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.cs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.vb" id="Snippet30"::: @@ -385,14 +385,14 @@ property contains the same values as the current row's property. Directly accessing a in the can affect performance. Use in the event to avoid unsharing the row and maintain optimal performance. + The property contains the same values as the current row's property. Directly accessing a in the can affect performance. Use in the event to avoid unsharing the row and maintain optimal performance. The property is read-only. Although you can set the properties of the retrieved through the property, the new settings will have no effect. ## Examples - The following code example demonstrates how to use the to determine the color to use to draw the content. The variable, `e`, is of type . This code example is part of a larger example provided in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). + The following code example demonstrates how to use the to determine the color to use to draw the content. The variable, `e`, is of type . This code example is part of a larger example provided in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.cs" id="Snippet34"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.vb" id="Snippet34"::: @@ -736,7 +736,7 @@ property is the same as the width of the . To get the width of the columns in the , use the method. + The width of the property is the same as the width of the . To get the width of the columns in the , use the method. diff --git a/xml/System.Windows.Forms/DataGridViewRowPrePaintEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowPrePaintEventArgs.xml index aa1c268ca64..c19f3f7e6d2 100644 --- a/xml/System.Windows.Forms/DataGridViewRowPrePaintEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowPrePaintEventArgs.xml @@ -162,7 +162,7 @@ property represents the area of the that needs to be repainted. For example, if a user covers the entire with another window and then uncovers it, then represents the entire . If a user covers a small area of the and then uncovers it, then represents the small area that was covered. + The property represents the area of the that needs to be repainted. For example, if a user covers the entire with another window and then uncovers it, then represents the entire . If a user covers a small area of the and then uncovers it, then represents the small area that was covered. @@ -216,12 +216,12 @@ method when you draw the and its cells' contents yourself. If you manually paint the entire row and its cells' contents, set the property to `true`. When is `true`, the and events do not occur. + Use the method when you draw the and its cells' contents yourself. If you manually paint the entire row and its cells' contents, set the property to `true`. When is `true`, the and events do not occur. ## Examples - The following code example demonstrates how to use the method to draw a focus around the visible cells of the row. The code actually uses the method, which is nearly identical to the method of . This example is part of a larger example available in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). + The following code example demonstrates how to use the method to draw a focus around the visible cells of the row. The code actually uses the method, which is nearly identical to the method of . This example is part of a larger example available in [How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/customize-the-appearance-of-rows-in-the-datagrid). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.cs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/ColumnWidthChanged/datagridviewrowpainting.vb" id="Snippet30"::: @@ -386,7 +386,7 @@ property contains the same values as the row's property. Directly accessing a in the can affect performance. Use in the event to avoid unsharing the row and maintain optimal performance. + The property contains the same values as the row's property. Directly accessing a in the can affect performance. Use in the event to avoid unsharing the row and maintain optimal performance. The property is read-only. Although you can set the properties of the retrieved through the property, the new settings will have no effect. @@ -579,7 +579,7 @@ method when you draw the and its cells' contents yourself. If you manually paint the entire row and its cells' contents, set the property to `true`. When is `true`, the and events do not occur. + Use the method when you draw the and its cells' contents yourself. If you manually paint the entire row and its cells' contents, set the property to `true`. When is `true`, the and events do not occur. ]]> @@ -670,7 +670,7 @@ method when you draw the and its cells' contents yourself. If you manually paint the entire row and its cells' contents, set the property to `true`. When is `true`, the and events do not occur. + Use the method when you draw the and its cells' contents yourself. If you manually paint the entire row and its cells' contents, set the property to `true`. When is `true`, the and events do not occur. ]]> @@ -800,7 +800,7 @@ property is the same as the width of the . To get the width of the columns in the , use the method. + The width of the property is the same as the width of the . To get the width of the columns in the , use the method. diff --git a/xml/System.Windows.Forms/DataGridViewRowStateChangedEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowStateChangedEventArgs.xml index dca8a5aa31e..40a3d108fc6 100644 --- a/xml/System.Windows.Forms/DataGridViewRowStateChangedEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowStateChangedEventArgs.xml @@ -38,7 +38,7 @@ For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -94,7 +94,7 @@ and properties. + This constructor uses the parameter values to initialize the and properties. ]]> @@ -143,7 +143,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -193,7 +193,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/DataGridViewRowsAddedEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowsAddedEventArgs.xml index f318a991b77..e416b124597 100644 --- a/xml/System.Windows.Forms/DataGridViewRowsAddedEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowsAddedEventArgs.xml @@ -24,22 +24,22 @@ Provides data for the event. - event occurs when rows are added to a control. When the user adds a new row using the row for new records, the value in the handler for this event is equal to the index of the new location of the row for new records, which is one greater than the row just added. When you add rows programmatically, however, the value is the index of the first row added. - - For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example handles the event to increment the number of rows in a virtual . The number of rows is used in the handler so it knows when to show a blank cell versus an initialized cell for a new row. This example is part of a larger example available in the reference topic. - + event occurs when rows are added to a control. When the user adds a new row using the row for new records, the value in the handler for this event is equal to the index of the new location of the row for new records, which is one greater than the row just added. When you add rows programmatically, however, the value is the index of the first row added. + + For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example handles the event to increment the number of rows in a virtual . The number of rows is used in the handler so it knows when to show a blank cell versus an initialized cell for a new row. This example is part of a larger example available in the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidating/virtual.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidating/virtual.vb" id="Snippet20"::: + ]]> @@ -124,16 +124,16 @@ Gets the number of rows that have been added. The number of rows that have been added. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet357"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet357"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet357"::: + ]]> @@ -173,21 +173,21 @@ Gets the index of the first added row. The index of the first added row. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet357"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet357"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet357"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewRowsAddedEventHandler.xml b/xml/System.Windows.Forms/DataGridViewRowsAddedEventHandler.xml index 464ad61c79f..36662a419a8 100644 --- a/xml/System.Windows.Forms/DataGridViewRowsAddedEventHandler.xml +++ b/xml/System.Windows.Forms/DataGridViewRowsAddedEventHandler.xml @@ -40,22 +40,22 @@ A that contains the event data. Represents the method that will handle the event of a . - event occurs when rows are added to a control. - - When you create a 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/). - - - -## Examples - The following code example uses a in virtual mode to store the fact that a row has been added. This example is part of a larger example available in the reference topic. - + event occurs when rows are added to a control. + + When you create a 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/). + + + +## Examples + The following code example uses a in virtual mode to store the fact that a row has been added. This example is part of a larger example available in the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataGridView._Virtual/CPP/virtual.cpp" id="Snippet30"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/CellValidating/virtual.cs" id="Snippet30"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidating/virtual.vb" id="Snippet30"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/CellValidating/virtual.vb" id="Snippet30"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewRowsRemovedEventArgs.xml b/xml/System.Windows.Forms/DataGridViewRowsRemovedEventArgs.xml index c4a192f9e30..100c69aa7b3 100644 --- a/xml/System.Windows.Forms/DataGridViewRowsRemovedEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewRowsRemovedEventArgs.xml @@ -24,23 +24,23 @@ Provides data for the event. - control, the index numbers of subsequent rows are lowered to compensate. - - For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + control, the index numbers of subsequent rows are lowered to compensate. + + For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet358"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet358"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet358"::: + ]]> @@ -81,10 +81,10 @@ Initializes a new instance of the class. To be added. - is less than 0. - - -or- - + is less than 0. + + -or- + is less than 1. @@ -124,16 +124,16 @@ Gets the number of rows that were deleted. The number of deleted rows. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet358"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet358"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet358"::: + ]]> @@ -173,16 +173,16 @@ Gets the zero-based index of the row deleted, or the first deleted row if multiple rows were deleted. The zero-based index of the row that was deleted, or the first deleted row if multiple rows were deleted. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet358"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet358"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet358"::: + ]]> diff --git a/xml/System.Windows.Forms/DataGridViewSelectedCellCollection.xml b/xml/System.Windows.Forms/DataGridViewSelectedCellCollection.xml index 44fd5e58202..68cc5094467 100644 --- a/xml/System.Windows.Forms/DataGridViewSelectedCellCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewSelectedCellCollection.xml @@ -91,7 +91,7 @@ class directly. To clear the , use the method. + This method is not relevant for this class. You cannot change the class directly. To clear the , use the method. ]]> @@ -621,7 +621,7 @@ class directly. To clear the , use the method. + You cannot change the class directly. To clear the , use the method. This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. diff --git a/xml/System.Windows.Forms/DataGridViewSelectedColumnCollection.xml b/xml/System.Windows.Forms/DataGridViewSelectedColumnCollection.xml index 58fb72a5f8a..af7aecc71d2 100644 --- a/xml/System.Windows.Forms/DataGridViewSelectedColumnCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewSelectedColumnCollection.xml @@ -49,7 +49,7 @@ ## Remarks The order of columns in the collection is not guaranteed to match the order in which they were selected. - The does not perform efficiently when working with large numbers of columns. Typically, controls will not contain enough columns for this to be an issue, but if you are working with large numbers of columns, you can use the to determine if the entire grid is selected, or you can use the to determine the number of selected columns (or the number of columns in a specified state). 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). + The does not perform efficiently when working with large numbers of columns. Typically, controls will not contain enough columns for this to be an issue, but if you are working with large numbers of columns, you can use the to determine if the entire grid is selected, or you can use the to determine the number of selected columns (or the number of columns in a specified state). 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). ]]> @@ -96,7 +96,7 @@ class directly. To clear the , use the method. + This method is not relevant for this class. You cannot change the class directly. To clear the , use the method. ]]> @@ -629,7 +629,7 @@ class directly. To clear the , use the method. + You cannot change the class directly. To clear the , use the method. This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. diff --git a/xml/System.Windows.Forms/DataGridViewSelectedRowCollection.xml b/xml/System.Windows.Forms/DataGridViewSelectedRowCollection.xml index 854c7ca401f..1d4a3c6f81e 100644 --- a/xml/System.Windows.Forms/DataGridViewSelectedRowCollection.xml +++ b/xml/System.Windows.Forms/DataGridViewSelectedRowCollection.xml @@ -91,7 +91,7 @@ class directly. To clear the , use the method. + This method is not relevant for this class. You cannot change the class directly. To clear the , use the method. ]]> @@ -624,7 +624,7 @@ class directly. To clear the , use the method. + You cannot change the class directly. To clear the , use the method. This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. diff --git a/xml/System.Windows.Forms/DataGridViewSortCompareEventArgs.xml b/xml/System.Windows.Forms/DataGridViewSortCompareEventArgs.xml index 16aaa5eb7ba..f2c91c61a18 100644 --- a/xml/System.Windows.Forms/DataGridViewSortCompareEventArgs.xml +++ b/xml/System.Windows.Forms/DataGridViewSortCompareEventArgs.xml @@ -33,9 +33,9 @@ event to provide custom sorting. This event occurs only when the property is not set and the property is set to `false`. This event occurs once for each pair of cells in the column being sorted. It occurs only when the user clicks the header of a column with a property value of , or when you call the overload. When this event occurs for a column with a property value of , you must display the sorting glyph yourself through the property. + You can handle the event to provide custom sorting. This event occurs only when the property is not set and the property is set to `false`. This event occurs once for each pair of cells in the column being sorted. It occurs only when the user clicks the header of a column with a property value of , or when you call the overload. When this event occurs for a column with a property value of , you must display the sorting glyph yourself through the property. - You can use this event to sort rows using the cell values in one column or in multiple columns. Use the and properties to compare cell values in the column specified in the property. Use the and properties to access values in other columns through the collection. + You can use this event to sort rows using the cell values in one column or in multiple columns. Use the and properties to compare cell values in the column specified in the property. Use the and properties to access values in other columns through the collection. @@ -160,7 +160,7 @@ ## Examples - The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). + The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SortCompare/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SortCompare/form1.vb" id="Snippet10"::: @@ -218,7 +218,7 @@ ## Examples - The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). + The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SortCompare/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SortCompare/form1.vb" id="Snippet10"::: @@ -279,7 +279,7 @@ ## Examples - The following code example demonstrates the use of in a multiple column sort. In this example the ID column is used to determine the final order if there are identical values in the sorted column, so no additional sorting will be done if there are duplicate values in the ID column. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). + The following code example demonstrates the use of in a multiple column sort. In this example the ID column is used to determine the final order if there are identical values in the sorted column, so no additional sorting will be done if there are duplicate values in the ID column. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SortCompare/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SortCompare/form1.vb" id="Snippet10"::: @@ -333,7 +333,7 @@ ## Examples - The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). + The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SortCompare/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SortCompare/form1.vb" id="Snippet10"::: @@ -388,7 +388,7 @@ ## Examples - The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). + The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SortCompare/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SortCompare/form1.vb" id="Snippet10"::: @@ -442,12 +442,12 @@ event. You will typically set this value to the return value of a comparison method such as . + Setting this value is typically the last operation you will perform in a handler for the event. You will typically set this value to the return value of a comparison method such as . ## Examples - The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). + The following code example demonstrates the use of in a multiple column sort. This example is part of a larger example provided in [How to: Customize Sorting in the Windows Forms DataGridView Control](/dotnet/desktop/winforms/controls/how-to-customize-sorting-in-the-windows-forms-datagridview-control). :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridView/SortCompare/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DataGridView/SortCompare/form1.vb" id="Snippet10"::: diff --git a/xml/System.Windows.Forms/DataGridViewTextBoxCell.xml b/xml/System.Windows.Forms/DataGridViewTextBoxCell.xml index c2e09a5dc98..0619d6cc8bd 100644 --- a/xml/System.Windows.Forms/DataGridViewTextBoxCell.xml +++ b/xml/System.Windows.Forms/DataGridViewTextBoxCell.xml @@ -35,7 +35,7 @@ ## Remarks The class is a specialized type of used to display a single string of editable text-based information. The currently selected hosts a control in which the user can edit the cell's value (assuming the property of the is set to `false`). - The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. + The is the column type specialized to hold cells of this type. By default, the is initialized to a new . To pattern the cells within a column after an existing , set the column's property to the cell to use as a pattern. The cell-related properties of the column are wrappers for the similarly-named properties of the template cell. Changing the property values of the template cell will affect only cells based on the template that are added after the change. Changing the cell-related property values of the column, however, will update the template cell and all other cells in the column, and refresh the column display if necessary. @@ -135,7 +135,7 @@ method whenever you derive from and add new properties to the derived class. + Override the method whenever you derive from and add new properties to the derived class. ]]> @@ -437,11 +437,11 @@ For additional information, see [What's New in Accessibility in the .NET Framewo method initializes the hosted editing control as described in the base method. For every invocation, this method also sets the following visual attributes of the editing control: + The method initializes the hosted editing control as described in the base method. For every invocation, this method also sets the following visual attributes of the editing control: - The property is set to . -- The and properties are set to `true`. +- The and properties are set to `true`. - The property is set to the `initialFormattedValue` parameter. @@ -585,7 +585,7 @@ For additional information, see [What's New in Accessibility in the .NET Framewo method. It is called in the same circumstances in which an event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which an event is raised, but it does not actually raise the event. ]]> @@ -635,7 +635,7 @@ For additional information, see [What's New in Accessibility in the .NET Framewo ## Remarks Resets the instance's click state to ensure that leaving then re-entering the cell requires a double click to start edit mode. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> @@ -680,9 +680,9 @@ For additional information, see [What's New in Accessibility in the .NET Framewo determines whether the mouse click is part of a double click that starts an edit session. + determines whether the mouse click is part of a double click that starts an edit session. - This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. + This method is similar to the method. It is called in the same circumstances in which a event is raised, but it does not actually raise the event. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewTextBoxColumn.xml b/xml/System.Windows.Forms/DataGridViewTextBoxColumn.xml index 74710995466..fe8d4bb0b51 100644 --- a/xml/System.Windows.Forms/DataGridViewTextBoxColumn.xml +++ b/xml/System.Windows.Forms/DataGridViewTextBoxColumn.xml @@ -96,8 +96,8 @@ |Property|Value| |--------------|-----------| -||A newly created .| -||| +||A newly created .| +||| ]]> @@ -151,7 +151,7 @@ The constructor for the class initializes this property to a newly created . > [!CAUTION] -> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). +> Changing the properties of the cell template will not immediately affect the user interface (UI) of the column's existing cells. These changes are only apparent after the column is regenerated (for example, by sorting the column or through a call to the method). @@ -275,7 +275,7 @@ The default sort mode of a is . The default sort mode for other column types is . - The value does not prevent you from sorting a column programmatically, although other restrictions may apply. For more information, see the method. + The value does not prevent you from sorting a column programmatically, although other restrictions may apply. For more information, see the method. A property value of will not prevent the event from occurring, but it will prevent the header from changing its appearance when it is clicked. diff --git a/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell+DataGridViewTopLeftHeaderCellAccessibleObject.xml b/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell+DataGridViewTopLeftHeaderCellAccessibleObject.xml index 8e23734142e..eff009bfbe6 100644 --- a/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell+DataGridViewTopLeftHeaderCellAccessibleObject.xml +++ b/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell+DataGridViewTopLeftHeaderCellAccessibleObject.xml @@ -36,12 +36,12 @@ The class inherits from the class to provide information about a to accessibility client applications. Each class that represents a visual part of the - such as , , and - also contains a class that inherits from to provide information about the containing class and perform actions on behalf of accessibility client applications. - There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide additional information, such as the name or description of the control, to accessibility client applications. There are two ways of providing this additional information. To provide limited accessibility information for existing controls, set the control's and property values, which will be reported to accessibility client applications. > [!NOTE] -> You should change the and property values only in rare situations, such as if you make a look like a list. +> You should change the and property values only in rare situations, such as if you make a look like a list. - Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. + Occasionally, you might require more accessibility information or different accessibility actions to be included with your custom or . To customize accessibility, you can write your own class that derives from the or classes and override the method. For example, if you are writing a custom row header cell that implements unique custom actions, such as special hit testing within your cell, you should create a class that inherits from the class and override the method. The exposes its data structure by using values to define the data table hierarchy. For more information on exposing data tables to Microsoft Active Accessibility, see [Exposing Data Tables through Microsoft Active Accessibility](https://learn.microsoft.com/previous-versions/windows/desktop/dnacc/exposing-data-tables-through-microsoft-active-accessibility). @@ -190,7 +190,7 @@ method calls the method. + The method calls the method. ]]> @@ -274,7 +274,7 @@ value for `navigationDirection`, the method returns an that represents the for the first column. returns the same object if you specify or when right-to-left support is enabled. All other values return `null`. + When you specify the value for `navigationDirection`, the method returns an that represents the for the first column. returns the same object if you specify or when right-to-left support is enabled. All other values return `null`. ]]> @@ -365,7 +365,7 @@ property value always includes the value. The value includes the value if all visible cells in the control are selected. The value includes the value if the is hidden. + The property value always includes the value. The value includes the value if all visible cells in the control are selected. The value includes the value if the is hidden. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell.xml b/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell.xml index afe48566cd8..5676d899630 100644 --- a/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell.xml +++ b/xml/System.Windows.Forms/DataGridViewTopLeftHeaderCell.xml @@ -103,10 +103,10 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] -> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. +> To get or set , you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ]]> @@ -260,7 +260,7 @@ method. + This method relies on the method. ]]> diff --git a/xml/System.Windows.Forms/DataGridViewTriState.xml b/xml/System.Windows.Forms/DataGridViewTriState.xml index 4c8b0fcba2c..077c0257493 100644 --- a/xml/System.Windows.Forms/DataGridViewTriState.xml +++ b/xml/System.Windows.Forms/DataGridViewTriState.xml @@ -26,7 +26,7 @@ enumeration is useful whenever a third state is needed in addition to the two states of the type. For example, the property is of type so that a object can indicate no preference in regards to the text wrapping of a cell value, and can instead indicate that the value of a different object should be used. + The enumeration is useful whenever a third state is needed in addition to the two states of the type. For example, the property is of type so that a object can indicate no preference in regards to the text wrapping of a cell value, and can instead indicate that the value of a different object should be used. diff --git a/xml/System.Windows.Forms/DataObject.xml b/xml/System.Windows.Forms/DataObject.xml index 885c245b128..66683c96d0d 100644 --- a/xml/System.Windows.Forms/DataObject.xml +++ b/xml/System.Windows.Forms/DataObject.xml @@ -66,18 +66,18 @@ Multiple pieces of data in different formats can be stored in a . Data is retrieved from a by its associated format. Because the target application might not be known, you can increase the likelihood that the data will be in the appropriate format for an application by placing the data in a in multiple formats. See for the predefined formats. You can implement your own format by creating an instance of the class. - To store data in a , pass the data to the constructor or call . You can add data in multiple formats to the same . If you want the data you add to be retrieved in its native format only, call with the `autoConvert` parameter set to `false`. + To store data in a , pass the data to the constructor or call . You can add data in multiple formats to the same . If you want the data you add to be retrieved in its native format only, call with the `autoConvert` parameter set to `false`. - Data can be retrieved from a in any format which is compatible with . For example, text can be converted to Unicode. To retrieve data in the format in which it was stored, call with the `autoConvert` parameter set to `false`. + Data can be retrieved from a in any format which is compatible with . For example, text can be converted to Unicode. To retrieve data in the format in which it was stored, call with the `autoConvert` parameter set to `false`. - To determine what formats the data is stored in, call . To determine if a format is available, call with the desired format. + To determine what formats the data is stored in, call . To determine if a format is available, call with the desired format. -The class provides additional methods that make it easier to work with data in common formats. To add data of a particular format to the , use the appropriate `Set`*Format* method, such as . To retrieve data of a particular format from the , first call the appropriate `Contains`*Format* method (such as ) to determine whether the contains data in that format, then call the appropriate `Get`*Format* method (such as ) to retrieve the data if the contains it. +The class provides additional methods that make it easier to work with data in common formats. To add data of a particular format to the , use the appropriate `Set`*Format* method, such as . To retrieve data of a particular format from the , first call the appropriate `Contains`*Format* method (such as ) to determine whether the contains data in that format, then call the appropriate `Get`*Format* method (such as ) to retrieve the data if the contains it. > [!NOTE] > Special considerations may be necessary when using the metafile format with the Clipboard. Due to a limitation in the current implementation of the class, the metafile format used by the .NET Framework may not be recognized by applications that use an older metafile format. In this case, you must interoperate with the Win32 Clipboard application programming interfaces (APIs). > -> An object must be serializable for it to be put on the Clipboard. See for more information on serialization. If your target application requires a very specific data format, the headers added to the data in the serialization process may prevent the application from recognizing your data. To preserve your data format, add your data as a array to a and pass the to the method. +> An object must be serializable for it to be put on the Clipboard. See for more information on serialization. If your target application requires a very specific data format, the headers added to the data in the serialization process may prevent the application from recognizing your data. To preserve your data format, add your data as a array to a and pass the to the method. @@ -280,7 +280,7 @@ You can add data in any format to the whe method. + Use this method to determine whether the data object contains audio data before retrieving it with the method. ]]> @@ -323,7 +323,7 @@ You can add data in any format to the whe ## Remarks A file drop list is a collection of strings containing path information for files. - Use this method to determine whether the data object contains a file drop list before retrieving it with the method. + Use this method to determine whether the data object contains a file drop list before retrieving it with the method. ]]> @@ -364,7 +364,7 @@ You can add data in any format to the whe method. + Use this method to determine whether the data object contains image data before retrieving it with the method. ]]> @@ -423,7 +423,7 @@ You can add data in any format to the whe method. + Use this method to determine whether the data object contains text data before retrieving it with the method. ]]> @@ -467,7 +467,7 @@ You can add data in any format to the whe method. + Use this method to determine whether the data object contains text data before retrieving it with the method. ]]> @@ -510,9 +510,9 @@ You can add data in any format to the whe method to determine whether the data object contains audio data before retrieving it with this method. + Use the method to determine whether the data object contains audio data before retrieving it with this method. - Use the method to add audio data to the data object. + Use the method to add audio data to the data object. ]]> @@ -587,7 +587,7 @@ You can add data in any format to the whe ## Remarks If this method cannot find data in the specified format, it attempts to convert the data to the format. If the data cannot be converted to the specified format, or if the data was stored with automatic conversion set to `false`, this method returns `null`. - To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this . + To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this . > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -660,7 +660,7 @@ You can add data in any format to the whe ## Remarks If this method cannot find data in the specified format, it attempts to convert the data to the format. If the data cannot be converted to the specified format, or if the data was stored with automatic conversion set to `false`, this method returns `null`. - To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this . + To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this . > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -737,7 +737,7 @@ You can add data in any format to the whe If the `autoConvert` parameter is `false`, this method returns data in the specified format, or `null` if no data in this format can be found. - To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this . + To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this . > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -819,7 +819,7 @@ You can add data in any format to the whe . Call for the formats that are available in this . + Call this method to determine whether a format exists before calling . Call for the formats that are available in this . > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -883,7 +883,7 @@ You can add data in any format to the whe . Call for the formats that are available in this . + Call this method to determine whether a format exists before calling . Call for the formats that are available in this . > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -951,7 +951,7 @@ You can add data in any format to the whe . Call for the formats that are available in this . + Call this method to determine whether a format exists before calling . Call for the formats that are available in this . This method returns `true` when: @@ -1027,9 +1027,9 @@ You can add data in any format to the whe A file drop list is stored in a data object as a array. This method converts this array to a and returns the collection. - Use the method to determine whether the data object contains a file drop list before retrieving it with this method. + Use the method to determine whether the data object contains a file drop list before retrieving it with this method. - Use the method to add a file drop list to the data object. + Use the method to add a file drop list to the data object. ]]> @@ -1089,7 +1089,7 @@ You can add data in any format to the whe . See for the predefined formats. + Call this method to get the supported data formats before calling . See for the predefined formats. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -1150,7 +1150,7 @@ You can add data in any format to the whe . See for the predefined formats. + Call this method to get the supported data formats before calling . See for the predefined formats. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. @@ -1206,9 +1206,9 @@ You can add data in any format to the whe method to determine whether the data object contains image data before retrieving it with this method. + Use the method to determine whether the data object contains image data before retrieving it with this method. - Use the method to add image data to the data object. + Use the method to add image data to the data object. ]]> @@ -1267,9 +1267,9 @@ You can add data in any format to the whe method to determine whether the data object contains text data before retrieving it with this method. + Use the method to determine whether the data object contains text data before retrieving it with this method. - Use the method to add text data to the data object. + Use the method to add text data to the data object. ]]> @@ -1312,9 +1312,9 @@ You can add data in any format to the whe method to determine whether the data object contains text data before retrieving it with this method. + Use the method to determine whether the data object contains text data before retrieving it with this method. - Use the method to add text data to the data object. + Use the method to add text data to the data object. ]]> @@ -1370,7 +1370,7 @@ You can add data in any format to the whe method to determine whether the data object contains audio data before retrieving it with the method. + To retrieve audio data from the data object, first use the method to determine whether the data object contains audio data before retrieving it with the method. ]]> @@ -1414,7 +1414,7 @@ You can add data in any format to the whe method to determine whether the data object contains audio data before retrieving it with the method. + To retrieve audio data from the data object, first use the method to determine whether the data object contains audio data before retrieving it with the method. ]]> @@ -1477,7 +1477,7 @@ You can add data in any format to the whe If you do not know the format of the target application, you can store data in multiple formats using this method. Data stored using this method can be converted to a compatible format when it is retrieved. - The overload stores the `data` value in a format that it determines by calling the method. If `data` implements the interface, this overload also stores the value in the format. + The overload stores the `data` value in a format that it determines by calling the method. If `data` implements the interface, this overload also stores the value in the format. @@ -1630,7 +1630,7 @@ You can add data in any format to the whe ## Examples - The following code example stores data in a using a as the data format. The data is then retrieved by calling using the to specify the data format. The result is displayed in a text box. + The following code example stores data in a using a as the data format. The data is then retrieved by calling using the to specify the data format. The result is displayed in a text box. This code requires that `textBox1` has been created. @@ -1848,7 +1848,7 @@ You can add data in any format to the whe A file drop list is stored in a data object as a array. This method converts `filePaths` to a array before adding it to the data object. - To retrieve a file drop list from the data object, first use the method to determine whether the data object contains data in that format before retrieving it with the method. + To retrieve a file drop list from the data object, first use the method to determine whether the data object contains data in that format before retrieving it with the method. ]]> @@ -1892,7 +1892,7 @@ You can add data in any format to the whe method to determine whether the data object contains image data before retrieving it with the method. + To retrieve image data from the data object, first use the method to determine whether the data object contains image data before retrieving it with the method. ]]> @@ -1954,7 +1954,7 @@ You can add data in any format to the whe method to determine whether the data object contains image data before retrieving it with the method. + To retrieve text data from the data object, first use the method to determine whether the data object contains image data before retrieving it with the method. ]]> @@ -2000,7 +2000,7 @@ You can add data in any format to the whe method to determine whether the data object contains image data before retrieving it with the method. + To retrieve text data from the data object, first use the method to determine whether the data object contains image data before retrieving it with the method. ]]> diff --git a/xml/System.Windows.Forms/DataSourceUpdateMode.xml b/xml/System.Windows.Forms/DataSourceUpdateMode.xml index 07fcf6bce6a..18943f65e90 100644 --- a/xml/System.Windows.Forms/DataSourceUpdateMode.xml +++ b/xml/System.Windows.Forms/DataSourceUpdateMode.xml @@ -28,7 +28,7 @@ ## Remarks When a control is bound to a data source using a object, you can specify when an update to the data source will occur using the enumeration. - When the update mode is Never, you can force the data source to be updated by using the method. + When the update mode is Never, you can force the data source to be updated by using the method. > [!NOTE] > Even when the update mode is set to Never, the data source will be updated when the binding is first created, so at least one update will always occur. diff --git a/xml/System.Windows.Forms/DateRangeEventArgs.xml b/xml/System.Windows.Forms/DateRangeEventArgs.xml index ccdd5ae687b..c25f48cf0b1 100644 --- a/xml/System.Windows.Forms/DateRangeEventArgs.xml +++ b/xml/System.Windows.Forms/DateRangeEventArgs.xml @@ -28,17 +28,17 @@ event occurs when the currently selected date or range of dates changes; for example, when the user explicitly changes a selection within the current month or when the selection is implicitly changed in response to next/previous month navigation. The event occurs when the user explicitly changes a selection. The constructor specifies the start and end for the new date range that has been selected. + The event occurs when the currently selected date or range of dates changes; for example, when the user explicitly changes a selection within the current month or when the selection is implicitly changed in response to next/previous month navigation. The event occurs when the user explicitly changes a selection. The constructor specifies the start and end for the new date range that has been selected. > [!NOTE] -> If a single date is selected, the and property values will be equal. +> If a single date is selected, the and property values will be equal. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following example displays a form containing a control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. + The following example displays a form containing a control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -89,7 +89,7 @@ and property values are set by the `start` and `end` parameter values of this constructor. + The and property values are set by the `start` and `end` parameter values of this constructor. ]]> @@ -134,7 +134,7 @@ control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. + The following example displays a form containing a control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -182,7 +182,7 @@ control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. + The following example displays a form containing a control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DateRangeEventHandler.xml b/xml/System.Windows.Forms/DateRangeEventHandler.xml index 5edd7f7bbef..4456e21eced 100644 --- a/xml/System.Windows.Forms/DateRangeEventHandler.xml +++ b/xml/System.Windows.Forms/DateRangeEventHandler.xml @@ -41,20 +41,20 @@ A that contains the event data. Represents the method that will handle the or event of a . - 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/). - - - -## Examples - The following example displays a form containing a control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. - + 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/). + + + +## Examples + The following example displays a form containing a control that displays one calendar year. The example demonstrates setting properties like , , , , , and to customize the look of the calendar control. Other properties like , , and are set to customize which dates are bolded. The example also sets properties to change the calendar format, including , , , and . The and events are also handled and their status displayed on the form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/DateTimePicker+DateTimePickerAccessibleObject.xml b/xml/System.Windows.Forms/DateTimePicker+DateTimePickerAccessibleObject.xml index f15c226b118..475e949b47c 100644 --- a/xml/System.Windows.Forms/DateTimePicker+DateTimePickerAccessibleObject.xml +++ b/xml/System.Windows.Forms/DateTimePicker+DateTimePickerAccessibleObject.xml @@ -40,9 +40,9 @@ ## Remarks Windows Forms has accessibility support built in and provides information about your application that allows it to work with accessibility client applications. Examples of accessibility client applications are screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. The class inherits from the class to provide information about the control to accessibility client applications. - There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. - If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. + If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. ]]> @@ -259,7 +259,7 @@ will return if the and properties are `true`. + will return if the and properties are `true`. ]]> diff --git a/xml/System.Windows.Forms/DateTimePicker.xml b/xml/System.Windows.Forms/DateTimePicker.xml index 1980503910e..d5188ba60f1 100644 --- a/xml/System.Windows.Forms/DateTimePicker.xml +++ b/xml/System.Windows.Forms/DateTimePicker.xml @@ -73,13 +73,13 @@ When used to represent a date, the control appears in two parts: a drop-down list with a date represented in text, and a calendar that appears when you click the down-arrow next to the list. The calendar looks like the control, which can be used for selecting multiple dates. For more information about the control, see [MonthCalendar Control Overview](/dotnet/desktop/winforms/controls/monthcalendar-control-overview-windows-forms). - You can change the look of the calendar portion of the control by setting the , , , , , and properties. + You can change the look of the calendar portion of the control by setting the , , , , , and properties. To use a spin button control (also known as an up-down control) to adjust the date/time value, set the property to `true`. The calendar will not drop down when the control is selected. The date and time can be adjusted by selecting each element individually and using the up and down buttons to change the value. - The property contains the current date and time the control is set to. You can use the property or the appropriate member of to get the date and time value. For more information, see [How to: Set and Return Dates with the Windows Forms DateTimePicker Control](/dotnet/desktop/winforms/controls/how-to-set-and-return-dates-with-the-windows-forms-datetimepicker-control). You can limit the dates and times that can be selected by setting the and properties. + The property contains the current date and time the control is set to. You can use the property or the appropriate member of to get the date and time value. For more information, see [How to: Set and Return Dates with the Windows Forms DateTimePicker Control](/dotnet/desktop/winforms/controls/how-to-set-and-return-dates-with-the-windows-forms-datetimepicker-control). You can limit the dates and times that can be selected by setting the and properties. - The values can be displayed in four formats, which are set by the property: , , , or . The default date is . + The values can be displayed in four formats, which are set by the property: , , , or . The default date is . If you want the to appear as a control for picking or editing times instead of dates, set the property to `true` and the property to . For more information, see [How to: Display Time with the DateTimePicker Control](/dotnet/desktop/winforms/controls/how-to-display-time-with-the-datetimepicker-control). @@ -184,7 +184,7 @@ has no effect on the appearance of the . To set the background color for the drop-down calendar of the , see the property. + Setting the has no effect on the appearance of the . To set the background color for the drop-down calendar of the , see the property. ]]> @@ -456,7 +456,7 @@ ## Examples - The following code example demonstrates how to initialize the property. This example creates a new control, adds it to the collection of a , and then initializes the property to a dynamically defined . + The following code example demonstrates how to initialize the property. This example creates a new control, adds it to the collection of a , and then initializes the property to a dynamically defined . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DateTimePicker.CalendarFont/CPP/calendarfont.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateTimePicker/CalendarFont/calendarfont.cs" id="Snippet1"::: @@ -510,7 +510,7 @@ ## Examples - The following code example demonstrates how to initialize the property. This example creates a new , adds it to the collection, and then initializes its property to the constant. + The following code example demonstrates how to initialize the property. This example creates a new , adds it to the collection, and then initializes its property to the constant. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DateTimePicker.CalendarForeColor/CPP/calendarforecolor.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateTimePicker/CalendarForeColor/calendarforecolor.cs" id="Snippet1"::: @@ -763,7 +763,7 @@ property value is `true`. If the property value is `true`, the control displays the properly formatted property value; otherwise, the control displays the last valid date/time value assigned to the property or the current date and time () if no value has ever been assigned. + This property is used to obtain the state of the check box that is displayed if the property value is `true`. If the property value is `true`, the control displays the properly formatted property value; otherwise, the control displays the last valid date/time value assigned to the property or the current date and time () if no value has ever been assigned. ]]> @@ -853,7 +853,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DateTimePicker1`. Then ensure that the event handler is associated with the event. @@ -897,7 +897,7 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. @@ -1460,7 +1460,7 @@ ## Examples - The following code example demonstrates initializing a by setting the , , , and properties. To run this example, paste the following code into a form and call `InitializeDateTimePicker` from the form's constructor or event-handling method. + The following code example demonstrates initializing a by setting the , , , and properties. To run this example, paste the following code into a form and call `InitializeDateTimePicker` from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DateTimePicker/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateTimePicker/DropDown/form1.cs" id="Snippet1"::: @@ -1619,7 +1619,7 @@ > [!NOTE] > The property must be set to for the property to affect the formatting of the displayed date and time. - To display only time in a , set the to , and the property to `true`. + To display only time in a , set the to , and the property to `true`. @@ -1672,7 +1672,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DateTimePicker1`. Then ensure that the event handler is associated with the event. @@ -2133,7 +2133,7 @@ The value assigned is less than the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2256,7 +2256,7 @@ The value assigned is less than the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2377,7 +2377,7 @@ The value assigned is less than the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2471,7 +2471,7 @@ The value assigned is less than the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2831,7 +2831,7 @@ The value assigned is less than the property has not been changed in code or by the user, it is set to the current date and time (). + If the property has not been changed in code or by the user, it is set to the current date and time (). @@ -3213,7 +3213,7 @@ The value assigned is less than the . + This enumeration is used by members such as . > [!NOTE] > The actual date/time formats are determined by the date, time, and regional settings set in the user's operating system. @@ -35,7 +35,7 @@ ## Examples - The following code example demonstrates initializing a object by setting the to a value. To run this example paste the following code in a form and call `InitializeDateTimePicker` from the form's constructor or event-handling method. + The following code example demonstrates initializing a object by setting the to a value. To run this example paste the following code in a form and call `InitializeDateTimePicker` from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DateTimePicker/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateTimePicker/DropDown/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DialogResult.xml b/xml/System.Windows.Forms/DialogResult.xml index b8055fe97b7..5a95ea41466 100644 --- a/xml/System.Windows.Forms/DialogResult.xml +++ b/xml/System.Windows.Forms/DialogResult.xml @@ -33,12 +33,12 @@ property and the method use this enumeration. + The property and the method use this enumeration. ## Examples - The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to Yes, the form that displayed the is closed. + The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to Yes, the form that displayed the is closed. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet5"::: diff --git a/xml/System.Windows.Forms/DockStyle.xml b/xml/System.Windows.Forms/DockStyle.xml index cee95cdb9db..d0abe1e7924 100644 --- a/xml/System.Windows.Forms/DockStyle.xml +++ b/xml/System.Windows.Forms/DockStyle.xml @@ -48,7 +48,7 @@ ## Examples - The following example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. + The following example creates a and sets some of its common properties. The example creates a and sets its within the group box. Next, it sets the property of the group box, and docks the group box to the top of the form. Lastly, it disables the group box by setting the property to `false`, which causes all controls contained within the group box to be disabled. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/DomainUpDown+DomainItemAccessibleObject.xml b/xml/System.Windows.Forms/DomainUpDown+DomainItemAccessibleObject.xml index 249eb80f2af..45d7a1d5c92 100644 --- a/xml/System.Windows.Forms/DomainUpDown+DomainItemAccessibleObject.xml +++ b/xml/System.Windows.Forms/DomainUpDown+DomainItemAccessibleObject.xml @@ -48,9 +48,9 @@ ## Remarks Windows Forms has accessibility support built in and provides information about your application that allows it to work with accessibility client applications. Examples of accessibility client applications are screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. The class inherits from the class to provide information about the items in the control to accessibility client applications. - There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. - If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. + If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. ]]> diff --git a/xml/System.Windows.Forms/DomainUpDown+DomainUpDownAccessibleObject.xml b/xml/System.Windows.Forms/DomainUpDown+DomainUpDownAccessibleObject.xml index 6ee5e6c251c..01b74638359 100644 --- a/xml/System.Windows.Forms/DomainUpDown+DomainUpDownAccessibleObject.xml +++ b/xml/System.Windows.Forms/DomainUpDown+DomainUpDownAccessibleObject.xml @@ -52,9 +52,9 @@ ## Remarks Windows Forms has accessibility support built in and provides information about your application that allows it to work with accessibility client applications. Examples of accessibility client applications are screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. The class inherits from the class to provide information about the control to accessibility client applications. - There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. - If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. + If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. ]]> @@ -154,7 +154,7 @@ contains child accessible objects that correspond to the different parts of the control. The following table shows the values of index and the child accessible object the method returns. + The contains child accessible objects that correspond to the different parts of the control. The following table shows the values of index and the child accessible object the method returns. |Value|Description| |-----------|-----------------| diff --git a/xml/System.Windows.Forms/DomainUpDown+DomainUpDownItemCollection.xml b/xml/System.Windows.Forms/DomainUpDown+DomainUpDownItemCollection.xml index 03a8b48a13a..96f8b11c198 100644 --- a/xml/System.Windows.Forms/DomainUpDown+DomainUpDownItemCollection.xml +++ b/xml/System.Windows.Forms/DomainUpDown+DomainUpDownItemCollection.xml @@ -34,12 +34,12 @@ control, you can add or remove the items individually by using the and methods. The collection is accessed from the parent control, , by the property. + To create a collection of objects to display in the control, you can add or remove the items individually by using the and methods. The collection is accessed from the parent control, , by the property. ## Examples - The following example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the up-down control. The code assumes that a , and a have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the up-down control. + The following example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the up-down control. The code assumes that a , and a have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the up-down control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown.DomainUpDownItemCollection Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown+DomainUpDownItemCollection/Overview/source.cs" id="Snippet1"::: @@ -85,14 +85,14 @@ to the collection by using the method. + You can also add a new to the collection by using the method. - To remove an that you have previously added, use the or methods. + To remove an that you have previously added, use the or methods. ## Examples - The following example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the up-down control. The code assumes that a , and a have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the up-down control. + The following example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the up-down control. The code assumes that a , and a have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the up-down control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown.DomainUpDownItemCollection Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown+DomainUpDownItemCollection/Overview/source.cs" id="Snippet1"::: @@ -141,9 +141,9 @@ to the collection by using the method. + You can also add a new to the collection by using the method. - To remove an that you have previously added, use the or methods. + To remove an that you have previously added, use the or methods. ]]> @@ -238,9 +238,9 @@ that you have previously added by using the method. + You can also remove an that you have previously added by using the method. - To add a new to the collection, use the or methods. + To add a new to the collection, use the or methods. ]]> @@ -283,9 +283,9 @@ that you have previously added by using the method. + You can also remove an that you have previously added by using the method. - To add a new to the collection, use the or methods. + To add a new to the collection, use the or methods. ]]> diff --git a/xml/System.Windows.Forms/DomainUpDown.xml b/xml/System.Windows.Forms/DomainUpDown.xml index 63f7c4922cc..abccd12023c 100644 --- a/xml/System.Windows.Forms/DomainUpDown.xml +++ b/xml/System.Windows.Forms/DomainUpDown.xml @@ -56,9 +56,9 @@ ## Remarks A control displays a single string value that is selected from an collection by clicking the up or down buttons of the control. The user can also enter text in the control, unless the property is set to `true` (the string typed in must match an item in the collection to be accepted). When an item is selected, the object is converted to a string value so it can be displayed in the spin box. - To create a collection of objects to display in the control, you can add or remove the items individually by using the and methods. This can be called in an event handler, such as the event of a button. The object collection can be sorted alphabetically by setting the property to `true`. When the property is set to `true`, if you scroll past the last or first object in the collection, the list will start over with the first or last object respectively and appear to roll in a continuous list. + To create a collection of objects to display in the control, you can add or remove the items individually by using the and methods. This can be called in an event handler, such as the event of a button. The object collection can be sorted alphabetically by setting the property to `true`. When the property is set to `true`, if you scroll past the last or first object in the collection, the list will start over with the first or last object respectively and appear to roll in a continuous list. - When the or methods are called, either in code or by the click of the up or down buttons, is called to update the control with the new string. If is set to `true`, the string is matched to one of the values in the collection prior to updating the control's text display. + When the or methods are called, either in code or by the click of the up or down buttons, is called to update the control with the new string. If is set to `true`, the string is matched to one of the values in the collection prior to updating the control's text display. Starting with the .NET Framework 4.6, the control will be resized based on the system DPI setting when the app.config file contains the following entry: @@ -69,7 +69,7 @@ ``` ## Examples - The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box. The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box. The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: @@ -108,7 +108,7 @@ control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: @@ -147,7 +147,7 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the Accessibility assembly installed with the .NET Framework. @@ -190,7 +190,7 @@ control using the down button, you will eventually reach the last item in the collection. If you continue, and is set to `true`, the list will start over with the first item in the collection and appear to be continuous. This behavior also occurs when you move through the collection using the up button. + As you move through the collection of items in the control using the down button, you will eventually reach the last item in the collection. If you continue, and is set to `true`, the list will start over with the first item in the collection and appear to be continuous. This behavior also occurs when you move through the collection using the up button. ]]> @@ -254,12 +254,12 @@ collection can be built and made available to the control in two ways. You can add items to the collection by using the or methods. + The collection can be built and made available to the control in two ways. You can add items to the collection by using the or methods. ## Examples - The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box. The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box. The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: @@ -366,12 +366,12 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: @@ -459,7 +459,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -609,12 +609,12 @@ The property holds the index value of the item in the collection that is currently selected in the spin box (also known as an up-down control). Collection items can be reassigned new index values if the property has been changed from `false` to `true`. As the collection is re-sorted alphabetically, the items will be assigned a new index value. > [!NOTE] -> If the user has entered an item in the spin box, or if no item has been selected, the value will be the default value, -1. +> If the user has entered an item in the spin box, or if no item has been selected, the value will be the default value, -1. ## Examples - The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box. The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box. The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: @@ -677,7 +677,7 @@ ## Examples - The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: @@ -724,7 +724,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DomainUpDown1`. Then ensure that the event handler is associated with the event. @@ -780,12 +780,12 @@ is set to `true`, the collection is sorted in alphabetical order. + When is set to `true`, the collection is sorted in alphabetical order. ## Examples - The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: @@ -827,7 +827,7 @@ and properties. + The return string includes the type and the values for the and properties. ]]> @@ -864,7 +864,7 @@ control using the up button, you will eventually reach the first item in the collection. If you continue, and is set to `true`, the list will start over with the last item in the collection and appear to be continuous. This behavior also occurs when you move through the collection using the down button. + As you move through the collection of items in the control using the up button, you will eventually reach the first item in the collection. If you continue, and is set to `true`, the list will start over with the last item in the collection and appear to be continuous. This behavior also occurs when you move through the collection using the down button. ]]> @@ -957,7 +957,7 @@ ## Examples - The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. + The following code example creates and initializes a control. The example allows you to set some of its properties and create a collection of strings for display in the spin box (also known as an up-down control). The code assumes that a , , and have been instantiated on a form. The example also assumes that you have a member variable at the class level declared as a 32-bit signed integer named `myCounter`. You can enter a string in the text box and add it to the collection when the button is clicked. By clicking the check box, you can toggle the property and observe the difference in the collection of items in the spin box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic DomainUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DomainUpDown/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/DragAction.xml b/xml/System.Windows.Forms/DragAction.xml index e3b15f4ebeb..d04ffff12e8 100644 --- a/xml/System.Windows.Forms/DragAction.xml +++ b/xml/System.Windows.Forms/DragAction.xml @@ -30,28 +30,28 @@ Specifies how and if a drag-and-drop operation should continue. - . - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the enumeration. See the method for the complete code example. - + . + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the enumeration. See the method for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Windows.Forms/DragDropEffects.xml b/xml/System.Windows.Forms/DragDropEffects.xml index f3f98288f00..2b12f4c16db 100644 --- a/xml/System.Windows.Forms/DragDropEffects.xml +++ b/xml/System.Windows.Forms/DragDropEffects.xml @@ -46,7 +46,7 @@ ## Examples - The following example demonstrates using the `DragDropEffects` enumeration when the user moves the mouse over the drop target during a drag-and-drop operation. This example is part of a larger example provided for the method. + The following example demonstrates using the `DragDropEffects` enumeration when the user moves the mouse over the drop target during a drag-and-drop operation. This example is part of a larger example provided for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: diff --git a/xml/System.Windows.Forms/DragEventArgs.xml b/xml/System.Windows.Forms/DragEventArgs.xml index 1aca2faaf1b..95831d5192a 100644 --- a/xml/System.Windows.Forms/DragEventArgs.xml +++ b/xml/System.Windows.Forms/DragEventArgs.xml @@ -47,15 +47,15 @@ ## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the class. See the method for the complete code example. + This code excerpt demonstrates using the class. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: @@ -63,7 +63,7 @@ The following example illustrates how are passed between the source and target of a drag-and-drop operation. In this example, a control is the source of the data, and the control is the target. The example assumes that the control has been populated with a list of valid filenames. When the user drags one of the displayed filenames from the control onto the control, the file referenced in the filename is opened. - The operation is initiated in the control's MouseDown event. In the event handler, the example uses the method to verify that the data is in a format that the control can display and then sets the property to specify that data should be copied from the source control to the target control. Finally, the control's DragDrop event handler uses the method to retrieve the filename to open. + The operation is initiated in the control's MouseDown event. In the event handler, the example uses the method to verify that the data is in a format that the control can display and then sets the property to specify that data should be copied from the source control to the target control. Finally, the control's DragDrop event handler uses the method to retrieve the filename to open. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextDragDrop/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form1.cs" id="Snippet1"::: @@ -208,22 +208,22 @@ method, it specifies the permissible effects of the operation. For example, when you drag a file from a source, if the file is read-only (or from a read-only storage medium such as a CD), the source will indicate that the file can be copied, but not transferred, to the target. + When a control initiates a drag-and-drop operation by calling the method, it specifies the permissible effects of the operation. For example, when you drag a file from a source, if the file is read-only (or from a read-only storage medium such as a CD), the source will indicate that the file can be copied, but not transferred, to the target. Before attempting to perform an operation on the dragged data, you should examine this property to ensure that the operation is allowed. ## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the class. See the method for the complete code example. + This code excerpt demonstrates using the class. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: @@ -272,20 +272,20 @@ method to determine whether the data matches the format requirements of the control onto which the data is being dragged. You also can specify whether you want to attempt to convert the data to meet your format requirements. If the dragged data meets your format requirements, use the method to retrieve the data. + In the body of your event handler, you can use the method to determine whether the data matches the format requirements of the control onto which the data is being dragged. You also can specify whether you want to attempt to convert the data to meet your format requirements. If the dragged data meets your format requirements, use the method to retrieve the data. ## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the class. See the method for the complete code example. + This code excerpt demonstrates using the class. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: @@ -364,20 +364,20 @@ ## Remarks By default, the effect applied determines the mouse cursor for the target of a drag-and-drop operation. This is useful to provide feedback to the user on the operation that will occur. For example, if you press the CTRL key when you drag a file from a source, specify to indicate the target will try to perform a copy operation. - To use custom cursors for a drag operation, see . + To use custom cursors for a drag operation, see . ## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the class. See the method for the complete code example. + This code excerpt demonstrates using the class. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: @@ -443,15 +443,15 @@ ## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the class. See the method for the complete code example. + This code excerpt demonstrates using the class. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: @@ -554,15 +554,15 @@ controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the class. See the method for the complete code example. + This code excerpt demonstrates using the class. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: @@ -610,15 +610,15 @@ controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - This code excerpt demonstrates using the class. See the method for the complete code example. + This code excerpt demonstrates using the class. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: diff --git a/xml/System.Windows.Forms/DragEventHandler.xml b/xml/System.Windows.Forms/DragEventHandler.xml index cd57a291915..8c717fb4972 100644 --- a/xml/System.Windows.Forms/DragEventHandler.xml +++ b/xml/System.Windows.Forms/DragEventHandler.xml @@ -41,28 +41,28 @@ A that contains the event data. Represents the method that will handle the , , or event of a . - 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the delegate with the event. See the method for the complete code example. - + 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the delegate with the event. See the method for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet4"::: + ]]> diff --git a/xml/System.Windows.Forms/DrawItemEventArgs.xml b/xml/System.Windows.Forms/DrawItemEventArgs.xml index 07215cdece9..3eafce34e43 100644 --- a/xml/System.Windows.Forms/DrawItemEventArgs.xml +++ b/xml/System.Windows.Forms/DrawItemEventArgs.xml @@ -207,7 +207,7 @@ , the is set to . If the item's state is not , the property is set to . + If the item's state is , the is set to . If the item's state is not , the property is set to . @@ -518,7 +518,7 @@ , the is set to . If the item's state is not , the property is set to . + If the item's state is , the is set to . If the item's state is not , the property is set to . @@ -619,7 +619,7 @@ value of the item being drawn in the . This property can return -1 if items were removed from the list. + This property returns the value of the item being drawn in the . This property can return -1 if items were removed from the list. diff --git a/xml/System.Windows.Forms/DrawItemState.xml b/xml/System.Windows.Forms/DrawItemState.xml index 6114c9ccad0..0132d665fad 100644 --- a/xml/System.Windows.Forms/DrawItemState.xml +++ b/xml/System.Windows.Forms/DrawItemState.xml @@ -30,20 +30,20 @@ Specifies the state of an item that is being drawn. - . - - - -## Examples - The following code example demonstrates using the property to perform custom drawing of the items in a . - + . + + + +## Examples + The following code example demonstrates using the property to perform custom drawing of the items in a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MeasureItemEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawItemState/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/DrawListViewColumnHeaderEventArgs.xml b/xml/System.Windows.Forms/DrawListViewColumnHeaderEventArgs.xml index acb1bc2e205..dac822566cf 100644 --- a/xml/System.Windows.Forms/DrawListViewColumnHeaderEventArgs.xml +++ b/xml/System.Windows.Forms/DrawListViewColumnHeaderEventArgs.xml @@ -37,12 +37,12 @@ The event is raised by a control when its property is set to `true` and its property is set to . The passed to the event handler contains information about the to draw and also provides methods to help you draw the header. - Use the property to retrieve information about the column header to draw. Use the property to do the actual drawing within the area specified by the property. To draw standard elements that do not need customization, use the and methods. + Use the property to retrieve information about the column header to draw. Use the property to do the actual drawing within the area specified by the property. To draw standard elements that do not need customization, use the and methods. Use the property when you want the operating system to draw the subitem. This is useful when you want to customize only specific headers. > [!NOTE] -> To avoid issues with graphics flickering when owner drawing, override the control and set the property to `true`. This feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. +> To avoid issues with graphics flickering when owner drawing, override the control and set the property to `true`. This feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. diff --git a/xml/System.Windows.Forms/DrawListViewItemEventArgs.xml b/xml/System.Windows.Forms/DrawListViewItemEventArgs.xml index b27da8629dc..187b846d91d 100644 --- a/xml/System.Windows.Forms/DrawListViewItemEventArgs.xml +++ b/xml/System.Windows.Forms/DrawListViewItemEventArgs.xml @@ -37,12 +37,12 @@ The event is raised by a control when the property is set to `true`. The passed to the event handler contains information about the to draw and also provides methods to help you draw the item. - Use the or properties to retrieve information about the item to draw. Use the property to retrieve the index of the item. + Use the or properties to retrieve information about the item to draw. Use the property to retrieve the index of the item. - Use the property to do the actual drawing within the area specified by the property. To draw standard elements that do not need customization, use the , , and methods. + Use the property to do the actual drawing within the area specified by the property. To draw standard elements that do not need customization, use the , , and methods. > [!NOTE] -> To avoid issues with graphics flickering when owner drawing, override the control and set the property to `true`. This feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. +> To avoid issues with graphics flickering when owner drawing, override the control and set the property to `true`. This feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. @@ -139,7 +139,7 @@ ## Remarks The location specified by this property is relative to the upper left corner of the control. - To retrieve the bounds for specific portions of a , use the method. + To retrieve the bounds for specific portions of a , use the method. @@ -295,7 +295,7 @@ ## Examples - The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the background for entire items. In all views except the details view, this handler also draws the foreground text. In the details view, the foreground text is drawn in the event. + The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the background for entire items. In all views except the details view, this handler also draws the foreground text. In the details view, the foreground text is drawn in the event. For the complete example, see the overview reference topic. @@ -355,14 +355,14 @@ and properties. The text is drawn within the area specified by the property. You can also draw the text manually using the retrieved through the property. + Use this method to draw the item text using the current values of the and properties. The text is drawn within the area specified by the property. You can also draw the text manually using the retrieved through the property. - The method is most useful when the property is set to a value other than . In the details view, this method draws the text for the , but does not draw the text for subitems. Therefore, in the details view, it is generally more convenient to draw all of the text in a handler for the event. + The method is most useful when the property is set to a value other than . In the details view, this method draws the text for the , but does not draw the text for subitems. Therefore, in the details view, it is generally more convenient to draw all of the text in a handler for the event. ## Examples - The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the background for entire items. In all views except the details view, this handler also draws the foreground text. In the details view, the foreground text is drawn in the event. + The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the background for entire items. In all views except the details view, this handler also draws the foreground text. In the details view, the foreground text is drawn in the event. For the complete example, see the overview reference topic. @@ -415,9 +415,9 @@ and properties. The values specified in the `flags` parameter let you provide formatting properties for the node label, such as text alignment. The text is drawn within the area specified by the property. You can also draw the text manually using the retrieved through the property. + Use this method to draw the item text using the current values of the and properties. The values specified in the `flags` parameter let you provide formatting properties for the node label, such as text alignment. The text is drawn within the area specified by the property. You can also draw the text manually using the retrieved through the property. - The method is most useful when the property is set to a value other than . In the details view, this method draws the text for the , but does not draw the text for subitems. Therefore, in the details view, it is generally more convenient to draw all of the text in a handler for the event. + The method is most useful when the property is set to a value other than . In the details view, this method draws the text for the , but does not draw the text for subitems. Therefore, in the details view, it is generally more convenient to draw all of the text in a handler for the event. ]]> @@ -525,7 +525,7 @@ to draw. This is useful when the property does not provide adequate information to meet your needs. The property provides only basic state information that you can use, for example, to determine whether an item is selected, checked, or focused. The property, on the other hand, allows you to access all members of the . You must access the item directly, for example, to draw the value yourself rather than using the method. + Use this property to access the to draw. This is useful when the property does not provide adequate information to meet your needs. The property provides only basic state information that you can use, for example, to determine whether an item is selected, checked, or focused. The property, on the other hand, allows you to access all members of the . You must access the item directly, for example, to draw the value yourself rather than using the method. diff --git a/xml/System.Windows.Forms/DrawListViewSubItemEventArgs.xml b/xml/System.Windows.Forms/DrawListViewSubItemEventArgs.xml index f61475fa4ff..3563afbe6eb 100644 --- a/xml/System.Windows.Forms/DrawListViewSubItemEventArgs.xml +++ b/xml/System.Windows.Forms/DrawListViewSubItemEventArgs.xml @@ -37,14 +37,14 @@ The event is raised by a control when its property is set to `true` and its property is set to . The passed to the event handler contains information about the to draw and also provides methods to help you draw the subitem. - Use the or properties to retrieve information about the parent item of the subitem to draw. To retrieve the itself, use the property. Use the property to retrieve the representing the header of the column in which the subitem is displayed. + Use the or properties to retrieve information about the parent item of the subitem to draw. To retrieve the itself, use the property. Use the property to retrieve the representing the header of the column in which the subitem is displayed. - Use the property to do the actual drawing within the area specified by the property. To draw standard elements that do not need customization, use the , , and methods. + Use the property to do the actual drawing within the area specified by the property. To draw standard elements that do not need customization, use the , , and methods. Use the property when you want the operating system to draw the subitem. This is useful when you want to customize only specific subitems. > [!NOTE] -> To avoid issues with graphics flickering when owner drawing, override the control and set the property to `true`. This feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. +> To avoid issues with graphics flickering when owner drawing, override the control and set the property to `true`. This feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. @@ -271,12 +271,12 @@ Use this method to draw a standard background that uses the current value of the property. The background is drawn to fill the area specified by the property. > [!NOTE] -> The property of the parent must be set to `false` to prevent the value of the parent item from overriding the subitem value. +> The property of the parent must be set to `false` to prevent the value of the parent item from overriding the subitem value. ## Examples - The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the subitem text values and both the text and background for subitems that have negative values. + The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the subitem text values and both the text and background for subitems that have negative values. For the complete example, see the overview reference topic. @@ -334,10 +334,10 @@ event for subitems that you do not want to customize. If you set this property to `true`, the subitem will be drawn normally using the current values of the , , and properties + Use this property when handling the event for subitems that you do not want to customize. If you set this property to `true`, the subitem will be drawn normally using the current values of the , , and properties > [!NOTE] -> The property of the parent must be set to `false` to prevent the value of the parent item from overriding the subitem value. +> The property of the parent must be set to `false` to prevent the value of the parent item from overriding the subitem value. @@ -395,7 +395,7 @@ ## Remarks Use this method to draw a standard focus rectangle around the subitem. The focus rectangle is drawn one pixel inside the area specified by the `bounds` parameter. It is drawn only when the parent item has focus, so you do not need to check the focus state of the item before you call this method. - You might want to draw the focus rectangle only around the first subitem (that is, the parent item, which is displayed in the first column) rather than drawing it around every subitem of an item. This corresponds to the normal behavior of a control when the property is set to `false`. To draw the focus rectangle around the first subitem, call the method only when the value is 0. + You might want to draw the focus rectangle only around the first subitem (that is, the parent item, which is displayed in the first column) rather than drawing it around every subitem of an item. This corresponds to the normal behavior of a control when the property is set to `false`. To draw the focus rectangle around the first subitem, call the method only when the value is 0. The control does not provide the ability to select individual subitems, but if you want to implement subitem selection yourself, you can use this method to draw the focus rectangle around a subitem other than the first one. @@ -448,10 +448,10 @@ and properties. The text is drawn within the area specified by the property. + Use this method to draw the subitem text using the current values of the and properties. The text is drawn within the area specified by the property. > [!NOTE] -> The property of the parent must be set to `false` to prevent the and values of the parent item from overriding the subitem values. +> The property of the parent must be set to `false` to prevent the and values of the parent item from overriding the subitem values. ]]> @@ -497,15 +497,15 @@ and properties. The text is drawn within the area specified by the property. The values specified in the `flags` parameter let you provide formatting properties for the node label, such as text alignment. + Use this method to draw the subitem text using the current values of the and properties. The text is drawn within the area specified by the property. The values specified in the `flags` parameter let you provide formatting properties for the node label, such as text alignment. > [!NOTE] -> The property of the parent must be set to `false` to prevent the and values of the parent item from overriding the subitem values. +> The property of the parent must be set to `false` to prevent the and values of the parent item from overriding the subitem values. ## Examples - The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the subitem text values and both the text and background for subitems that have negative values. + The following code example demonstrates how to use the method in an application that provides custom drawing for a control. In the example, a handler for the event draws the subitem text values and both the text and background for subitems that have negative values. For the complete example, see the overview reference topic. @@ -851,7 +851,7 @@ properties do not provide adequate information to meet your needs. The property allows you to access all members of the being drawn. You must access this object directly, for example, to draw the value yourself rather than using the method. + This method is useful when the other properties do not provide adequate information to meet your needs. The property allows you to access all members of the being drawn. You must access this object directly, for example, to draw the value yourself rather than using the method. diff --git a/xml/System.Windows.Forms/DrawMode.xml b/xml/System.Windows.Forms/DrawMode.xml index af94b40ff17..1357e388c68 100644 --- a/xml/System.Windows.Forms/DrawMode.xml +++ b/xml/System.Windows.Forms/DrawMode.xml @@ -27,7 +27,7 @@ in the , , and classes. + This enumeration is used by members such as in the , , and classes. You can override the drawing of some controls or certain elements. This enumeration is used to specify if a control is drawn by the operating system or if your own code handles the drawing of the control. diff --git a/xml/System.Windows.Forms/DrawToolTipEventArgs.xml b/xml/System.Windows.Forms/DrawToolTipEventArgs.xml index 1de15cd2a1f..5eeb6329f76 100644 --- a/xml/System.Windows.Forms/DrawToolTipEventArgs.xml +++ b/xml/System.Windows.Forms/DrawToolTipEventArgs.xml @@ -35,7 +35,7 @@ ## Remarks The event is raised by the class when the is drawn and the property value is `true`. The handler for this event receives a parameter of type . The class contains all the information needed to paint the , including the text, the , and the object on which the drawing should be done. To customize the look of the ToolTip, use the to determine the bounds of the ToolTip, and the object to perform your customized drawing. You can increase the bounds of the before it is shown by handling the event. - also supports partial customization through the , and methods. Using these methods, you can owner draw portions of the ToolTip while leaving the other portions drawn in the standard way. + also supports partial customization through the , and methods. Using these methods, you can owner draw portions of the ToolTip while leaving the other portions drawn in the standard way. @@ -111,7 +111,7 @@ constructor uses the `graphics`, `associatedControl`, `associatedWindow`, `bounds`, `font` and `toolTipText` parameters to initialize their corresponding, similarly named properties. The `backColor` and `foreColor` parameters are used by the and methods, respectively. + The constructor uses the `graphics`, `associatedControl`, `associatedWindow`, `bounds`, `font` and `toolTipText` parameters to initialize their corresponding, similarly named properties. The `backColor` and `foreColor` parameters are used by the and methods, respectively. ]]> @@ -162,7 +162,7 @@ can be associated with multiple controls through the method, the property can be used to determine which control the event is associated with. This is helpful if you want to perform different ToolTip customization based on the associated control. + Because the can be associated with multiple controls through the method, the property can be used to determine which control the event is associated with. This is helpful if you want to perform different ToolTip customization based on the associated control. @@ -279,7 +279,7 @@ ## Examples The following code example demonstrates how to custom draw the . The example creates a and associates it to three controls located on the . The example sets the property to true and handles the event. In the event handler, the is custom drawn differently depending on what button the is being displayed for as indicated by the property. - The code excerpt below demonstrates using the method and using the , , and properties. See the class overview for the complete code example. + The code excerpt below demonstrates using the method and using the , , and properties. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolTip.OwnerDraw/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawToolTipEventArgs/Overview/form1.cs" id="Snippet3"::: @@ -319,14 +319,14 @@ , but want a standard ToolTip background drawn for you using the current value of . The background is drawn to fill the area specified by the property. + Use this method when you want to customize certain visual aspects of the , but want a standard ToolTip background drawn for you using the current value of . The background is drawn to fill the area specified by the property. ## Examples The following code example demonstrates how to custom draw the . The example creates a and associates it to three controls located on the . The example sets the property to true and handles the event. In the event handler, the is custom drawn differently depending on what button the is being displayed for as indicated by the property. - The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. + The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolTip.OwnerDraw/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawToolTipEventArgs/Overview/form1.cs" id="Snippet4"::: @@ -366,14 +366,14 @@ , but want a standard ToolTip border drawn for you using the current value of . The border is drawn to the size specified by the property. You can increase the bounds of the before it is shown by handling the event. + Use this method when you want to customize certain visual aspects of a , but want a standard ToolTip border drawn for you using the current value of . The border is drawn to the size specified by the property. You can increase the bounds of the before it is shown by handling the event. ## Examples The following code example demonstrates how to custom draw the . The example creates a and associates it to three controls located on the . The example sets the property to true and handles the event. In the event handler, the is custom drawn differently depending on what button the is being displayed for as indicated by the property. - The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. + The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolTip.OwnerDraw/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawToolTipEventArgs/Overview/form1.cs" id="Snippet4"::: @@ -428,7 +428,7 @@ method represents the default method of displaying a . This method uses the system specified font and the current value of for the font color. The text is drawn as a single line centered horizontally and vertically within the rectangle specified by the property; it is equivalent to the following call to the overloaded version of : + The method represents the default method of displaying a . This method uses the system specified font and the current value of for the font color. The text is drawn as a single line centered horizontally and vertically within the rectangle specified by the property; it is equivalent to the following call to the overloaded version of : `DrawText(TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.SingleLine | TextFormatFlags.HidePrefix)` @@ -437,7 +437,7 @@ ## Examples The following code example demonstrates how to custom draw the . The example creates a and associates it to three controls located on the . The example sets the property to true and handles the event. In the event handler, the is custom drawn differently depending on what button the is being displayed for as indicated by the property. - The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. + The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolTip.OwnerDraw/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawToolTipEventArgs/Overview/form1.cs" id="Snippet4"::: @@ -483,7 +483,7 @@ method is used to customize certain visual aspects of a , including the layout of the ToolTip text. This method uses the system specified font and the current value of for the font color. + The method is used to customize certain visual aspects of a , including the layout of the ToolTip text. This method uses the system specified font and the current value of for the font color. ]]> @@ -536,7 +536,7 @@ ## Examples The following code example demonstrates how to custom draw the . The example creates a and associates it to three controls located on the . The example sets the property to true and handles the event. In the event handler, the is custom drawn differently depending on what button the is being displayed for as indicated by the property. - The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. + The code excerpt below demonstrates using the , , and methods. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolTip.OwnerDraw/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawToolTipEventArgs/Overview/form1.cs" id="Snippet4"::: @@ -589,18 +589,18 @@ object to customize the drawing of certain visual aspects of a . For example, you can draw your own ToolTip background by using the method. + You use the object to customize the drawing of certain visual aspects of a . For example, you can draw your own ToolTip background by using the method. Any custom drawing that is done outside of the rectangle specified by the property will not show up. You can increase the bounds of the before it is shown by handling the `ToolTip.Popup` event. - The class also provides the , and methods to draw individual parts of the in the standard way used by the operating system. You can use these methods, together with the object methods, to make some parts of your ToolTip standard, while customizing other parts. + The class also provides the , and methods to draw individual parts of the in the standard way used by the operating system. You can use these methods, together with the object methods, to make some parts of your ToolTip standard, while customizing other parts. ## Examples The following code example demonstrates how to custom draw the . The example creates a and associates it to three controls located on the . The example sets the property to true and handles the event. In the event handler, the is custom drawn differently depending on what button the is being displayed for as indicated by the property. - The code excerpt below demonstrates using the and methods and using the property. See the class overview for the complete code example. + The code excerpt below demonstrates using the and methods and using the property. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolTip.OwnerDraw/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawToolTipEventArgs/Overview/form1.cs" id="Snippet2"::: @@ -647,14 +647,14 @@ property to determine what the ToolTip text is when you are custom drawing your ToolTip. You can use the method to customize the drawing of the ToolTip text. If you want to have the ToolTip text drawn using the system specified style, use the method. The text value comes from the value passed to the method of the class. + Typically you would use the property to determine what the ToolTip text is when you are custom drawing your ToolTip. You can use the method to customize the drawing of the ToolTip text. If you want to have the ToolTip text drawn using the system specified style, use the method. The text value comes from the value passed to the method of the class. ## Examples The following code example demonstrates how to custom draw the . The example creates a and associates it to three controls located on the . The example sets the property to true and handles the event. In the event handler, the is custom drawn differently depending on what button the is being displayed for as indicated by the property. - The code excerpt below demonstrates using the method and using the , , and properties. See the class overview for the complete code example. + The code excerpt below demonstrates using the method and using the , , and properties. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolTip.OwnerDraw/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawToolTipEventArgs/Overview/form1.cs" id="Snippet3"::: diff --git a/xml/System.Windows.Forms/DrawTreeNodeEventArgs.xml b/xml/System.Windows.Forms/DrawTreeNodeEventArgs.xml index f08a8ea277a..e2b3b6c9cb0 100644 --- a/xml/System.Windows.Forms/DrawTreeNodeEventArgs.xml +++ b/xml/System.Windows.Forms/DrawTreeNodeEventArgs.xml @@ -37,9 +37,9 @@ The event is raised by a control when its property is set to or and a node is displayed or updated. The passed to the event handler contains information about the node to draw as well as providing methods to help you draw the node. - Use the or properties to retrieve information about the node to draw. Use the property to do the actual drawing within the area specified by the property. To make the operating system draw a node that does not need to be owner drawn, set the property to `true`. + Use the or properties to retrieve information about the node to draw. Use the property to do the actual drawing within the area specified by the property. To make the operating system draw a node that does not need to be owner drawn, set the property to `true`. - When the property is set to , the area indicated by the property includes the label portion of the node only. When the property is set to , the area includes the entire node, including the area typically used for icons, checkboxes, plus and minus signs, and lines connecting the nodes. + When the property is set to , the area indicated by the property includes the label portion of the node only. When the property is set to , the area includes the entire node, including the area typically used for icons, checkboxes, plus and minus signs, and lines connecting the nodes. ## Examples The following code example demonstrates how to customize a control using owner drawing. The control in the example displays optional node tags alongside the standard node labels. Node tags are specified using the property. The control also uses custom colors, including a custom highlight color. diff --git a/xml/System.Windows.Forms/ErrorBlinkStyle.xml b/xml/System.Windows.Forms/ErrorBlinkStyle.xml index 9a5ecffe4a5..d57d022711f 100644 --- a/xml/System.Windows.Forms/ErrorBlinkStyle.xml +++ b/xml/System.Windows.Forms/ErrorBlinkStyle.xml @@ -24,20 +24,20 @@ Specifies constants indicating when the error icon, supplied by an , should blink to alert the user that an error has occurred. - . - - - -## Examples - The following example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. - + . + + + +## Examples + The following example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/ErrorIconAlignment.xml b/xml/System.Windows.Forms/ErrorIconAlignment.xml index 0de72904ae3..da588d028d4 100644 --- a/xml/System.Windows.Forms/ErrorIconAlignment.xml +++ b/xml/System.Windows.Forms/ErrorIconAlignment.xml @@ -24,20 +24,20 @@ Specifies constants indicating the locations that an error icon can appear in relation to the control with an error. - . - - - -## Examples - The following example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. - + . + + + +## Examples + The following example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/ErrorProvider.xml b/xml/System.Windows.Forms/ErrorProvider.xml index 1cd3d62dfc9..c97036baa90 100644 --- a/xml/System.Windows.Forms/ErrorProvider.xml +++ b/xml/System.Windows.Forms/ErrorProvider.xml @@ -66,9 +66,9 @@ presents a simple mechanism for indicating to the end user that a control on a form has an error associated with it. If an error description string is specified for the control, an icon appears next to the control. The icon flashes in the manner specified by , at the rate specified by . When the mouse hovers over the icon, a ToolTip appears showing the error description string. + presents a simple mechanism for indicating to the end user that a control on a form has an error associated with it. If an error description string is specified for the control, an icon appears next to the control. The icon flashes in the manner specified by , at the rate specified by . When the mouse hovers over the icon, a ToolTip appears showing the error description string. - Typically, you use in association with data-bound controls. When using with data-bound controls, you must specify the , either in the constructor or by setting the property. + Typically, you use in association with data-bound controls. When using with data-bound controls, you must specify the , either in the constructor or by setting the property. > [!NOTE] > The component does not provide built-in support for accessibility clients. To make your application accessible when using this component, you must provide an additional, accessible feedback mechanism. @@ -76,13 +76,13 @@ ## Examples - The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.vb" id="Snippet1"::: - The following code example shows how to use the with a and to indicate a data error to the user. + The following code example shows how to use the with a and to indicate a data error to the user. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ErrorProvider Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorProvider/Overview/source.cs" id="Snippet1"::: @@ -132,9 +132,9 @@ |Property|Value| |--------------|-----------| -||An icon that consists of an exclamation point in a circle with a red background| -||250| -||| +||An icon that consists of an exclamation point in a circle with a red background| +||250| +||| ]]> @@ -207,7 +207,7 @@ specified by is the container object for the data-bound controls to associate the error provider with. + The specified by is the container object for the data-bound controls to associate the error provider with. ]]> @@ -256,7 +256,7 @@ and , you should use instead of setting and individually. + To avoid conflicts at run time that can occur when changing and , you should use instead of setting and individually. ]]> @@ -307,12 +307,12 @@ to . + The error icon flashes at the specified rate. A value of zero sets to . ## Examples - The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: @@ -361,12 +361,12 @@ when an error occurs. Setting the to zero sets the to . + The error icon flashes in the manner specified by the assigned when an error occurs. Setting the to zero sets the to . ## Examples - The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: @@ -421,7 +421,7 @@ to determine whether you can attach an to the specified control. + Typically, you will use to determine whether you can attach an to the specified control. ]]> @@ -457,7 +457,7 @@ , restoring the properties to their default values. To clear the error message, call the method and pass in for the value. This removes the error glyph from the specified . + Calling this method clears all property settings for this , restoring the properties to their default values. To clear the error message, call the method and pass in for the value. This removes the error glyph from the specified . ]]> @@ -573,14 +573,14 @@ is a navigation string based on . + The is a navigation string based on . - To avoid conflicts at run time that can occur when changing and , you should use instead of setting and individually. + To avoid conflicts at run time that can occur when changing and , you should use instead of setting and individually. ## Examples - The following code example shows how to use the with a and to indicate a data error to the user. + The following code example shows how to use the with a and to indicate a data error to the user. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ErrorProvider Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorProvider/Overview/source.cs" id="Snippet1"::: @@ -644,14 +644,14 @@ is a data source that you can attach to a control and that you want to monitor for errors. can be set to any collection that implements . + The is a data source that you can attach to a control and that you want to monitor for errors. can be set to any collection that implements . - To avoid conflicts at run time that can occur when changing and , you should use instead of setting and individually. + To avoid conflicts at run time that can occur when changing and , you should use instead of setting and individually. ## Examples - The following code example shows how to use the with a and to indicate a data error to the user. This code assumes you have created and populated a named `dataSet1` containing a named `dataTable1`. When you bind the to a control such as the control, errors specified through objects appear as error glyphs in the control. + The following code example shows how to use the with a and to indicate a data error to the user. This code assumes you have created and populated a named `dataSet1` containing a named `dataTable1`. When you bind the to a control such as the control, errors specified through objects appear as error glyphs in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ErrorProvider Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorProvider/Overview/source.cs" id="Snippet1"::: @@ -743,7 +743,7 @@ method to check for an error before opening a file dialog box. To run this example, paste the following code into a form containing a named `TextBox1`, an named `OpenFileDialog1`, a button named `Button1`, and an named `ErrorProvider1`. Ensure all events are associated with their event handlers. + The following code example uses the method to check for an error before opening a file dialog box. To run this example, paste the following code into a form containing a named `TextBox1`, an named `OpenFileDialog1`, a button named `Button1`, and an named `ErrorProvider1`. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FileDialog/CPP/filedialogform.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/DoEvents/filedialogform.cs" id="Snippet2"::: @@ -977,7 +977,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1078,7 +1078,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ErrorProvider1`. Then ensure that the event handler is associated with the event. @@ -1138,7 +1138,7 @@ ## Examples - The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: @@ -1192,7 +1192,7 @@ ## Examples - The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: @@ -1247,7 +1247,7 @@ ## Examples - The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. + The following code example demonstrates using the class to notify the user of a data entry error. The example creates a that contains a control, a control, and a control, each validating its content, and an for each control. The example sets error icon options using the and properties and the and methods. The method is called with or without appropriate error text during a control's event, depending upon the content in the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ErrorProvider/CPP/errorproviderexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ErrorBlinkStyle/Overview/errorproviderexample.cs" id="Snippet1"::: @@ -1477,7 +1477,7 @@ This member is an explicit interface member implementation. It can be used only . + Typically, you call this method after you have called . ]]> diff --git a/xml/System.Windows.Forms/FeatureSupport.xml b/xml/System.Windows.Forms/FeatureSupport.xml index d95e0a37492..8c37ce8e508 100644 --- a/xml/System.Windows.Forms/FeatureSupport.xml +++ b/xml/System.Windows.Forms/FeatureSupport.xml @@ -35,22 +35,22 @@ Provides methods for retrieving feature information from the current system. - interface. Otherwise, inherit from and provide your own implementation. For an implementation of this class, see . - - To get the version number of a feature, call . Call to determine if a particular feature or version of a feature is installed. - - - -## Examples - The following example uses the implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. - + interface. Otherwise, inherit from and provide your own implementation. For an implementation of this class, see . + + To get the version number of a feature, call . Call to determine if a particular feature or version of a feature is installed. + + + +## Examples + The following example uses the implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FeatureSupport/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: + ]]> @@ -136,25 +136,25 @@ When overridden in a derived class, gets the version of the specified feature that is available on the system. A representing the version number of the specified feature available on the system; or if the feature is not installed. - implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code requires that `textBox1` has been created and placed on a form. - + implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code requires that `textBox1` has been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FeatureSupport/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: + ]]> - When you inherit from , you must override this method. When you override this method, check that the class that you use for the parameter is the same as the class used for this parameter in the method. If the two parameters differ, you must also override . - + When you inherit from , you must override this method. When you override this method, check that the class that you use for the parameter is the same as the class used for this parameter in the method. If the two parameters differ, you must also override . + See for an implementation of this method. @@ -195,13 +195,13 @@ Gets the version of the specified feature that is available on the system. A with the version number of the specified feature available on the system; or if the feature is not installed. - @@ -253,15 +253,15 @@ if the feature is present; otherwise, . - implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code requires that `textBox1` has been created and placed on a form. - + implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code requires that `textBox1` has been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FeatureSupport/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: + ]]> @@ -347,11 +347,11 @@ if the specified feature is present; if the specified feature is not present or if the product containing the feature is not installed. - @@ -394,11 +394,11 @@ if the feature is present and its version number is greater than or equal to the specified minimum version number; if the feature is not installed or its version number is below the specified minimum number. - diff --git a/xml/System.Windows.Forms/FileDialog.xml b/xml/System.Windows.Forms/FileDialog.xml index 9825018bd5d..084b95c81bd 100644 --- a/xml/System.Windows.Forms/FileDialog.xml +++ b/xml/System.Windows.Forms/FileDialog.xml @@ -55,14 +55,14 @@ |Path or program category|Class and members to use| |------------------------------|------------------------------| -|Standard Windows paths, such as Program Files, MyDocuments, the Desktop and so on|The class is the most complete source for these, either through its static methods, such as , or through the method, using one of the enumerated values.| -|Paths related to the current application|The class has static members to obtain certain paths, such as , , , and .

The method of the returns the path of the temporary folder.

The method of the class returns the application's current executing directory.

The property of the class represents the specified drive's root directory.| +|Standard Windows paths, such as Program Files, MyDocuments, the Desktop and so on|The class is the most complete source for these, either through its static methods, such as , or through the method, using one of the enumerated values.| +|Paths related to the current application|The class has static members to obtain certain paths, such as , , , and .

The method of the returns the path of the temporary folder.

The method of the class returns the application's current executing directory.

The property of the class represents the specified drive's root directory.| |Paths stored as application settings|Access the corresponding applications settings property of the wrapper class derived from . For more information, see [Application Settings for Windows Forms](/dotnet/desktop/winforms/advanced/application-settings-for-windows-forms).| -|Registry storage|Some applications store directory information in the registry. The class has the and properties that resolve to a value.| -|ClickOnce applications|For ClickOnce applications, use class members such as , which will return a pointer to the ClickOnce data directory. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications).| +|Registry storage|Some applications store directory information in the registry. The class has the and properties that resolve to a value.| +|ClickOnce applications|For ClickOnce applications, use class members such as , which will return a pointer to the ClickOnce data directory. For more information, see [Accessing Local and Remote Data in ClickOnce Applications](/visualstudio/deployment/accessing-local-and-remote-data-in-clickonce-applications).| |International applications|For international applications, retrieve the relative path portion from a string resource in your application by using the class. For more information about globalization and localization, see the topic [Globalization and Localization](/dotnet/standard/globalization-localization/).| - Notice that a full path may be built up using one or more of the described techniques. For example, the method might be used to obtain the path to the MyDocuments folder, then an application setting may be used to add a relative subdirectory portion. + Notice that a full path may be built up using one or more of the described techniques. For example, the method might be used to obtain the path to the MyDocuments folder, then an application setting may be used to add a relative subdirectory portion. The class contains static members to assist in manipulating absolute and relative path strings, whereas the and classes have static members that actually manipulate files and directories, respectively. @@ -72,7 +72,7 @@ ## Examples - The following code example uses the implementation of and illustrates creating, setting of properties, and showing the dialog box. The example uses the method to display the dialog box and return the . The example requires a form with a placed on it and the namespace added to it. + The following code example uses the implementation of and illustrates creating, setting of properties, and showing the dialog box. The example uses the method to display the dialog box and return the . The example requires a form with a placed on it and the namespace added to it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OpenFileDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/Overview/source.cs" id="Snippet1"::: @@ -417,7 +417,7 @@ ## Examples - The following code example demonstrates how to use the collection. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. + The following code example demonstrates how to use the collection. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/CustomPlaces/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FileDialog/CustomPlaces/Form1.vb" id="Snippet1"::: @@ -463,12 +463,12 @@ appends an extension to the file name. The extension that is used is determined by the and properties. If a filter is selected in the and the filter specifies an extension, then that extension is used. If the filter selected uses a wildcard in place of the extension, then the extension specified in the property is used. + When the user of your application specifies a file name without an extension, the appends an extension to the file name. The extension that is used is determined by the and properties. If a filter is selected in the and the filter specifies an extension, then that extension is used. If the filter selected uses a wildcard in place of the extension, then the extension specified in the property is used. ## Examples - The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. + The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. This is a complete example that is ready to run when you copy it to your project. @@ -587,12 +587,12 @@ When used from the class, this property represents the file being saved; when used from the class, it represents the file being opened. - This property can only be the name of one selected file. If you want to return an array containing the names of all selected files in a multiple-selection dialog box, use . + This property can only be the name of one selected file. If you want to return an array containing the names of all selected files in a multiple-selection dialog box, use . ## Examples - The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. + The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. This is a complete example that is ready to run when you copy it to your project. @@ -653,7 +653,7 @@ ## Examples - The following code example allows the user to select a number of images and display them in controls on a Form. It demonstrates initializing an , setting the and properties, and allowing the user to select multiple files by setting the property to true. This code example assumes that your form already has an control named `openFileDialog1`, a named `SelectFileButton`, and a named `flowLayoutPanel1`. + The following code example allows the user to select a number of images and display them in controls on a Form. It demonstrates initializing an , setting the and properties, and allowing the user to select multiple files by setting the property to true. This code example assumes that your form already has an control named `openFileDialog1`, a named `SelectFileButton`, and a named `flowLayoutPanel1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/FileNames/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FileDialog/FileNames/Form1.vb" id="Snippet1"::: @@ -698,7 +698,7 @@ ## Examples - The following code example demonstrates using the property, handling the event and using the method. When the example runs, a user can select graphics files from an object. The selected files are displayed in the form. The method forces a repaint of the form for each graphics file opened. To run this example paste the following code in a form containing a named `PictureBox1`, an named `OpenFileDialog1`, and a named `fileButton`. Call the `InitializePictureBox` and `InitializeOpenFileDialog` methods from the form's constructor or `Load` method. When the example is running, display the dialog box by clicking the button. + The following code example demonstrates using the property, handling the event and using the method. When the example runs, a user can select graphics files from an object. The selected files are displayed in the form. The method forces a repaint of the form for each graphics file opened. To run this example paste the following code in a form containing a named `PictureBox1`, an named `OpenFileDialog1`, and a named `fileButton`. Call the `InitializePictureBox` and `InitializeOpenFileDialog` methods from the form's constructor or `Load` method. When the example is running, display the dialog box by clicking the button. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FileDialog/CPP/filedialogform.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/DoEvents/filedialogform.cs" id="Snippet1"::: @@ -765,7 +765,7 @@ ## Examples - The following code example uses the implementation of and illustrates creating, setting of properties, and showing the dialog box. The example uses the and properties to provide a list of filters for the user. The example requires a form with a placed on it and the namespace added to it. + The following code example uses the implementation of and illustrates creating, setting of properties, and showing the dialog box. The example uses the and properties to provide a list of filters for the user. The example requires a form with a placed on it and the namespace added to it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OpenFileDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/Overview/source.cs" id="Snippet1"::: @@ -824,7 +824,7 @@ property to set which filtering option is shown first to the user. You can also use the value of after showing the file dialog to perform special file operations depending upon the filter chosen. + Use the property to set which filtering option is shown first to the user. You can also use the value of after showing the file dialog to perform special file operations depending upon the filter chosen. > [!NOTE] > The index value of the first filter entry is 1. @@ -832,7 +832,7 @@ ## Examples - The following code example uses the implementation of and illustrates creating, setting of properties, and showing the dialog box. The example uses the and properties to provide a list of filters for the user. The example requires a form with a placed on it and the namespace added to it. + The following code example uses the implementation of and illustrates creating, setting of properties, and showing the dialog box. The example uses the and properties to provide a list of filters for the user. The example requires a form with a placed on it and the namespace added to it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OpenFileDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/Overview/source.cs" id="Snippet1"::: @@ -943,13 +943,13 @@ - A path read from a persistent source, such as an application setting, a or a string resource in the application. -- Standard Windows system and user paths, such as Program Files, MyDocuments, MyMusic, and so on (which you can obtain using the method) +- Standard Windows system and user paths, such as Program Files, MyDocuments, MyMusic, and so on (which you can obtain using the method) - A path related to the current application, such as its startup directory (which you can obtain using properties on the object). For more information about creating dynamic paths, see the class overview. - On Windows Vista, if is set to a full file name instead of just a directory path, the initial directory will default either to the application path, or to the directory from which the user last selected a file. + On Windows Vista, if is set to a full file name instead of just a directory path, the initial directory will default either to the application path, or to the directory from which the user last selected a file. @@ -1223,7 +1223,7 @@ , and is invoked when the user of a file dialog invokes . + This method provides an implementation of , and is invoked when the user of a file dialog invokes . In the derived classes and an invalid file name can be raised. @@ -1392,7 +1392,7 @@ ## Remarks Sometimes users must open and save files that use multiple file name extensions. For example, the application manifest files used by the ClickOnce deployment technology end in the complex file name extension ".exe.manifest". Setting this property to `true` enables you to set the property to a multi-dotted extension. - If is `false`, and you assign a multi-dotted extension to , derived controls such as will only use the last extension in the string. For example, ".manifest" will be used instead of ".exe.manifest". + If is `false`, and you assign a multi-dotted extension to , derived controls such as will only use the last extension in the string. For example, ".manifest" will be used instead of ".exe.manifest". @@ -1453,7 +1453,7 @@ ## Examples - The following code example demonstrates initializing an , setting the and properties, and allowing the user to select multiple files by setting the property to true. To run this example, paste the following code in a form containing an named `OpenFileDialog1` and a named `fileButton`. Call the `InitializeOpenFileDialog` method in the form's constructor or `Load` method. The example also requires that the `Click` event of the `Button` control is connected to the event handler defined in the example. + The following code example demonstrates initializing an , setting the and properties, and allowing the user to select multiple files by setting the property to true. To run this example, paste the following code in a form containing an named `OpenFileDialog1` and a named `fileButton`. Call the `InitializeOpenFileDialog` method in the form's constructor or `Load` method. The example also requires that the `Click` event of the `Button` control is connected to the event handler defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FileDialog/CPP/filedialogform.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/DoEvents/filedialogform.cs" id="Snippet6"::: diff --git a/xml/System.Windows.Forms/FileDialogCustomPlace.xml b/xml/System.Windows.Forms/FileDialogCustomPlace.xml index 81543959ab4..307dc0ed327 100644 --- a/xml/System.Windows.Forms/FileDialogCustomPlace.xml +++ b/xml/System.Windows.Forms/FileDialogCustomPlace.xml @@ -104,7 +104,7 @@ ## Examples - The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. + The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/CustomPlaces/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FileDialog/CustomPlaces/Form1.vb" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/FileDialogCustomPlacesCollection.xml b/xml/System.Windows.Forms/FileDialogCustomPlacesCollection.xml index 0494b87d23c..d9cefbc81c3 100644 --- a/xml/System.Windows.Forms/FileDialogCustomPlacesCollection.xml +++ b/xml/System.Windows.Forms/FileDialogCustomPlacesCollection.xml @@ -151,7 +151,7 @@ ## Examples - The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. + The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/CustomPlaces/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FileDialog/CustomPlaces/Form1.vb" id="Snippet1"::: @@ -206,7 +206,7 @@ ## Examples - The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. + The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form and call `InitializeDialogAndButton` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/CustomPlaces/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FileDialog/CustomPlaces/Form1.vb" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/FlatStyle.xml b/xml/System.Windows.Forms/FlatStyle.xml index 36d87cb03c4..494a0d92287 100644 --- a/xml/System.Windows.Forms/FlatStyle.xml +++ b/xml/System.Windows.Forms/FlatStyle.xml @@ -27,11 +27,11 @@ , , and . + This enumeration is used by members such as , , and . In the case of the Popup style button, this enumeration controls some behavior as well as appearance. The Popup style control initially appears Flat until the mouse pointer moves over it. When the mouse pointer moves over the Popup control, it appears as a Standard style control until the mouse pointer is moved off of it again. - If the System style is used, the appearance of the control is determined by the user's operating system and the following property values will be ignored: , `ImageAlign`, `Image`, `ImageIndex`, `ImageList`, and `TextAlign`. In addition, the property will be ignored for button controls. If supported, users can change the appearance of controls by adjusting the appearance settings of their operating system. + If the System style is used, the appearance of the control is determined by the user's operating system and the following property values will be ignored: , `ImageAlign`, `Image`, `ImageIndex`, `ImageList`, and `TextAlign`. In addition, the property will be ignored for button controls. If supported, users can change the appearance of controls by adjusting the appearance settings of their operating system. > [!NOTE] > When the property of the and classes is set to `System`, the control is drawn by the user's operating system and the check alignment is based upon the `CheckAlign` and property values. The `CheckAlign` property value is not changed, but the appearance of the control can be affected. The check box is horizontally aligned with either the left or right edge of the control (a left or center alignment appears left aligned, right remains unchanged), and vertically aligned the same as the descriptive text. For example, if you have a control with a `CheckAlign` property value of and a property value of , and the property value is set to `System`, the check box alignment will appear to be while the text alignment remains unchanged. diff --git a/xml/System.Windows.Forms/FlowDirection.xml b/xml/System.Windows.Forms/FlowDirection.xml index 6c70a00c05d..f5cc97929a4 100644 --- a/xml/System.Windows.Forms/FlowDirection.xml +++ b/xml/System.Windows.Forms/FlowDirection.xml @@ -28,7 +28,7 @@ ## Remarks The enumeration describes the flow direction of consecutive UI elements, typically controls, on a design surface or container such as a form. This enumeration is used by linear layout containers such as , which stores this information internally in the property. - The determines where a new control is placed by default when it is added to a supporting container. The flow direction of the container, along with the and properties of each contained control, determine the rearrangement of controls when their container is resized. + The determines where a new control is placed by default when it is added to a supporting container. The flow direction of the container, along with the and properties of each contained control, determine the rearrangement of controls when their container is resized. The control provides a `FlowBreak` property to its child controls. Setting the value of the `FlowBreak` property to `true` causes the control to stop laying out controls in the current flow direction and wrap to the next row or column. diff --git a/xml/System.Windows.Forms/FlowLayoutPanel.xml b/xml/System.Windows.Forms/FlowLayoutPanel.xml index f965961fcef..e1bcd3a2a64 100644 --- a/xml/System.Windows.Forms/FlowLayoutPanel.xml +++ b/xml/System.Windows.Forms/FlowLayoutPanel.xml @@ -76,7 +76,7 @@ ## Examples - The following example shows how to set the and properties on a control. Paste the code into the Form1 source file. If your project contains a file named Form1.Designer.cs or Form1.Designer.vb, remove that file from the project. You may need to click the **Show All Files** button in Solution Explorer to see the designer file. + The following example shows how to set the and properties on a control. Paste the code into the Form1 source file. If your project contains a file named Form1.Designer.cs or Form1.Designer.vb, remove that file from the project. You may need to click the **Show All Files** button in Solution Explorer to see the designer file. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FlowLayoutPanel/cpp/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FlowDirection/Overview/form1.cs" id="Snippet1"::: @@ -115,7 +115,7 @@ and properties to their default values: and `true`, respectively. + This constructor sets the and properties to their default values: and `true`, respectively. ]]> @@ -168,7 +168,7 @@ ## Examples - The following code example sets the value of depending on the selected . + The following code example sets the value of depending on the selected . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FlowLayoutPanel/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FlowDirection/Overview/form1.cs" id="Snippet4"::: @@ -390,7 +390,7 @@ ## Examples - The following code example sets the value of the property depending on the value of a control. + The following code example sets the value of the property depending on the value of a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FlowLayoutPanel/cpp/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FlowDirection/Overview/form1.cs" id="Snippet3"::: diff --git a/xml/System.Windows.Forms/FlowLayoutSettings.xml b/xml/System.Windows.Forms/FlowLayoutSettings.xml index ec6bdfc194a..b73b23b7f06 100644 --- a/xml/System.Windows.Forms/FlowLayoutSettings.xml +++ b/xml/System.Windows.Forms/FlowLayoutSettings.xml @@ -89,7 +89,7 @@ is the default property for the class. + is the default property for the class. ]]> @@ -252,7 +252,7 @@ value. + If the area of the container is too small to display all the child controls, then at least one control will be clipped regardless of the value. Subsequent resizing of the container will reapply the layout to the contained controls. diff --git a/xml/System.Windows.Forms/FolderBrowserDialog.xml b/xml/System.Windows.Forms/FolderBrowserDialog.xml index e59dee15313..298af89d4de 100644 --- a/xml/System.Windows.Forms/FolderBrowserDialog.xml +++ b/xml/System.Windows.Forms/FolderBrowserDialog.xml @@ -57,7 +57,7 @@ This class provides a way to prompt the user to browse, create, and eventually select a folder. Use this class when you only want to allow the user to select folders, not files. Browsing of the folders is done through a tree control. In .NET Core 3.1 and later versions, this class uses the modernized file system browser window. Only folders from the file system can be selected; virtual folders cannot. - Typically, after creating a new , you set the to the location from which to start browsing. Optionally, you can set the to an absolute path of a subfolder of that will initially be selected. You can also optionally set the property to provide additional instructions to the user. Finally, call the method to display the dialog box to the user. When the dialog box is closed and the dialog box result from is , the will be a string containing the path to the selected folder. + Typically, after creating a new , you set the to the location from which to start browsing. Optionally, you can set the to an absolute path of a subfolder of that will initially be selected. You can also optionally set the property to provide additional instructions to the user. Finally, call the method to display the dialog box to the user. When the dialog box is closed and the dialog box result from is , the will be a string containing the path to the selected folder. You can use the property to control if the user is able to create new folders with the **New Folder** button. @@ -108,7 +108,7 @@ This class provides a way to prompt the user to browse, create, and eventually s When a new is created, the property is set to , the property is set to an empty string (""), the property is set to an empty string, and the property is set to `true`. - Typically, after creating a new , you set the to the location from which to start browsing. Optionally, you can set the to the path of a subfolder of that will initially be selected. You can also optionally set the property to provide additional instructions to the user. Finally, call the method to display the dialog box to the user. When the dialog box is closed and the dialog result from is , the will be a string containing the path to the selected folder. + Typically, after creating a new , you set the to the location from which to start browsing. Optionally, you can set the to the path of a subfolder of that will initially be selected. You can also optionally set the property to provide additional instructions to the user. Finally, call the method to display the dialog box to the user. When the dialog box is closed and the dialog result from is , the will be a string containing the path to the selected folder. is a modal dialog box; therefore, when shown, it blocks the rest of the application until the user has chosen a folder. When a dialog box is displayed modally, no input (keyboard or mouse click) can occur except to objects on the dialog box. The program must hide or close the dialog box (usually in response to some user action) before input to the calling program can occur. @@ -496,7 +496,7 @@ This class provides a way to prompt the user to browse, create, and eventually s , , and properties to their default values. For a list of default values, see the constructor. + Resets the , , and properties to their default values. For a list of default values, see the constructor. ]]> @@ -555,7 +555,7 @@ This class provides a way to prompt the user to browse, create, and eventually s property, along with , determines what the selected folder will be when the dialog box is displayed, as long as is an absolute path that is a subfolder of (or more accurately, points to a subfolder of the shell namespace represented by ). + Only the specified folder and any subfolders that are beneath it will appear in the dialog box and be selectable. The property, along with , determines what the selected folder will be when the dialog box is displayed, as long as is an absolute path that is a subfolder of (or more accurately, points to a subfolder of the shell namespace represented by ). @@ -670,9 +670,9 @@ This class provides a way to prompt the user to browse, create, and eventually s property is set before showing the dialog box, the folder with this path will be the selected folder, as long as is set to an absolute path that is a subfolder of (or more accurately, points to a subfolder of the shell namespace represented by ). + If the property is set before showing the dialog box, the folder with this path will be the selected folder, as long as is set to an absolute path that is a subfolder of (or more accurately, points to a subfolder of the shell namespace represented by ). - If the returns , meaning the user clicked the **OK** button, the property will return a string containing the path to the selected folder. If returns , meaning the user canceled out of the dialog box, this property will have the same value that it had prior to displaying the dialog box. If the user selects a folder that does not have a physical path (for example, My Computer), the **OK** button on the dialog box will be disabled. + If the returns , meaning the user clicked the **OK** button, the property will return a string containing the path to the selected folder. If returns , meaning the user canceled out of the dialog box, this property will have the same value that it had prior to displaying the dialog box. If the user selects a folder that does not have a physical path (for example, My Computer), the **OK** button on the dialog box will be disabled. diff --git a/xml/System.Windows.Forms/FontDialog.xml b/xml/System.Windows.Forms/FontDialog.xml index 1694ae1c346..8b566ab98ed 100644 --- a/xml/System.Windows.Forms/FontDialog.xml +++ b/xml/System.Windows.Forms/FontDialog.xml @@ -42,14 +42,14 @@ must be invoked to create this specific common dialog box. can be overridden to implement specific dialog box hook functionality. + The inherited member must be invoked to create this specific common dialog box. can be overridden to implement specific dialog box hook functionality. - When you create an instance of , some of the read/write properties are set to initial values. For a list of these values, see the constructor. + When you create an instance of , some of the read/write properties are set to initial values. For a list of these values, see the constructor. ## Examples - The following code example uses to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. + The following code example uses to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic FontDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Overview/source.cs" id="Snippet1"::: @@ -92,19 +92,19 @@ |Property|Initial Value| |--------------|-------------------| -||`true`| -||`true`| -||`true`| -||`true`| -||`Color.Black`| -||`false`| -||0| -||0| -||`false`| -||`false`| -||`false`| -||`true`| -||`false`| +||`true`| +||`true`| +||`true`| +||`true`| +||`Color.Black`| +||`false`| +||0| +||0| +||`false`| +||`false`| +||`false`| +||`true`| +||`false`| You can change the value for any of these properties through a separate call to the property. @@ -324,7 +324,7 @@ ## Examples - The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. + The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FontDialogMustExist/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Apply/form1.cs" id="Snippet1"::: @@ -376,7 +376,7 @@ to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. + The following code example uses to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic FontDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Overview/source.cs" id="Snippet1"::: @@ -502,7 +502,7 @@ to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. + The following code example uses to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic FontDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Overview/source.cs" id="Snippet1"::: @@ -560,7 +560,7 @@ , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. + The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FontDialogMustExist/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Apply/form1.cs" id="Snippet1"::: @@ -613,12 +613,12 @@ method for a class, the operating system invokes your override of the function to post operating system messages to the window. + A hook procedure is a mechanism by which a function can intercept events before they reach an application. When you override the method for a class, the operating system invokes your override of the function to post operating system messages to the window. ## Examples - The following code example demonstrates how to override the method. The example consists of a class that inherits the class. In the class's override, the example evaluates the method's `msg` parameter against constant values for particular Windows messages. If the `msg` parameter equals the specified constant, the example writes trace output identifying the Windows message that was passed to the method. This example requires that the class in which the method is declared inherits the class. + The following code example demonstrates how to override the method. The example consists of a class that inherits the class. In the class's override, the example evaluates the method's `msg` parameter against constant values for particular Windows messages. If the `msg` parameter equals the specified constant, the example writes trace output identifying the Windows message that was passed to the method. This example requires that the class in which the method is declared inherits the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/HookProc Example/CPP/fontdialogoverride.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CommonDialog/HookProc/fontdialogoverride.cs" id="Snippet1"::: @@ -673,16 +673,16 @@ must be greater than , and both must be greater than 0. + In order for the maximum and minimum size settings to take effect, must be greater than , and both must be greater than 0. - Attempts to set this property to values less than 0 will result in a value of 0 being used. If you set to a value less than , is set to . The effect of setting and to the same values is to limit the size selection to a single font size. + Attempts to set this property to values less than 0 will result in a value of 0 being used. If you set to a value less than , is set to . The effect of setting and to the same values is to limit the size selection to a single font size. When the point size is 0, there are no font size limits. ## Examples - The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. + The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FontDialogMustExist/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Apply/form1.cs" id="Snippet1"::: @@ -734,16 +734,16 @@ must be greater than , and both must be greater than 0. + In order for the maximum and minimum size settings to take effect, must be greater than , and both must be greater than 0. - Attempts to set this property to values less than 0 will result in a value of 0 being used. If you set to a value greater than , is set to the value of . The effect of setting and to the same value is to limit the size selection to a single font size. + Attempts to set this property to values less than 0 will result in a value of 0 being used. If you set to a value greater than , is set to the value of . The effect of setting and to the same value is to limit the size selection to a single font size. When the point size is 0, there are no font size limits. ## Examples - The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. + The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FontDialogMustExist/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Apply/form1.cs" id="Snippet1"::: @@ -914,7 +914,7 @@ method is invoked when the user of a font dialog box calls the method. + The method is invoked when the user of a font dialog box calls the method. ]]> @@ -1072,7 +1072,7 @@ to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. + The following code example uses to display a . This code requires that a has already been created with a and button placed on it. It also requires that the `fontDialog1` has been created. The contains the size information but not the color information. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic FontDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Overview/source.cs" id="Snippet1"::: @@ -1132,7 +1132,7 @@ , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. + The following code example demonstrates using the , , and members and handling the event. To run this example paste the following code in a form containing a named `FontDialog1` and a named `Button1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FontDialogMustExist/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FontDialog/Apply/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/Form+ControlCollection.xml b/xml/System.Windows.Forms/Form+ControlCollection.xml index eb8ae30d6ca..5aa471a0783 100644 --- a/xml/System.Windows.Forms/Form+ControlCollection.xml +++ b/xml/System.Windows.Forms/Form+ControlCollection.xml @@ -38,7 +38,7 @@ method to add a control to the form and the method to remove the control from the form. The control collection represented by this class cannot be created without binding it to a specific form. As a result, you cannot create multiple instances of this control collection and interchange them with an active form to provide different control layouts. + This class represents the collection of controls contained within a form. You can use the method to add a control to the form and the method to remove the control from the form. The control collection represented by this class cannot be created without binding it to a specific form. As a result, you cannot create multiple instances of this control collection and interchange them with an active form to provide different control layouts. @@ -135,7 +135,7 @@ method of the class. + You can use this method to add controls to the form. If you want to add a group of already created controls to the form, use the method of the class. @@ -187,7 +187,7 @@ method. To have a control remain on the form but not displayed, use the property of the control. + You can use this method to remove controls that you no longer need in your form. If you want to display a control after it is removed, you will need to add the control back to the form using the method. To have a control remain on the form but not displayed, use the property of the control. ]]> diff --git a/xml/System.Windows.Forms/Form.xml b/xml/System.Windows.Forms/Form.xml index 01d6bdf2406..1a89213dca1 100644 --- a/xml/System.Windows.Forms/Form.xml +++ b/xml/System.Windows.Forms/Form.xml @@ -80,20 +80,20 @@ ## Remarks A is a representation of any window displayed in your application. The class can be used to create standard, tool, borderless, and floating windows. You can also use the class to create modal windows such as a dialog box. A special kind of form, the multiple-document interface (MDI) form, can contain other forms called MDI child forms. An MDI form is created by setting the property to `true`. MDI child forms are created by setting the property to the MDI parent form that will contain the child form. - Using the properties available in the class, you can determine the appearance, size, color, and window management features of the window or dialog box you are creating. The property allows you to specify the caption of the window in the title bar. The and properties allow you to define the size and position of the window when it is displayed. You can use the color property to change the default foreground color of all controls placed on the form. The , , and properties allow you to control whether the form can be minimized, maximized, or resized at run time. + Using the properties available in the class, you can determine the appearance, size, color, and window management features of the window or dialog box you are creating. The property allows you to specify the caption of the window in the title bar. The and properties allow you to define the size and position of the window when it is displayed. You can use the color property to change the default foreground color of all controls placed on the form. The , , and properties allow you to control whether the form can be minimized, maximized, or resized at run time. - In addition to properties, you can use the methods of the class to manipulate a form. For example, you can use the method to show a form as a modal dialog box. You can use the method to position the form on the desktop. + In addition to properties, you can use the methods of the class to manipulate a form. For example, you can use the method to show a form as a modal dialog box. You can use the method to position the form on the desktop. The events of the class allow you to respond to actions performed on the form. You can use the event to perform operations such as updating the data displayed in the controls of the form when the form is activated. You can use a form as the starting class in your application by placing a method called `Main` in the class. In the `Main` method add code to create and show the form. You will also need to add the `STAThread` attribute to the `Main` method in order for the form to run. When the starting form is closed, the application is also closed. - If you set the property to `false` before the is visible (for example, setting to false in the Microsoft Visual Studio designer), the minimize, maximize, close, and system buttons remain enabled. If you set to `false` after the is visible (for example, when the Load event occurs), the buttons are disabled. + If you set the property to `false` before the is visible (for example, setting to false in the Microsoft Visual Studio designer), the minimize, maximize, close, and system buttons remain enabled. If you set to `false` after the is visible (for example, when the Load event occurs), the buttons are disabled. ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -136,7 +136,7 @@ ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also sets uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also sets uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -193,7 +193,7 @@ ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -241,7 +241,7 @@ ## Examples - The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. + The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: @@ -288,14 +288,14 @@ > [!NOTE] > When the application is active and has multiple forms, the active form is the form with the input focus. A form that is not visible cannot be the active form. The simplest way to activate a visible form is to click it or use an appropriate keyboard combination. - To activate a form at run time using code, call the method. You can use this event for tasks such as updating the contents of the form based on changes made to the form's data when the form was not activated. + To activate a form at run time using code, call the method. You can use this event for tasks such as updating the contents of the form based on changes made to the form's data when the form was not activated. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following example demonstrates how to use the , , , , and members. To run the example, paste the following code in a form called Form1 containing a called `Button1` and two controls called `Label1` and `Label2`. + The following example demonstrates how to use the , , , , and members. To run the example, paste the following code in a form called Form1 containing a called `Button1` and two controls called `Label1` and `Label2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: @@ -341,9 +341,9 @@ method simply returns. If `form` is not `null`, then it is set to be the active MDI child form. + If the `form` parameter is already the active MDI child form, then the method simply returns. If `form` is not `null`, then it is set to be the active MDI child form. - Whether the `form` parameter is `null` or not, raises the event. + Whether the `form` parameter is `null` or not, raises the event. ]]> @@ -391,7 +391,7 @@ ## Examples - The following example gets the active form and disables all the controls on the form. The example uses the collection of the form to iterate through each control on the form and disable the controls. + The following example gets the active form and disables all the controls on the form. The example uses the collection of the form to iterate through each control on the form and disable the controls. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ActiveForm Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ActiveForm/source.cs" id="Snippet1"::: @@ -451,7 +451,7 @@ ## Examples - The following example obtains a reference to the active MDI child form and loops through all controls on the form, resetting their properties. This example requires that an MDI parent form has been created and that this method call is being made from the MDI parent form. + The following example obtains a reference to the active MDI child form and loops through all controls on the form, resetting their properties. This example requires that an MDI parent form has been created and that this method call is being made from the MDI parent form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ActiveMdiChild Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ActiveMdiChild/source.cs" id="Snippet1"::: @@ -497,7 +497,7 @@ method is called. You can also make a form owned by another by setting the property with a reference to its owner form. + The form assigned to the owner form remains owned until the method is called. You can also make a form owned by another by setting the property with a reference to its owner form. When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected. @@ -507,7 +507,7 @@ ## Examples - The following example demonstrates how to use the method to display a form as an owned form of another form. Once the owned form is shown, you can minimize its owner form and the owned form will minimize with it. The example requires that the code in the example is called from another event or method of a form. + The following example demonstrates how to use the method to display a form as an owned form of another form. Once the owned form is shown, you can minimize its owner form and the owned form will minimize with it. The example requires that the code in the example is called from another event or method of a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.AddOwnedForm/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/AddOwnedForm/form1.cs" id="Snippet1"::: @@ -657,7 +657,7 @@ property and the value returned by the method. + This method determines the form size using the value of the property and the value returned by the method. ]]> @@ -723,11 +723,11 @@ ## Remarks > [!IMPORTANT] -> The is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). +> The is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). You can use this property to allow your form and its controls to automatically adjust based on changes in the font. This can be useful in applications where the font might increase or decrease based on the language specified for use by Windows. - To obtain the size the form will auto scale to, use the property. If you want to determine the size the form will auto scale to based on a specific font, use the method. + To obtain the size the form will auto scale to, use the property. If you want to determine the size the form will auto scale to based on a specific font, use the method. ]]> @@ -794,7 +794,7 @@ > [!IMPORTANT] > This member has been retained for backward compatibility. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). - The value of the property is used at form-display time to compute the scaling factor for the form. The autoscaling base size is used by the form as a baseline for comparison to the system's font size to determine how much to scale the form when autoscaling is used. If you want to determine the size a form will auto scale to based on a specific font, use the method. + The value of the property is used at form-display time to compute the scaling factor for the form. The autoscaling base size is used by the form as a baseline for comparison to the system's font size to determine how much to scale the form when autoscaling is used. If you want to determine the size a form will auto scale to based on a specific font, use the method. > [!NOTE] > The value of this property is used when the form is initially created. Once the property is set, it cannot be changed. @@ -905,18 +905,18 @@ to force a form to resize to fit its contents. + Use to force a form to resize to fit its contents. - A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. + A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. - When using , the and properties are respected, but the current value of the property is ignored. Using and also renders the property superfluous, as there is no way to shrink the form to hide its contained controls from view. + When using , the and properties are respected, but the current value of the property is ignored. Using and also renders the property superfluous, as there is no way to shrink the form to hide its contained controls from view. - See the enumeration for information on how a form behaves when is `true`. + See the enumeration for information on how a form behaves when is `true`. ## Examples - The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. + The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AutoSizeMode/Overview/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AutoSizeMode/Overview/Form1.vb" id="Snippet1"::: @@ -1010,12 +1010,12 @@ ## Remarks Setting the property to a new value causes the form to be laid out again. - A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. + A form does not automatically resize in the Visual Studio forms designer, regardless of the values of the and properties. The form correctly resizes itself at run time according to the values of these two properties. By contrast, a custom automatically resizes itself both at design time and at run time. ## Examples - The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. + The following example shows a form created using code that automatically resizes to fit its contents. When run, the form displays a , a for entering a URL, and a for displaying that URL inside of the user's default Web browser. The example uses a to lay out the contained controls one after the other. It also sets the and to grow and shrink to fit the contents of its form. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AutoSizeMode/Overview/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AutoSizeMode/Overview/Form1.vb" id="Snippet1"::: @@ -1180,14 +1180,14 @@ This property allows you to designate a default action to occur when the user presses the ESC key in your application. You can use this property to allow the user to quickly navigate a simple form by allowing them to simply press the ESC key to close a window without committing changes instead of manually clicking the cancel button with their mouse. - may not work if another control on the form intercepts the ESC key. For example, if you have a open on your form, ESC will close the instead of closing the Form. + may not work if another control on the form intercepts the ESC key. For example, if you have a open on your form, ESC will close the instead of closing the Form. - The object assigned to must be visible on the form, or else pressing the ESC key will have no effect. + The object assigned to must be visible on the form, or else pressing the ESC key will have no effect. ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -1230,9 +1230,9 @@ method directly from your code. Instead, set the property to . + Do not call the method directly from your code. Instead, set the property to . - If the form or dialog is top-level, then centers the form with respect to the screen or desktop. + If the form or dialog is top-level, then centers the form with respect to the screen or desktop. ]]> @@ -1273,7 +1273,7 @@ ## Remarks Do not call this directly from your code. Instead, set the property to . - The method uses the following priority list to determine the screen used to center the form: + The method uses the following priority list to determine the screen used to center the form: 1. The property of the form. @@ -1328,7 +1328,7 @@ property or use the individual properties and . + The size of the client area of the form is the size of the form excluding the borders and the title bar. The client area of a form is the area within a form where controls can be placed. You can use this property to get the proper dimensions when performing graphics operations or when sizing and positioning controls on the form. To get the size of the entire form, use the property or use the individual properties and . > [!NOTE] > You cannot currently bind to this property using application settings. For more information on application settings, see [Application Settings Overview](/dotnet/desktop/winforms/advanced/application-settings-overview). @@ -1382,10 +1382,10 @@ ## Remarks When a form is closed, all resources created within the object are closed and the form is disposed. You can prevent the closing of a form at run time by handling the event and setting the property of the passed as a parameter to your event handler. If the form you are closing is the startup form of your application, your application ends. - The two conditions when a form is not disposed on `Close` is when (1) it is part of a multiple-document interface (MDI) application, and the form is not visible; and (2) you have displayed the form using . In these cases, you will need to call manually to mark all of the form's controls for garbage collection. + The two conditions when a form is not disposed on `Close` is when (1) it is part of a multiple-document interface (MDI) application, and the form is not visible; and (2) you have displayed the form using . In these cases, you will need to call manually to mark all of the form's controls for garbage collection. > [!NOTE] -> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. +> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. ]]> @@ -1443,12 +1443,12 @@ > [!CAUTION] > The event is obsolete in .NET Framework version 2.0; use the event instead. - This event occurs after the form has been closed by the user or by the method of the form. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. + This event occurs after the form has been closed by the user or by the method of the form. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. You can use this event to perform tasks such as freeing resources used by the form and to save information entered in the form or to update its parent form. > [!CAUTION] -> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. +> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. If the form is an MDI parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. @@ -1513,10 +1513,10 @@ When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. > [!NOTE] -> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. +> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. > [!CAUTION] -> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. +> The and events are not raised when the method is called to exit your application. If you have validation code in either of these events that must be executed, you should call the method for each open form individually before calling the method. If the form is an MDI parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. Canceling the event of an MDI child form does not prevent the event of the MDI parent form from being raised. However, canceling the event will set to `true` the property of the that is passed as a parameter to the parent form. To force all MDI parent and child forms to close, set the property to `false` in the MDI parent form. @@ -1568,7 +1568,7 @@ ## Remarks If the property is set to `true`, the control box is displayed in the upper-right corner of the caption bar. The control box can include minimize, maximize, and help buttons in addition to a close button. For the `ControlBox` property to have any effect, you must also set the form's property to , , , or . - If you set to `false` and also set the property, the property of the form is not updated to reflect that the non-client area of the form has been hidden. To fix this problem, put the code that alters the property in the event handler. + If you set to `false` and also set the property, the property of the form is not updated to reflect that the non-client area of the form has been hidden. To fix this problem, put the code that alters the property in the event handler. > [!NOTE] > When set to `false`, the property has no effect on a Multiple-document interface (MDI) child form that is displayed maximized at time of creation. @@ -1576,7 +1576,7 @@ ## Examples - The following example uses the , , , , and properties to create a form that does not have any border or caption box. The form created in this example could be used to create a splash screen for an application. The example requires that the example's method is defined in a form class and called when the form is being initialized. + The following example uses the , , , , and properties to create a form that does not have any border or caption box. The form created in this example could be used to create a splash screen for an application. The example requires that the example's method is defined in a form class and called when the form is being initialized. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ControlBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ControlBox/source.cs" id="Snippet1"::: @@ -1771,7 +1771,7 @@ ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -2000,9 +2000,9 @@ You can use this property to position your form relative to other forms and applications on the Windows desktop. - If you call the method before calling the method, your form will be positioned at its default location, which is determined by the operating system. For more information about window positioning, see the [Window Size and Position](/windows/win32/winmsg/window-features#window-size-and-position) section of the "Window Features" article. + If you call the method before calling the method, your form will be positioned at its default location, which is determined by the operating system. For more information about window positioning, see the [Window Size and Position](/windows/win32/winmsg/window-features#window-size-and-position) section of the "Window Features" article. - If you call after calling , your form will be positioned at the location you specified. + If you call after calling , your form will be positioned at the location you specified. @@ -2065,7 +2065,7 @@ ## Remarks The dialog result of a form is the value that is returned from the form when it is displayed as a modal dialog box. If the form is displayed as a dialog box, setting this property with a value from the enumeration sets the value of the dialog box result for the form, hides the modal dialog box, and returns control to the calling form. This property is typically set by the property of a control on the form. When the user clicks the control, the value assigned to the property of the is assigned to the property of the form. - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X in the top-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. The method is not automatically called when the user clicks the **Close** button of a dialog box or sets the value of the property. Instead, the form is hidden and can be shown again without creating a new instance of the dialog box. Because of this behavior, you must call the method of the form when the form is no longer needed by your application. + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X in the top-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. The method is not automatically called when the user clicks the **Close** button of a dialog box or sets the value of the property. Instead, the form is hidden and can be shown again without creating a new instance of the dialog box. Because of this behavior, you must call the method of the form when the form is no longer needed by your application. You can use this property to determine how a dialog box is closed in order to properly process the actions performed in the dialog box. @@ -2130,7 +2130,7 @@ When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. - will be called automatically if the form is shown using the method. If another method such as is used, or the form is never shown at all, you must call yourself within your application. + will be called automatically if the form is shown using the method. If another method such as is used, or the form is never shown at all, you must call yourself within your application. ]]> @@ -2291,12 +2291,12 @@ The border style of the form determines how the outer edge of the form appears. In addition to changing the border display for a form, certain border styles prevent the form from being sized. For example, the `FormBorderStyle.FixedDialog` border style changes the border of the form to that of a dialog box and prevents the form from being resized. The border style can also affect the size or availability of the caption bar section of a form. > [!NOTE] -> With the style, it is impossible to resize the window below a certain minimum value, even if you have set to `false` and assigned a zero-length string to . Consider working around this by using the style instead. +> With the style, it is impossible to resize the window below a certain minimum value, even if you have set to `false` and assigned a zero-length string to . Consider working around this by using the style instead. ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -2492,7 +2492,7 @@ event occurs after the form has been closed by the user or by the method or the method of the class. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. + The event occurs after the form has been closed by the user or by the method or the method of the class. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`. You can use this event to perform tasks such as freeing resources used by the form and to save information entered in the form or to update its parent form. @@ -2503,7 +2503,7 @@ ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -2558,7 +2558,7 @@ When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. You can override the value assigned to the property when the user clicks the **Close** button by setting the property in an event handler for the event of the form. > [!NOTE] -> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. +> When the method is called on a displayed as a modeless window, you cannot call the method to make the form visible, because the form's resources have already been released. To hide a form and then make it visible, use the method. If the form is a multiple-document interface (MDI) parent form, the events of all MDI child forms are raised before the MDI parent form's event is raised. Likewise, the events of all MDI child forms are raised before the event of the MDI parent form is raised. Canceling the event of an MDI child form does not prevent the event of the MDI parent form from being raised. However, canceling the event will set to `true` the property of the class that is passed as a parameter to the parent form. To force all MDI parent and child forms to close, set the property to `false` in the MDI parent form. @@ -2567,7 +2567,7 @@ ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -2741,7 +2741,7 @@ ## Remarks > [!IMPORTANT] -> The method is obsolete. This member has been retained for backward compatibility. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). +> The method is obsolete. This member has been retained for backward compatibility. For more information about automatic scaling, see [Automatic Scaling in Windows Forms](/dotnet/desktop/winforms/automatic-scaling-in-windows-forms). You can use this method to determine the size a form would autoscale to for a specific font before applying the font to the form. If you want to determine the size a form is autoscaled to based on the font currently assigned to the form, use the property. @@ -2843,7 +2843,7 @@ To display a Help button, the value of the form's and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a Help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a Help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -2904,7 +2904,7 @@ To display a Help button, the value of the form's event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -2963,7 +2963,7 @@ To display a Help button, the value of the form's is set to . In that case, the form will not display an icon. + This property will have no effect if is set to . In that case, the form will not display an icon. ]]> @@ -3008,7 +3008,7 @@ To display a Help button, the value of the form's event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -3059,7 +3059,7 @@ To display a Help button, the value of the form's event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -3127,7 +3127,7 @@ To display a Help button, the value of the form's property to determine whether a form returned by a method or property is an MDI child form or a standard form in your application such as a dialog box. > [!NOTE] -> All MDI child forms have sizable borders, a control-menu box, and Minimize and **Maximize** buttons, regardless of the settings of the , , , and properties. +> All MDI child forms have sizable borders, a control-menu box, and Minimize and **Maximize** buttons, regardless of the settings of the , , , and properties. ]]> @@ -3191,7 +3191,7 @@ To display a Help button, the value of the form's events of all MDI child forms are raised before the MDI parent form's event is raised. In addition, the events of all MDI child forms are raised before the event of the MDI parent form is raised. > [!NOTE] -> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. +> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. @@ -3302,7 +3302,7 @@ To display a Help button, the value of the form's If a form has no visible or enabled controls, it automatically receives all keyboard events. > [!NOTE] -> A control on a form may be programmed to cancel any keystrokes it receives. Since the control never sends these keystrokes to the form, the form will never see them regardless of the setting of . +> A control on a form may be programmed to cancel any keystrokes it receives. Since the control never sends these keystrokes to the form, the form will never see them regardless of the setting of . @@ -3359,7 +3359,7 @@ To display a Help button, the value of the form's method to arrange any child forms that are currently open in the application. + The following example shows the event handlers for the menu items of a Window menu in an MDI application's parent form. Each event handler makes calls to the method to arrange any child forms that are currently open in the application. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.LayoutMdi Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/LayoutMdi/source.cs" id="Snippet1"::: @@ -3408,7 +3408,7 @@ To display a Help button, the value of the form's , , , and members. To run the example, paste the following code in a form called `Form1` containing a called `Button1` and two controls called `Label1` and `Label2`. + The following example demonstrates how to use the , , , and members. To run the example, paste the following code in a form called `Form1` containing a called `Button1` and two controls called `Label1` and `Label2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: @@ -3456,7 +3456,7 @@ To display a Help button, the value of the form's is a structure, which means that it is a value type. If you access a property in , a copy of the property is returned. Therefore, changing the or properties of the returned from the property will not affect the , , , or property values of the . To adjust these properties, set each property value individually, or set the property with a new . + is a structure, which means that it is a value type. If you access a property in , a copy of the property is returned. Therefore, changing the or properties of the returned from the property will not affect the , , , or property values of the . To adjust these properties, set each property value individually, or set the property with a new . The property gets or sets the property of the base class, and sets the property to `true`. @@ -3508,7 +3508,7 @@ To display a Help button, the value of the form's property, you must the control to the collection of the form. + In addition to setting the property, you must the control to the collection of the form. The class supersedes the class in previous versions of the .NET Framework. @@ -3640,12 +3640,12 @@ To display a Help button, the value of the form's [!NOTE] -> Maximizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Maximized`, the form is maximized independently of whatever settings are in effect for the and properties. +> Maximizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Maximized`, the form is maximized independently of whatever settings are in effect for the and properties. ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -3733,7 +3733,7 @@ To display a Help button, the value of the form's event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -3849,7 +3849,7 @@ To display a Help button, the value of the form's event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -3900,7 +3900,7 @@ To display a Help button, the value of the form's event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -4067,7 +4067,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f To create an MDI child form, assign the that will be the MDI parent form to the property of the child form. You can use this property from an MDI child form to obtain global information that all child forms need or to invoke methods that perform actions to all child forms. > [!NOTE] -> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. +> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. @@ -4212,7 +4212,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -4268,7 +4268,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -4386,12 +4386,12 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f A **Minimize** button enables users to minimize a window to an icon. To display a **Minimize** button, the value of the form's property must be `true`, its default value. The property determines whether the upper-right corner of the caption bar contains controls such as a maximize button, a minimize button, a help button, and a close button. In addition, you must also set the form's property to , , , or . > [!NOTE] -> Minimizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Minimized`, the form is minimized independently of whatever settings are in effect for the and properties. +> Minimizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to `FormWindowState.Minimized`, the form is minimized independently of whatever settings are in effect for the and properties. ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.AcceptButton Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Overview/source.cs" id="Snippet1"::: @@ -4494,7 +4494,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -4553,12 +4553,12 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f You can use this property to determine whether a form that you have obtained from a method or property has been displayed modally. - To display a form modally use the method. + To display a form modally use the method. ## Examples - The following example uses the property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form a non-top-level form with a tool window border. + The following example uses the property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form a non-top-level form with a tool window border. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Modal/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Modal/form1.cs" id="Snippet1"::: @@ -4611,7 +4611,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. ]]> @@ -4657,7 +4657,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4701,7 +4701,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4760,14 +4760,14 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks > [!CAUTION] -> The method is obsolete; use the method instead. +> The method is obsolete; use the method instead. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. > [!CAUTION] -> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. +> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. ]]> @@ -4828,14 +4828,14 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks > [!CAUTION] -> The method is obsolete; use the method instead. +> The method is obsolete; use the method instead. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. > [!CAUTION] -> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. +> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method. ]]> @@ -4934,7 +4934,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5074,7 +5074,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5262,11 +5262,11 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f method removes the current form from the collection of the associated . + The method removes the current form from the collection of the associated . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class. ]]> @@ -5321,7 +5321,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5565,7 +5565,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5619,7 +5619,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5672,7 +5672,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5757,7 +5757,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5810,7 +5810,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5864,7 +5864,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5918,7 +5918,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5971,7 +5971,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -6024,7 +6024,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -6077,7 +6077,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -6211,7 +6211,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -6267,7 +6267,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -6319,11 +6319,11 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f method will return without performing any action. If the property of the form has a value of , then the handles of the form and its child controls will be recreated through calls to the method. + If the current form or one of its parents is disposing of resources, the method will return without performing any action. If the property of the form has a value of , then the handles of the form and its child controls will be recreated through calls to the method. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -6380,7 +6380,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -6517,7 +6517,7 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -6572,9 +6572,9 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f ## Remarks The property enables you to specify a level of transparency for the form and its controls. When this property is set to a value less than 100 percent (1.00), the entire form, including borders, is made more transparent. Setting this property to a value of 0 percent (0.00) makes the form completely invisible. You can use this property to provide different levels of transparency or to provide effects such as phasing a form in or out of view. For example, you can phase a form into view by setting the property to a value of 0 percent (0.00) and gradually increasing the value until it reaches 100 percent (1.00). - differs from the transparency provided by , which only makes a form and its controls completely transparent if they are the same color as the value specified in the property. + differs from the transparency provided by , which only makes a form and its controls completely transparent if they are the same color as the value specified in the property. -This property is not supported when is `true`. +This property is not supported when is `true`. The property depends on the Layered Windows API. For more information, see [Layered Windows](/windows/win32/winmsg/window-features#layered-windows). @@ -6639,7 +6639,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another method. The form assigned to the owner form will remain owned until the method is called. You can also make a form owned by another by setting the property with a reference to its owner form. + This property returns an array that contains all forms that are owned by this form. To make a form owned by another form, call the method. The form assigned to the owner form will remain owned until the method is called. You can also make a form owned by another by setting the property with a reference to its owner form. When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named `Form2` that is owned by a form named `Form1`. If `Form1` is closed or minimized, `Form2` is also closed or hidden. Owned forms are also never displayed behind their owner form. You can use owned forms for windows such as find and replace windows, which should not be displayed behind the owner form when the owner form is selected. @@ -6754,7 +6754,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another method overrides the base implementation to provide additional handling of main menu command keys and MDI accelerators. + The method overrides the base implementation to provide additional handling of main menu command keys and MDI accelerators. For information about keyboard input, see [Keyboard Input in a Windows Forms Application](/dotnet/desktop/winforms/keyboard-input-in-a-windows-forms-application). @@ -6844,7 +6844,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another method overrides the base implementation to provide additional handling of the RETURN and ESCAPE keys in dialog boxes. The method performs no processing on keystrokes that include the ALT or CONTROL modifiers. + The method overrides the base implementation to provide additional handling of the RETURN and ESCAPE keys in dialog boxes. The method performs no processing on keystrokes that include the ALT or CONTROL modifiers. ]]> @@ -6996,7 +6996,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another method is called. In addition to removing the owned form from the list of owned form, this method also sets the owner form to `null`. + The form assigned to the owner form remains owned until the method is called. In addition to removing the owned form from the list of owned form, this method also sets the owner form to `null`. ]]> @@ -7039,21 +7039,21 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another 1. A single event occurs as the form enters resizing mode. -2. Zero or more pairs of and events occur as the form's is modified. +2. Zero or more pairs of and events occur as the form's is modified. 3. A single event occurs as the form exits resizing mode. > [!NOTE] > Just clicking without dragging on a border or resizing grip will generate the and events without any intermediate and event pairs. - The and pair of events is also raised when the user moves the form, typically by clicking and dragging on the caption bar. These events are not generated by programmatic manipulation of the form, for example by changing the or properties. + The and pair of events is also raised when the user moves the form, typically by clicking and dragging on the caption bar. These events are not generated by programmatic manipulation of the form, for example by changing the or properties. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -7110,14 +7110,14 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another ## Remarks The event is raised when the user finishes resizing a form, typically by dragging one of the borders or the sizing grip located on the lower-right corner of the form, and then releasing it. For more information about the resizing operation, see the event. - The event is also generated after the user moves a form, typically by clicking and dragging on the caption bar. This event is not generated by programmatic manipulation of the form, for example by changing the or properties. + The event is also generated after the user moves a form, typically by clicking and dragging on the caption bar. This event is not generated by programmatic manipulation of the form, for example by changing the or properties. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -7182,7 +7182,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another property to track the user's window size and position preferences for the form in its normal window state. You should track both the value of the and properties when tracking the user's window preferences. + Typically, you use the property to track the user's window size and position preferences for the form in its normal window state. You should track both the value of the and properties when tracking the user's window preferences. > [!NOTE] > The value of the property is valid only when the property of the class is not equal to . @@ -7236,17 +7236,17 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another property is primarily useful for developing world-ready forms for worldwide audiences. Many forms are designed so that controls are laid out on a form in a left-to-right fashion. These forms are compatible with languages that follow this writing direction. However, when you display the same forms to users of right-to-left languages, it is often preferable to reverse the order of the controls on the form. If both the and properties are `true`, mirroring will be turned on for the form, and control placement and text flow will be right-to-left. + The property is primarily useful for developing world-ready forms for worldwide audiences. Many forms are designed so that controls are laid out on a form in a left-to-right fashion. These forms are compatible with languages that follow this writing direction. However, when you display the same forms to users of right-to-left languages, it is often preferable to reverse the order of the controls on the form. If both the and properties are `true`, mirroring will be turned on for the form, and control placement and text flow will be right-to-left. - Unlike , does not inherit. If you want it to take effect for child controls, you must set it on each child control that you want mirrored. + Unlike , does not inherit. If you want it to take effect for child controls, you must set it on each child control that you want mirrored. - Owner draw is not supported when is set to `Yes`. The owner draw events will still occur, but the behavior of any code you author in these events is not defined. Additionally, , , , and the painting events are not supported. + Owner draw is not supported when is set to `Yes`. The owner draw events will still occur, but the behavior of any code you author in these events is not defined. Additionally, , , , and the painting events are not supported. - The and properties cause the following Windows API window styles to be set: + The and properties cause the following Windows API window styles to be set: -- When is set to `Yes` and is set to `true`, Windows Forms sets the `WS_EX_LAYOUTRTL` window style, and removes the `WS_EX_RIGHT` and `WS_EX_RTLREADING` styles. +- When is set to `Yes` and is set to `true`, Windows Forms sets the `WS_EX_LAYOUTRTL` window style, and removes the `WS_EX_RIGHT` and `WS_EX_RTLREADING` styles. -- When is set to `Yes` but is set to `No`, Windows Forms sets the `WS_EX_RIGHT` and `WS_EX_RTLREADING` window styles. +- When is set to `Yes` but is set to `No`, Windows Forms sets the `WS_EX_RIGHT` and `WS_EX_RTLREADING` window styles. Changing the value of this property raises the event. @@ -7289,12 +7289,12 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another and properties are typically used in developing World-Ready applications. + The and properties are typically used in developing World-Ready applications. ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -7595,7 +7595,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another ## Examples - The following example demonstrates using the method. To run this example, paste the following code in a form that contains a button named `Button2`. Ensure all events are associated with their event handlers. + The following example demonstrates using the method. To run this example, paste the following code in a form that contains a button named `Button2`. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/MaximumSize/form1.cs" id="Snippet2"::: @@ -7642,12 +7642,12 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another method to position multiple-document interface (MDI) child forms. + Desktop coordinates are based on the working area of the screen, which excludes the taskbar. You can use this method to position your form on the desktop. Since desktop coordinates are based on the working area of the form, you can use this method to ensure that your form is completely visible on the desktop. This method is intended to be used primarily for top-level forms; use the method to position multiple-document interface (MDI) child forms. ## Examples - The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. + The following example demonstrates how to use the , and members. To run the example, paste the following code in a form called `Form1` containing a button called `Button1` and two `Label` controls called `Label1` and `Label2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1"::: @@ -7736,7 +7736,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another ## Remarks You can use this method to display a non-modal form. When you use this method, the property of the form is set to `owner`. The non-modal form can use the property to get information about the owning form. Calling this method is identical to setting the property of the non-modal and then calling the method. - Showing the form is equivalent to setting the property to `true`. After the method is called, the property returns a value of `true` until the method is called. + Showing the form is equivalent to setting the property to `true`. After the method is called, the property returns a value of `true` until the method is called. ]]> @@ -7901,16 +7901,16 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another enumeration by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. + You can use this method to display a modal dialog box in your application. When this method is called, the code following it is not executed until after the dialog box is closed. The dialog box can be assigned one of the values of the enumeration by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike non-modal forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike non-modal forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. - This version of the method does not specify a form or control as its owner. When this version is called, the currently active window is made the owner of the dialog box. If you want to specify a specific owner, use the other version of this method. + This version of the method does not specify a form or control as its owner. When this version is called, the currently active window is made the owner of the dialog box. If you want to specify a specific owner, use the other version of this method. ## Examples - The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `testDialog` is created and that it contains a control named `TextBox1`. Furthermore, the example requires that code in this example is contained and called from a different in order to display `testDialog` as a modal dialog box. The example uses the version of that specifies an owner for the dialog box. + The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `testDialog` is created and that it contains a control named `TextBox1`. Furthermore, the example requires that code in this example is contained and called from a different in order to display `testDialog` as a modal dialog box. The example uses the version of that specifies an owner for the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ShowDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ShowDialog/source.cs" id="Snippet1"::: @@ -7974,16 +7974,16 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. + You can use this method to display a modal dialog box in your application. When this method is called, the code following it is not executed until after the dialog box is closed. The dialog box can be assigned one of the values of by assigning it to the property of a on the form or by setting the property of the form in code. This value is then returned by this method. You can use this return value to determine how to process the actions that occurred in the dialog box. For example, if the dialog box was closed and returned the `DialogResult.Cancel` value through this method, you could prevent code following the call to from executing. - When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike modeless forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. + When a form is displayed as a modal dialog box, clicking the **Close** button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the property to be set to `DialogResult.Cancel`. Unlike modeless forms, the method is not called by the .NET Framework when the user clicks the close form button of a dialog box or sets the value of the property. Instead the form is hidden and can be shown again without creating a new instance of the dialog box. Because a form displayed as a dialog box is hidden instead of closed, you must call the method of the form when the form is no longer needed by your application. - This version of the method allows you to specify a specific form that will own the dialog box that is shown. + This version of the method allows you to specify a specific form that will own the dialog box that is shown. ## Examples - The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `Form2` is created and that it contains a control named `TextBox1`. The example uses the version of that specifies an owner for the dialog box. + The following example displays a form as a modal dialog box and evaluates the return value of the dialog box before determining whether to read the value of a control on the dialog box form. This example requires that a named `Form2` is created and that it contains a control named `TextBox1`. The example uses the version of that specifies an owner for the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.ShowDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/ShowDialog/source.cs" id="Snippet1"::: @@ -8160,11 +8160,11 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another property contains a value that indicates whether the form's is displayed in the caption bar of the form. If the property is `false`, both the icon and control box will be suppressed. + The property contains a value that indicates whether the form's is displayed in the caption bar of the form. If the property is `false`, both the icon and control box will be suppressed. - If is `false` when the primary form is shown, a generic icon will be displayed in the taskbar button for the application. + If is `false` when the primary form is shown, a generic icon will be displayed in the taskbar button for the application. - This property has no effect if is set to . In that case, the form does not display an icon. + This property has no effect if is set to . In that case, the form does not display an icon. ]]> @@ -8268,7 +8268,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another ## Examples - The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -8329,7 +8329,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another ## Remarks Use this property if you want to show a top-level window, but don't want to interrupt a user's work by taking the input focus away from the current window. This can be an informational pop-up window or a floating window, such as a Tools palette in the Paint application. - Because this property is read-only, you can only change its value by overriding in your own form, and programming it to return `true`. + Because this property is read-only, you can only change its value by overriding in your own form, and programming it to return `true`. If your non-activated window needs to use UI controls, you should consider using the controls, such as . These controls are windowless, and will not cause a window to activate when they are selected. @@ -8379,13 +8379,13 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another and properties individually. If you want to set the size and location of a form, you can use the property to size and locate the form based on desktop coordinates or use the property of the class to set the size and location of the form based on screen coordinates. + This property allows you to set both the height and width (in pixels) of the form at the same time instead of setting the and properties individually. If you want to set the size and location of a form, you can use the property to size and locate the form based on desktop coordinates or use the property of the class to set the size and location of the form based on screen coordinates. > [!NOTE] > The maximum value of this property is limited by the resolution of the screen on which the form runs. The value cannot be greater than 12 pixels over each screen dimension (horizontal + 12 and vertical + 12). > [!NOTE] -> On Pocket PC devices, you can create a resizable window by setting to `None` and removing any control. On SmartPhone devices, you can never resize a - it will always fill the entire screen. +> On Pocket PC devices, you can create a resizable window by setting to `None` and removing any control. On SmartPhone devices, you can never resize a - it will always fill the entire screen. @@ -8502,12 +8502,12 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another ## Remarks This property enables you to set the starting position of the form when it is displayed at run time. The form's position can be specified manually by setting the property or use the default location specified by Windows. You can also position the form to display in the center of the screen or in the center of its parent form for forms such as multiple-document interface (MDI) child forms. - This property should be set before the form is shown. You can set this property before you call the or method or in your form's constructor. + This property should be set before the form is shown. You can set this property before you call the or method or in your form's constructor. ## Examples - The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. + The following example creates a new instance of a and calls the method to display the form as a dialog box. The example sets the , , , and properties to change the appearance and functionality of the form to a dialog box. The example also uses the method of the form's collection to add two controls. The example uses the property to display a help button in the caption bar of the dialog box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Form.StartPosition Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/StartPosition/source.cs" id="Snippet1"::: @@ -8788,7 +8788,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another ## Examples - The following example use the property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form non-top-level form with a tool window border. + The following example use the property to determine if a form is displayed as a modal form. If it is not the and properties are changed to make the form non-top-level form with a tool window border. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Modal/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Modal/form1.cs" id="Snippet1"::: @@ -8916,9 +8916,9 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another property is assigned a , the areas of the form that have the same will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. For example, if the client region of a form is made transparent, clicking the mouse on that area would send the event notification of the click to any window that is below it. If the color assigned to the property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a control on a form that has its property set to `SystemColors.Control`, the control will be displayed transparently unless the property of the control is changed to a different color. + When the property is assigned a , the areas of the form that have the same will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. For example, if the client region of a form is made transparent, clicking the mouse on that area would send the event notification of the click to any window that is below it. If the color assigned to the property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a control on a form that has its property set to `SystemColors.Control`, the control will be displayed transparently unless the property of the control is changed to a different color. - This property is not supported when is `true`. + This property is not supported when is `true`. @@ -8964,7 +8964,7 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another method determines which button on the form raises its Click event when the user presses ENTER, according to the following priority: + The method determines which button on the form raises its Click event when the user presses ENTER, according to the following priority: 1. If the property implements the interface, that control is the default button. @@ -9109,12 +9109,12 @@ This example assumes that the `CreateMyOpaqueForm` method is called from another property is always set to `FormWindowState.Normal`, regardless of its initial setting. This is reflected in the , , , and property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the property. + Before a form is displayed, the property is always set to `FormWindowState.Normal`, regardless of its initial setting. This is reflected in the , , , and property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the property. ## Examples - The following example demonstrates how to set the to maximized. The code is called from the event handler after the form has been created. + The following example demonstrates how to set the to maximized. The code is called from the event handler after the form has been created. ```csharp private void Form1_Shown(object sender, EventArgs e) diff --git a/xml/System.Windows.Forms/FormClosedEventArgs.xml b/xml/System.Windows.Forms/FormClosedEventArgs.xml index 4b1f746fcc7..4a40cd42ceb 100644 --- a/xml/System.Windows.Forms/FormClosedEventArgs.xml +++ b/xml/System.Windows.Forms/FormClosedEventArgs.xml @@ -27,14 +27,14 @@ event occurs after a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. If a form has any child or owned forms, a event is also raised for each one. + The event occurs after a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. If a form has any child or owned forms, a event is also raised for each one. The class provides data for the event. The property provides the reason why the form is being closed. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -136,7 +136,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/FormClosedEventHandler.xml b/xml/System.Windows.Forms/FormClosedEventHandler.xml index 2d29492cdaf..70293508547 100644 --- a/xml/System.Windows.Forms/FormClosedEventHandler.xml +++ b/xml/System.Windows.Forms/FormClosedEventHandler.xml @@ -40,13 +40,13 @@ A that contains the event data. Represents the method that handles a event. - event occurs after a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. - - When you create a 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/). - + event occurs after a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. + + When you create a 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/). + ]]> diff --git a/xml/System.Windows.Forms/FormClosingEventArgs.xml b/xml/System.Windows.Forms/FormClosingEventArgs.xml index 7f3ff6e2c39..418ba9cdbbb 100644 --- a/xml/System.Windows.Forms/FormClosingEventArgs.xml +++ b/xml/System.Windows.Forms/FormClosingEventArgs.xml @@ -27,16 +27,16 @@ event occurs just before a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. + The event occurs just before a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. If a form has any child or owned forms, a event is also raised for each one. If any one of the forms cancels the event, none of the forms are closed. Therefore the corresponding events are not sent to any of the forms. - The class provides data for this event. Two important members are the and properties. The event can be canceled by setting the property to true. The property provides a reason why the form is being closed. + The class provides data for this event. Two important members are the and properties. The event can be canceled by setting the property to true. The property provides a reason why the form is being closed. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -93,7 +93,7 @@ and properties, respectively. + The `closeReason` and `cancel` parameters are used to initialize the and properties, respectively. ]]> @@ -141,7 +141,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/FormClosingEventHandler.xml b/xml/System.Windows.Forms/FormClosingEventHandler.xml index 62dc7ebd539..fe9051663d5 100644 --- a/xml/System.Windows.Forms/FormClosingEventHandler.xml +++ b/xml/System.Windows.Forms/FormClosingEventHandler.xml @@ -40,13 +40,13 @@ A that contains the event data. Represents the method that handles a event. - event occurs just before a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. This event can be canceled. - - When you create a 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/). - + event occurs just before a form is closed, either by the user, through the user interface (UI), or programmatically, through calls to methods such as in the class, or in the class. This event can be canceled. + + When you create a 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/). + ]]> diff --git a/xml/System.Windows.Forms/FrameStyle.xml b/xml/System.Windows.Forms/FrameStyle.xml index b2c68b188df..4fe76e5ba5c 100644 --- a/xml/System.Windows.Forms/FrameStyle.xml +++ b/xml/System.Windows.Forms/FrameStyle.xml @@ -24,22 +24,22 @@ Specifies the frame style of the selected control. - . - - is used when selecting objects or during drag-and-drop operations. - - - -## Examples - The following code example demonstrates using the enumeration. To run the example, paste the following code in a form called Form1 containing several controls. This example assumes the MouseDown, MouseMove, and MouseUp events are connected to the event-handler methods defined in the example. - + . + + is used when selecting objects or during drag-and-drop operations. + + + +## Examples + The following code example demonstrates using the enumeration. To run the example, paste the following code in a form called Form1 containing several controls. This example assumes the MouseDown, MouseMove, and MouseUp events are connected to the event-handler methods defined in the example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RectangleToScreen/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseButtons/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/MouseButtons/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/MouseButtons/form1.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml b/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml index ad65d5a80df..1f7ca05acd6 100644 --- a/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml +++ b/xml/System.Windows.Forms/GiveFeedbackEventArgs.xml @@ -35,30 +35,30 @@ Provides data for the event, which occurs during a drag operation. - event occurs during a drag operation. It allows the source of a drag event to modify the appearance of the mouse pointer in order to give the user visual feedback during a drag-and-drop operation. A object specifies the type of drag-and-drop operation and whether default cursors are used. - - For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the class. See the method for the complete code example. - + event occurs during a drag operation. It allows the source of a drag event to modify the appearance of the mouse pointer in order to give the user visual feedback during a drag-and-drop operation. A object specifies the type of drag-and-drop operation and whether default cursors are used. + + For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the class. See the method for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: + ]]> @@ -225,23 +225,23 @@ Gets the drag-and-drop operation feedback that is displayed. One of the values. - controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the class. See the method for the complete code example. - + controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the class. See the method for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: + ]]> @@ -285,28 +285,28 @@ if the default pointers are used; otherwise, . - is set to `false`, it is the responsibility of the event source to set the appropriate cursor. - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the class. See the method for the complete code example. - + is set to `false`, it is the responsibility of the event source to set the appropriate cursor. + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the class. See the method for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: + ]]>
diff --git a/xml/System.Windows.Forms/GiveFeedbackEventHandler.xml b/xml/System.Windows.Forms/GiveFeedbackEventHandler.xml index ea98a284efc..ba1acc87d95 100644 --- a/xml/System.Windows.Forms/GiveFeedbackEventHandler.xml +++ b/xml/System.Windows.Forms/GiveFeedbackEventHandler.xml @@ -41,28 +41,28 @@ A that contains the event data. Represents the method that handles the event of a . - 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the delegate with the event. See the method for the complete code example. - + 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the delegate with the event. See the method for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Windows.Forms/GridColumnStylesCollection.xml b/xml/System.Windows.Forms/GridColumnStylesCollection.xml index 765e8ea0258..6b044374d83 100644 --- a/xml/System.Windows.Forms/GridColumnStylesCollection.xml +++ b/xml/System.Windows.Forms/GridColumnStylesCollection.xml @@ -65,12 +65,12 @@ ## Remarks On the , you access the through the property. - The uses standard and methods to manipulate the collection. + The uses standard and methods to manipulate the collection. - Use the method to determine if a specific property value exists in the collection. Additionally, use the method to determine the index of any object within the collection. + Use the method to determine if a specific property value exists in the collection. Additionally, use the method to determine the index of any object within the collection. > [!CAUTION] -> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . +> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . @@ -162,7 +162,7 @@ objects, and uses the method to add the array to the . + The following code example creates an array of objects, and uses the method to add the array to the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic GridColumnStylesCollection.AddRange Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/GridColumnStylesCollection/AddRange/source.cs" id="Snippet1"::: @@ -290,12 +290,12 @@ ## Remarks The caption of a is set with the property. - Use the method to determine if a particular exists before invoking the method to remove the item. If you need to know the index of a particular , use the method. + Use the method to determine if a particular exists before invoking the method to remove the item. If you need to know the index of a particular , use the method. ## Examples - The following code example uses the method to determine if a with a given exists in the . + The following code example uses the method to determine if a with a given exists in the . :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/GridColumnStylesCollection/Contains/source2.vb" id="Snippet1"::: @@ -338,12 +338,12 @@ method to determine if a particular exists before invoking the method to remove the item. If you need to know the index of a particular , use the method. + Use the method to determine if a particular exists before invoking the method to remove the item. If you need to know the index of a particular , use the method. ## Examples - The following code example uses the method to determine if a contains a specific . + The following code example uses the method to determine if a contains a specific . :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/GridColumnStylesCollection/Contains/source1.vb" id="Snippet1"::: @@ -393,14 +393,14 @@ , use the method of the class. Pass the of the to the property of the to return the for a specific column. + To get a , use the method of the class. Pass the of the to the property of the to return the for a specific column. - Use the method to determine if a particular exists before invoking the method to remove the item. If you need to know the index of a particular , use the method. + Use the method to determine if a particular exists before invoking the method to remove the item. If you need to know the index of a particular , use the method. ## Examples - The following code example uses the method to determine if a contains a associated with a specified . + The following code example uses the method to determine if a contains a associated with a specified . :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/GridColumnStylesCollection/Contains/source.vb" id="Snippet1"::: @@ -442,12 +442,12 @@ method to determine if a specific exists. If so, and you need the index of the element within the collection, use the method. + Use the method to determine if a specific exists. If so, and you need the index of the element within the collection, use the method. ## Examples - The following code example uses the method to determine if a given exists in a . If so, the method returns the index of the , and the method is invoked with the index to remove the element from the collection. + The following code example uses the method to determine if a given exists in a . If so, the method returns the index of the , and the method is invoked with the index to remove the element from the collection. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/GridColumnStylesCollection/IndexOf/source.vb" id="Snippet1"::: @@ -498,7 +498,7 @@ method to determine the index of any element in the collection. + Use the method to determine the index of any element in the collection. @@ -541,7 +541,7 @@ can be set explicitly by setting the property. By default, the is set using uses property value. + The column header of a can be set explicitly by setting the property. By default, the is set using uses property value. The comparison between column headers and the value to look for is not case-sensitive. @@ -593,12 +593,12 @@ ## Remarks Each is created using a . The can be returned using the property. - To get the for a specific data source, use the method of the class. Pass the to the property of the to return a for a specific column. + To get the for a specific data source, use the method of the class. Pass the to the property of the to return a for a specific column. ## Examples - The following code example gets a from a in a , and then passes it as an argument to the method. + The following code example gets a from a in a , and then passes it as an argument to the method. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/GridColumnStylesCollection/Item/source2.vb" id="Snippet1"::: @@ -710,7 +710,7 @@ method to determine whether the exists in the collection. + Use the method to determine whether the exists in the collection. @@ -758,14 +758,14 @@ method to determine whether the exists in the collection. + Use the method to determine whether the exists in the collection. - Use the method to determine the index of any element in the collection. + Use the method to determine the index of any element in the collection. ## Examples - The following code example uses the method to determine if a given exists in a . If so, the method returns the index of the , and the method is invoked with the index to remove the element from the collection. + The following code example uses the method to determine if a given exists in a . If so, the method returns the index of the , and the method is invoked with the index to remove the element from the collection. :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/GridColumnStylesCollection/IndexOf/source.vb" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/GridItem.xml b/xml/System.Windows.Forms/GridItem.xml index 5744d0f2006..8d27e716700 100644 --- a/xml/System.Windows.Forms/GridItem.xml +++ b/xml/System.Windows.Forms/GridItem.xml @@ -211,7 +211,7 @@ of type , you must also ensure that the has a valid value. For a of type the property must be `null`. + For a of type , you must also ensure that the has a valid value. For a of type the property must be `null`. ]]> @@ -250,7 +250,7 @@ . You can get the name for a of type by retrieving the and checking its property. + This class gets the text that displays in the left column of the grid. The text retrieved can be different from the actual property name of the property represented by this . You can get the name for a of type by retrieving the and checking its property. ]]> @@ -289,7 +289,7 @@ for the is , this value will be `null`. + If the for the is , this value will be `null`. ]]> diff --git a/xml/System.Windows.Forms/GridTableStylesCollection.xml b/xml/System.Windows.Forms/GridTableStylesCollection.xml index 8a109af9ef0..673736299e2 100644 --- a/xml/System.Windows.Forms/GridTableStylesCollection.xml +++ b/xml/System.Windows.Forms/GridTableStylesCollection.xml @@ -55,10 +55,10 @@ On the control, the property returns the . - By default, the does not contain any objects. Instead, the displays each table using default settings for color, width, and formatting. All columns of each table are displayed. When a is added to the collection, the uses the to determine which object supplies the data for the grid. For example, if the data source is a that contains three objects, the must match the of one of the objects. If the does not match any of the values, the default settings will be used to display data for each table, and the settings will be ignored. + By default, the does not contain any objects. Instead, the displays each table using default settings for color, width, and formatting. All columns of each table are displayed. When a is added to the collection, the uses the to determine which object supplies the data for the grid. For example, if the data source is a that contains three objects, the must match the of one of the objects. If the does not match any of the values, the default settings will be used to display data for each table, and the settings will be ignored. > [!CAUTION] -> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . Alternatively, clear the using the method. +> Always create objects and add them to the before adding objects to the . When you add an empty with a valid value to the collection, objects are automatically generated for you. Consequently, an exception will be thrown if you try to add new objects with duplicate values to the . Alternatively, clear the using the method. @@ -105,7 +105,7 @@ objects. The example then creates several objects and adds them to the . Finally, the objects are added to the using the method. + The following code example creates two objects. The example then creates several objects and adds them to the . Finally, the objects are added to the using the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/GridTableStylesCollectionExamples/CPP/gridtablestylescollectionexamples.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/MappingName/gridtablestylescollectionexamples.cs" id="Snippet4"::: @@ -270,7 +270,7 @@ method to determine if a with the specified exists in the collection. + The following code example uses the method to determine if a with the specified exists in the collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/GridTableStylesCollectionExamples/CPP/gridtablestylescollectionexamples.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/MappingName/gridtablestylescollectionexamples.cs" id="Snippet6"::: @@ -349,7 +349,7 @@ or method to add items to the collection. + Use the or method to add items to the collection. @@ -395,14 +395,14 @@ by , the property uses a case-insensitive comparison. + When retrieving a by , the property uses a case-insensitive comparison. - Use the or method to add items to the collection. + Use the or method to add items to the collection. ## Examples - The following code example returns a from the by passing the to the property. + The following code example returns a from the by passing the to the property. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/GridTableStylesCollectionExamples/CPP/gridtablestylescollectionexamples.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DataGridColumnStyle/MappingName/gridtablestylescollectionexamples.cs" id="Snippet3"::: @@ -505,7 +505,7 @@ method to determine if a specific exists before using the method. + Use the method to determine if a specific exists before using the method. ]]> @@ -544,7 +544,7 @@ method to determine if a specific exists before using the method. + Use the method to determine if a specific exists before using the method. ]]> @@ -914,7 +914,7 @@ This member is an explicit interface member implementation. It can be used only method to add a to the collection. + You cannot insert an item into the middle of the collection. Use the method to add a to the collection. ]]> diff --git a/xml/System.Windows.Forms/GroupBox.xml b/xml/System.Windows.Forms/GroupBox.xml index 49d1e3dd888..03b693a6dc9 100644 --- a/xml/System.Windows.Forms/GroupBox.xml +++ b/xml/System.Windows.Forms/GroupBox.xml @@ -66,10 +66,10 @@ The typical use for a group box is to contain a logical group of controls. If you have two group boxes, each of which contain several option buttons (also known as radio buttons), each group of buttons is mutually exclusive, setting one option value per group. - You can add controls to the by using the method of the property. + You can add controls to the by using the method of the property. > [!NOTE] -> Only controls that are contained within the control can be selected or receive focus. The complete itself cannot be selected or receive focus. For more information about how this control responds to the and methods, see the following members: , , , , , . +> Only controls that are contained within the control can be selected or receive focus. The complete itself cannot be selected or receive focus. For more information about how this control responds to the and methods, see the following members: , , , , , . The cannot display a scroll bar. If you need a control similar to a that can contain a scroll bar, see the control. @@ -259,7 +259,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `GroupBox1`. Then ensure that the event handler is associated with the event. @@ -384,12 +384,12 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. ## Examples - See the method for an example of how to use the method. + See the method for an example of how to use the method. ]]> @@ -610,7 +610,7 @@ with a value of does not receive mouse events. + A with a value of does not receive mouse events. @@ -1394,7 +1394,7 @@ ## Remarks The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, it's recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. -You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. +You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. ]]> diff --git a/xml/System.Windows.Forms/GroupBoxRenderer.xml b/xml/System.Windows.Forms/GroupBoxRenderer.xml index 92bab465ff0..4f9cdbab6e8 100644 --- a/xml/System.Windows.Forms/GroupBoxRenderer.xml +++ b/xml/System.Windows.Forms/GroupBoxRenderer.xml @@ -37,16 +37,16 @@ class provides a set of `static` methods that can be used to render a group box control. Rendering a control refers to drawing the user interface of a control. To draw a group box, use one of the methods. These methods provide a variety of text drawing options. + The class provides a set of `static` methods that can be used to render a group box control. Rendering a control refers to drawing the user interface of a control. To draw a group box, use one of the methods. These methods provide a variety of text drawing options. - If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the group box with the current visual style. Otherwise, will draw the group box with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. + If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the group box with the current visual style. Otherwise, will draw the group box with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. This class wraps the functionality of a that is set to one of the elements exposed by the class. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). ## Examples - The following code example demonstrates how to create a custom control that uses the method to draw a group box with a double border if visual styles are enabled. + The following code example demonstrates how to create a custom control that uses the method to draw a group box with a double border if visual styles are enabled. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GroupBoxRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/GroupBoxRenderer/Overview/form1.cs" id="Snippet0"::: @@ -111,7 +111,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a group box with a double border. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a group box with a double border. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GroupBoxRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/GroupBoxRenderer/Overview/form1.cs" id="Snippet2"::: @@ -181,7 +181,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a group box with a double border. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a group box with a double border. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.GroupBoxRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/GroupBoxRenderer/Overview/form1.cs" id="Snippet2"::: @@ -481,7 +481,7 @@ is `true`, the uses the setting from to determine the rendering style. If is `false`, the renderer will always render using visual styles. + If is `true`, the uses the setting from to determine the rendering style. If is `false`, the renderer will always render using visual styles. diff --git a/xml/System.Windows.Forms/HScrollBar.xml b/xml/System.Windows.Forms/HScrollBar.xml index ec8ad13f27d..93bdb19b87f 100644 --- a/xml/System.Windows.Forms/HScrollBar.xml +++ b/xml/System.Windows.Forms/HScrollBar.xml @@ -44,7 +44,7 @@ ## Remarks Most controls that need scroll bars already provide them and do not require this control. This is true of a multiline control, a , and a , for example. - You can use this control to implement scrolling in containers that do not provide their own scroll bars such as a or for user input of numeric data. The numeric data can be displayed in a control or used in code. The and properties determine the range of values the user can select. The property determines the effect of clicking within the scroll bar but outside the scroll box. The property determines the effect of clicking the scroll arrows at each end of the control. + You can use this control to implement scrolling in containers that do not provide their own scroll bars such as a or for user input of numeric data. The numeric data can be displayed in a control or used in code. The and properties determine the range of values the user can select. The property determines the effect of clicking within the scroll bar but outside the scroll box. The property determines the effect of clicking the scroll arrows at each end of the control. diff --git a/xml/System.Windows.Forms/Help.xml b/xml/System.Windows.Forms/Help.xml index ad09f61985b..1e1027907ef 100644 --- a/xml/System.Windows.Forms/Help.xml +++ b/xml/System.Windows.Forms/Help.xml @@ -34,28 +34,28 @@ Encapsulates the HTML Help 1.0 engine. - class. To provide Help for an application, call the static and methods. - - You can use to show compiled Help files (.chm) or HTML files in the HTML Help format. Compiled Help files provide a table of contents, an index, search capability, and keyword links in pages. Shortcuts work only in compiled Help files. - - You can generate HTML Help 1.x files by using HTML Help Workshop. For more information about HTML Help, see "HTML Help Workshop" and other HTML Help topics at [Microsoft HTML Help](https://go.microsoft.com/fwlink/?LinkId=178661). - - - -## Examples - The following code example displays a form that contains three buttons that can be used to interact with the Mspaint.chm Help file. The **Show Help Index** button displays the **Index** tab for the Help file. The **Show Help** button displays content in the Help file based on the value that is selected in the **Help Navigator** list. The **Show Keyword** button displays content in the Help file based on the keyword that is specified in the **Keyword** text box. - - For example, to show the Ovals Help page by the index value, select the value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. - - The example uses the method to display the different Help tabs and Help topics, and the method to display the Help index. - + class. To provide Help for an application, call the static and methods. + + You can use to show compiled Help files (.chm) or HTML files in the HTML Help format. Compiled Help files provide a table of contents, an index, search capability, and keyword links in pages. Shortcuts work only in compiled Help files. + + You can generate HTML Help 1.x files by using HTML Help Workshop. For more information about HTML Help, see "HTML Help Workshop" and other HTML Help topics at [Microsoft HTML Help](https://go.microsoft.com/fwlink/?LinkId=178661). + + + +## Examples + The following code example displays a form that contains three buttons that can be used to interact with the Mspaint.chm Help file. The **Show Help Index** button displays the **Index** tab for the Help file. The **Show Help** button displays content in the Help file based on the value that is selected in the **Help Navigator** list. The **Show Keyword** button displays content in the Help file based on the keyword that is specified in the **Keyword** text box. + + For example, to show the Ovals Help page by the index value, select the value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. + + The example uses the method to display the different Help tabs and Help topics, and the method to display the Help index. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Help/CPP/helpsnippet.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Help/Overview/helpsnippet.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet1"::: + ]]> @@ -111,19 +111,19 @@ The path and name of the Help file. Displays the contents of the Help file at the specified URL. - method. To run this example, paste the following code into a form that contains a button named `Button1`. - + method. To run this example, paste the following code into a form that contains a button named `Button1`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Help/ShowHelp/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/ShowHelp/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/ShowHelp/form1.vb" id="Snippet1"::: + ]]> @@ -165,25 +165,25 @@ The `url` argument can be of the form *C:\path\sample.chm* or */folder/file.htm* The keyword to display Help for. Displays the contents of the Help file found at the specified URL for a specific keyword. - value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. - - This example shows only the call to the method. See the class overview for the complete code example. - +If `keyword` is `null`, the table of contents for the Help file will be displayed. + +## Examples + The following code example displays a form with three buttons that can be used to interact with the mspaint.chm Help file. The **Show Help Index** button displays the **Index** tab for the Help file. The **Show Help** button displays content in the Help file based on the value that is selected in the **Help Navigator** list. The **Show Keyword** button displays content in the Help file based on the keyword that is specified in the **Keyword** text box. + + For example, to show the Ovals Help page by the index value, select the value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. + + This example shows only the call to the method. See the class overview for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Help/CPP/helpsnippet.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Help/Overview/helpsnippet.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet4"::: + ]]> @@ -231,21 +231,21 @@ If `keyword` is `null`, the table of contents for the Help file will be displaye One of the values. Displays the contents of the Help file found at the specified URL for a specific topic. - , , , or . + +## Examples + The following code example demonstrates how to use the method to open a Help file to its index page. To run this example, paste the following code into a form that contains a button named `Button2`. -Compiled Help files provide table of contents, index, search, and keyword links in pages. You can use the following values for the `navigator` argument: , , , or . - -## Examples - The following code example demonstrates how to use the method to open a Help file to its index page. To run this example, paste the following code into a form that contains a button named `Button2`. - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Help/ShowHelp/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/ShowHelp/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/ShowHelp/form1.vb" id="Snippet2"::: + ]]> @@ -296,25 +296,25 @@ Compiled Help files provide table of contents, index, search, and keyword links A string that contains the topic identifier. Displays the contents of the Help file located at the URL supplied by the user. - , , , or command. If the value specified in the `command` argument is , , or , this value should be an empty string ("", or ). If the `command` argument references , , , or , this value should be a string that contains the topic name, or the keyword or numeric identifier of the topic to display. - -## Examples - The following code example displays a form with three buttons that can be used to interact with the mspaint.chm Help file. The **Show Help Index** button displays the **Index** tab for the Help file. The **Show Help** button displays content in the Help file based on the value that is selected in the **Help Navigator** list. The **Show Keyword** button displays content in the Help file based on the keyword that is specified in the **Keyword** text box. - - For example, to show the Ovals Help page by the index value, select the value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. - - This example shows only the call to the method. See the class overview for the complete code example. - + , , , or command. If the value specified in the `command` argument is , , or , this value should be an empty string ("", or ). If the `command` argument references , , , or , this value should be a string that contains the topic name, or the keyword or numeric identifier of the topic to display. + +## Examples + The following code example displays a form with three buttons that can be used to interact with the mspaint.chm Help file. The **Show Help Index** button displays the **Index** tab for the Help file. The **Show Help** button displays content in the Help file based on the value that is selected in the **Help Navigator** list. The **Show Keyword** button displays content in the Help file based on the keyword that is specified in the **Keyword** text box. + + For example, to show the Ovals Help page by the index value, select the value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. + + This example shows only the call to the method. See the class overview for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Help/CPP/helpsnippet.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Help/Overview/helpsnippet.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet3"::: + ]]> @@ -362,24 +362,24 @@ Compiled Help files provide table-of-contents, index, search, and keyword links The path and name of the Help file. Displays the index of the specified Help file. - value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. - - This example shows only the call to the method. See the class overview for the complete code example. - + value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. + + This example shows only the call to the method. See the class overview for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Help/CPP/helpsnippet.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Help/Overview/helpsnippet.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet2"::: + ]]> @@ -428,15 +428,15 @@ Compiled Help files provide table-of-contents, index, search, and keyword links A value that specifies the horizontal and vertical coordinates at which to display the pop-up window, relative to the upper-left corner of the screen. Displays a Help pop-up window. - event with the class to display pop-up style help to the user. - + event with the class to display pop-up style help to the user. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.KeyUp/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/Bottom/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/Bottom/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/Bottom/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/HelpEventArgs.xml b/xml/System.Windows.Forms/HelpEventArgs.xml index 117c05ac6fb..c10631fb519 100644 --- a/xml/System.Windows.Forms/HelpEventArgs.xml +++ b/xml/System.Windows.Forms/HelpEventArgs.xml @@ -189,7 +189,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/HelpNavigator.xml b/xml/System.Windows.Forms/HelpNavigator.xml index 7e1dc7c86aa..6ccbd8e0bac 100644 --- a/xml/System.Windows.Forms/HelpNavigator.xml +++ b/xml/System.Windows.Forms/HelpNavigator.xml @@ -24,24 +24,24 @@ Specifies constants indicating which elements of the Help file to display. - and classes to provide access to specific elements of a Help file. For example, when used with the component that provides F1 Help, the TopicId or Topic value could be specified to open Help to a context-specific topic. - - - -## Examples - The following code example displays a form with three buttons that can be used to interact with the mspaint.chm Help file. The **Show Help Index** button displays the **Index** tab for the Help file. The **Show Help** button displays content in the Help file based on the value selected in the **Help Navigator** list. The **Show Keyword** button displays content in the Help file based on the keyword specified in the **Keyword** text box. - - For example, to show the Ovals Help page by the index value, select the KeywordIndex value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. - - The example uses the method to display the different Help tabs and Help topics, and the method to display the Help index. - + and classes to provide access to specific elements of a Help file. For example, when used with the component that provides F1 Help, the TopicId or Topic value could be specified to open Help to a context-specific topic. + + + +## Examples + The following code example displays a form with three buttons that can be used to interact with the mspaint.chm Help file. The **Show Help Index** button displays the **Index** tab for the Help file. The **Show Help** button displays content in the Help file based on the value selected in the **Help Navigator** list. The **Show Keyword** button displays content in the Help file based on the keyword specified in the **Keyword** text box. + + For example, to show the Ovals Help page by the index value, select the KeywordIndex value in the **Help Navigator** drop-down list, type **ovals** in the **Parameter** text box, and then click the **Show Help** button. To show the "To paint with a brush" Help topic by the keyword, type **mspaint.chm::/paint_brush.htm** in the **Keyword** text box, and then click the **Show Keyword** button. + + The example uses the method to display the different Help tabs and Help topics, and the method to display the Help index. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Help/CPP/helpsnippet.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Help/Overview/helpsnippet.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Help/Overview/helpsnippet.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/HelpProvider.xml b/xml/System.Windows.Forms/HelpProvider.xml index da999abc2b3..2ff64c9db8a 100644 --- a/xml/System.Windows.Forms/HelpProvider.xml +++ b/xml/System.Windows.Forms/HelpProvider.xml @@ -58,18 +58,18 @@ maintains a collection of references to controls associated with it. To associate a Help file with the , set the property. You specify the type of Help provided by calling the method and providing a value for the specified control. You provide the keyword or topic for the Help by calling the method. To open Help to a specific topic, the keyword should be passed in the form *topicName*.htm. + Each instance of maintains a collection of references to controls associated with it. To associate a Help file with the , set the property. You specify the type of Help provided by calling the method and providing a value for the specified control. You provide the keyword or topic for the Help by calling the method. To open Help to a specific topic, the keyword should be passed in the form *topicName*.htm. - To associate a specific Help string with a control, use the method. The string that you associate with a control using this method is displayed in a pop-up window when the user presses the F1 key while the control has focus. + To associate a specific Help string with a control, use the method. The string that you associate with a control using this method is displayed in a pop-up window when the user presses the F1 key while the control has focus. - If the property has not been set, you must use the method to provide the Help text. If you have set both and the Help string, Help based on the will take precedence. + If the property has not been set, you must use the method to provide the Help text. If you have set both and the Help string, Help based on the will take precedence. calls methods on the class to provide Help functionality. ## Examples - The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to mspaint.chm. The method is called for each address control to identify that it has Help content available. + The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to mspaint.chm. The method is called for each address control to identify that it has Help content available. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProvider/CPP/helpprovider.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/Overview/helpprovider.cs" id="Snippet1"::: @@ -107,12 +107,12 @@ class, use the property, method, and method to associate your Help topics with a control. + Once you have created an instance of the class, use the property, method, and method to associate your Help topics with a control. ## Examples - The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. + The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProvider/CPP/helpprovider.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/Overview/helpprovider.cs" id="Snippet1"::: @@ -313,7 +313,7 @@ ## Examples - The following code example shows how to use the and classes to filter input. It also demonstrates the method. This is a complete example; it is ready to run once you add it to your project. + The following code example shows how to use the and classes to filter input. It also demonstrates the method. This is a complete example; it is ready to run once you add it to your project. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.KeyEventsHelpAndErrors/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/GetHelpString/form1.cs" id="Snippet1"::: @@ -370,7 +370,7 @@ or method to associate a keyword or prompt with a specified control, calling this method automatically returns `true`. You can override this behavior by passing `false` to the method. + When you use the or method to associate a keyword or prompt with a specified control, calling this method automatically returns `true`. You can override this behavior by passing `false` to the method. ]]> @@ -452,7 +452,7 @@ ## Examples - The following example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the to set the Help ToolTip text. When using the context-sensitive Help button and clicking the Help cursor on an address field, the Help ToolTip appears with the specified text. When pressing the F1 key with the focus in an address field, the `mspaint.chm` Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. + The following example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the to set the Help ToolTip text. When using the context-sensitive Help button and clicking the Help cursor on an address field, the Help ToolTip appears with the specified text. When pressing the F1 key with the focus in an address field, the `mspaint.chm` Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProvider/CPP/helpprovider.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/Overview/helpprovider.cs" id="Snippet1"::: @@ -546,7 +546,7 @@ property. To open Help to a specific topic, the keyword should be passed in the form *topicName*.htm. To clear the keyword, call the method with a `keyword` value of `null`. + The Help keyword provides the key information to retrieve the Help associated with this control from the Help file specified by the property. To open Help to a specific topic, the keyword should be passed in the form *topicName*.htm. To clear the keyword, call the method with a `keyword` value of `null`. ]]> @@ -593,7 +593,7 @@ method. + The following code example demonstrates the use of the method. To run this example, place it in a form containing a named `HelpProvider1` and a named `TextBox1`. The example requires the existence of a Help file named input.chm in the C:\Windows directory. @@ -660,7 +660,7 @@ ## Examples - The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. + The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProvider/CPP/helpprovider.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/Overview/helpprovider.cs" id="Snippet1"::: @@ -712,12 +712,12 @@ or for the control specified in the `ctl` parameter, the automatically displays Help for that control. To modify this behavior, call the method, specifying `false` in the `value` parameter. + If you previously called the or for the control specified in the `ctl` parameter, the automatically displays Help for that control. To modify this behavior, call the method, specifying `false` in the `value` parameter. ## Examples - The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. + The following code example demonstrates using the class to display context-sensitive Help on a form containing four address fields. The example uses the method to set the Help ToolTip text. When you use the context-sensitive Help button and click the Help cursor on an address field, the Help ToolTip appears with the specified text. When you press the F1 key with the focus in an address field, the mspaint.chm Help file is displayed because the property has been set to `mspaint.chm`. The method is called for each address control to identify that it has Help content available. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProvider/CPP/helpprovider.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/Overview/helpprovider.cs" id="Snippet1"::: @@ -824,7 +824,7 @@ method returns a string that includes the type and the property of the . + The method returns a string that includes the type and the property of the . ]]> diff --git a/xml/System.Windows.Forms/HtmlDocument.xml b/xml/System.Windows.Forms/HtmlDocument.xml index 22be90f71c9..631fe5516f1 100644 --- a/xml/System.Windows.Forms/HtmlDocument.xml +++ b/xml/System.Windows.Forms/HtmlDocument.xml @@ -51,17 +51,17 @@ In this example, represents the entire document inside the `HTML` tags. The `BODY`, `DIV`, `FORM` and `SPAN` tags are represented by individual objects. - There are several ways you can access the elements in this tree. Use the property to access the `BODY` tag and all of its children. The property gives you the for the element on an HTML page that has user input focus. All elements within an HTML page can have a name; the collection provides access to each using its name as an index. will return an of all objects with a given HTML tag name, such as `DIV` or `TABLE`. will return the single corresponding to the unique ID that you supply. will return the that can be found on the screen at the supplied mouse pointer coordinates. + There are several ways you can access the elements in this tree. Use the property to access the `BODY` tag and all of its children. The property gives you the for the element on an HTML page that has user input focus. All elements within an HTML page can have a name; the collection provides access to each using its name as an index. will return an of all objects with a given HTML tag name, such as `DIV` or `TABLE`. will return the single corresponding to the unique ID that you supply. will return the that can be found on the screen at the supplied mouse pointer coordinates. - You can also use the and collection to iterate through elements that represent user input forms and graphics, respectively. + You can also use the and collection to iterate through elements that represent user input forms and graphics, respectively. is based on the unmanaged interfaces implemented by Internet Explorer's DHTML DOM: `IHTMLDocument`, `IHTMLDocument2`, `IHTMLDocument3`, and `IHTMLDocument4`. Only the most frequently used properties and methods on these unmanaged interfaces are exposed by . You can access all other properties and methods directly using the property, which you can cast to the desired unmanaged interface pointer. - An HTML document may contain frames, which are different windows inside of the control. Each frame displays its own HTML page. The collection is available through the property. You may also use the property to resize the displayed page, scroll the document, or display alerts and prompts to the user. + An HTML document may contain frames, which are different windows inside of the control. Each frame displays its own HTML page. The collection is available through the property. You may also use the property to resize the displayed page, scroll the document, or display alerts and prompts to the user. - exposes the most common events you would expect to handle when hosting HTML pages. For events not exposed directly by the interface, you can add a handler for the event using . + exposes the most common events you would expect to handle when hosting HTML pages. For events not exposed directly by the interface, you can add a handler for the event using . - HTML files may contain `SCRIPT` tags that encapsulate code written in one of the Active Scripting languages, such as JScript or VBScript. The method provides for execution of properties and methods defined in a `SCRIPT` tag. + HTML files may contain `SCRIPT` tags that encapsulate code written in one of the Active Scripting languages, such as JScript or VBScript. The method provides for execution of properties and methods defined in a `SCRIPT` tag. > [!NOTE] > While most of the properties, methods, and events on have kept the same names as they have on the unmanaged DOM, some have been changed for consistency with the .NET Framework. @@ -69,7 +69,7 @@ ## Examples - The following code example uses data from the Northwind database to create an `HTML TABLE` dynamically using . The method is also used, first to add cells (`TD` elements) to rows (`TR` elements), then to add rows to the table, and finally to append the table to the end of the current document. The code example requires that your application has a control named `WebBrowser1`. The code should be called after a document has been loaded. + The following code example uses data from the Northwind database to create an `HTML TABLE` dynamically using . The method is also used, first to add cells (`TD` elements) to rows (`TR` elements), then to add rows to the table, and finally to append the table to the end of the current document. The code example requires that your application has a control named `WebBrowser1`. The code should be called after a document has been loaded. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet10"::: @@ -117,11 +117,11 @@ returns the element corresponding to the `` tag. + When the document has focus, but no element of the document has been given focus, returns the element corresponding to the `` tag. - If the document does not have focus, returns `null`. + If the document does not have focus, returns `null`. - If the current element with input focus is a cell (`TD`) in an HTML `TABLE` tag, will return the element that contains the `TABLE` element. + If the current element with input focus is a cell (`TD`) in an HTML `TABLE` tag, will return the element that contains the `TABLE` element. ]]> @@ -197,11 +197,11 @@ collection provides random access to any element in the HTML document, regardless of its position in the document tree. Use it to access any element in an HTML document by name, ID, or index. You may also iterate over all of the elements within a document. + The collection provides random access to any element in the HTML document, regardless of its position in the document tree. Use it to access any element in an HTML document by name, ID, or index. You may also iterate over all of the elements within a document. Some elements, such as `HEAD` and `TITLE`, will never have names associated with them. All other elements will have names only if the author of the HTML file assigned them. You can access elements without names by ID or index. - You cannot add elements directly to the collection, because all elements in an HTML file outside of the `HTML` tag must have a parent element. Use the method or the property on to add new elements to the tree. + You cannot add elements directly to the collection, because all elements in an HTML file outside of the `HTML` tag must have a parent element. Use the method or the property on to add new elements to the tree. @@ -290,7 +290,7 @@ will display when no other element occupies that area of the screen. + will display when no other element occupies that area of the screen. The type in the .NET Framework supports an `Alpha` value, but the HTML DOM does not. Therefore, `Alpha` will have no effect when assigned to this property. @@ -345,12 +345,12 @@ - `BODY`, which contains all of the elements involved in the on-screen appearance of the document. - There is no equivalent `Head` property on . To obtain the `HEAD` element, use . + There is no equivalent `Head` property on . To obtain the `HEAD` element, use . ## Examples - The following code example creates a new `DIV` element and appends it to the bottom of the document using the method. + The following code example creates a new `DIV` element and appends it to the bottom of the document using the method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet13"::: @@ -401,7 +401,7 @@ ## Examples - The following code example detects a click on the document, finds the element, and uses to align the element with the top of the Web page. + The following code example detects a click on the document, finds the element, and uses to align the element with the top of the Web page. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet7"::: @@ -549,16 +549,16 @@ ## Remarks `elementTag` may be any of the supported HTML tags in Internet Explorer except for `FRAME` and `IFRAME`. - returns an element unattached to the current document tree. To add the element to the document, use either the or methods. + returns an element unattached to the current document tree. To add the element to the document, use either the or methods. - This method will not affect the state of an existing document's source code when you use the control's **View Source** context menu command or the and properties of the control. + This method will not affect the state of an existing document's source code when you use the control's **View Source** context menu command or the and properties of the control. - When you create new elements with , you will not be able to set certain properties, such as `Name`. In cases where you need to set the Name attribute, assign them as HTML to the property of another object in the document. + When you create new elements with , you will not be able to set certain properties, such as `Name`. In cases where you need to set the Name attribute, assign them as HTML to the property of another object in the document. ## Examples - The following code example uses data from the Northwind database to create an HTML table using . The method is also used, first to add cells (`TD` elements) to rows (`TR` elements), then to add rows to the table, and finally to append the table to the end of the current document. The code example requires that your application has a control called `WebBrowser1`. + The following code example uses data from the Northwind database to create an HTML table using . The method is also used, first to add cells (`TD` elements) to rows (`TR` elements), then to add rows to the table, and finally to append the table to the end of the current document. The code example requires that your application has a control called `WebBrowser1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet10"::: @@ -670,9 +670,9 @@ property. In the previous URL example, setting to microsoft.com would allow both pages to communicate with one another. + By default, two Web pages in different frames are prevented from accessing each other's content using script; even `www.microsoft.com` and `learn.microsoft.com` are, in this instance, considered different domains. To enable cross-frame scripting for pages from the same top-level domain, you can assign a new value to the property. In the previous URL example, setting to microsoft.com would allow both pages to communicate with one another. - Strings assigned to the property must be valid top-level domains. In the previous URL example, you can set to microsoft.com, but not to .com, which would enable any page on the Internet to script a page's contents. + Strings assigned to the property must be valid top-level domains. In the previous URL example, you can set to microsoft.com, but not to .com, which would enable any page on the Internet to script a page's contents. You cannot use the property to enable cross-frame scripting for pages accessed using two different protocols. If one frame in your page comes from a Web server (the http:// protocol) and another comes from the file system (the file://) protocol, they will not be able to communicate with one another regardless of the value of the property. @@ -724,7 +724,7 @@ To use the unmanaged interfaces, import the MSHTML library (mshtml.dll) into your application. However, you can also execute unexposed properties and methods using the `IDispatch::Invoke` method. ## Examples - The following code example casts the to an `IHTMLDocument2` pointer and displays the value of the `lastModified` property, which tells when the owner of the document last updated its contents. The code example requires that you have a on your form named `Button6`. + The following code example casts the to an `IHTMLDocument2` pointer and displays the value of the `lastModified` property, which tells when the owner of the document last updated its contents. The code example requires that you have a on your form named `Button6`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet3"::: @@ -838,10 +838,10 @@ exposes a large array of commands for which there are no methods exposed on . Using you can insert new HTML elements, select and format text, and clear any cached authentication credentials. For a full list of commands, see [Command Identifiers](https://go.microsoft.com/fwlink/?LinkId=198814). + exposes a large array of commands for which there are no methods exposed on . Using you can insert new HTML elements, select and format text, and clear any cached authentication credentials. For a full list of commands, see [Command Identifiers](https://go.microsoft.com/fwlink/?LinkId=198814). > [!NOTE] -> Certain commands, such as copy, have return values. In the current implementation of , you cannot obtain a return value from your call. To retrieve return values, use the corresponding unmanaged method on a reference instead. +> Certain commands, such as copy, have return values. In the current implementation of , you cannot obtain a return value from your call. To retrieve return values, use the corresponding unmanaged method on a reference instead. ]]> @@ -885,7 +885,7 @@ will set focus on the control, if the control currently does not have focus. If the document is hosted inside of a `FRAME`, this method will put focus on that `FRAME` within the `FRAMESET`. + Calling will set focus on the control, if the control currently does not have focus. If the document is hosted inside of a `FRAME`, this method will put focus on that `FRAME` within the `FRAMESET`. ]]> @@ -1050,9 +1050,9 @@ ## Remarks An HTML document may have one or more `FORM` elements with input fields for submitting data back to a server. - You can programmatically submit a `FORM` by obtaining its and calling its `Submit` method using the method. + You can programmatically submit a `FORM` by obtaining its and calling its `Submit` method using the method. - To add a new `FORM` to a document, you can either create a new `FORM` tag as a string, and assign it to the property of an element previously added to the HTML DOM; or you can use the method, set its properties using , and add it as a child of an existing element using . + To add a new `FORM` to a document, you can either create a new `FORM` tag as a string, and assign it to the property of an element previously added to the HTML DOM; or you can use the method, set its properties using , and add it as a child of an existing element using . @@ -1103,7 +1103,7 @@ will return the first one it finds. + If there are multiple elements in the document with the same ID value, will return the first one it finds. @@ -1153,12 +1153,12 @@ uses client coordinates, in which the upper-left corner of the document is assigned the value (0,0). Client coordinates for the current position of the cursor can be obtained using the property. + uses client coordinates, in which the upper-left corner of the document is assigned the value (0,0). Client coordinates for the current position of the cursor can be obtained using the property. ## Examples - The following code example detects a click on the document, finds the element, and uses to align the element with the top of the Web page. + The following code example detects a click on the document, finds the element, and uses to align the element with the top of the Web page. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet7"::: @@ -1272,9 +1272,9 @@ returns a collection of objects. To access attributes, such as `ALT` and `SRC`, that are not directly exposed by , use the method. + returns a collection of objects. To access attributes, such as `ALT` and `SRC`, that are not directly exposed by , use the method. - To add a new image to a document, either create a new `IMG` tag as a string, and assign it to the property of an element previously added to the HTML DOM; or use the method, set its properties using , and add it as a child of an existing element using . + To add a new image to a document, either create a new `IMG` tag as a string, and assign it to the property of an element previously added to the HTML DOM; or use the method, set its properties using , and add it as a child of an existing element using . @@ -1364,11 +1364,11 @@ window.alert("Name is " + name + "; address is " + address); will vary. If the called Active Scripting function returns scalar data, such as a string or an integer, it will be returned as a string. If it returns a script-based object, such as an object created using JScript or VBScript's `new` operator, it will be of type `Object`. (You can make calls on such objects by calling and using .) If it returns an HTML DOM element, such as a `DIV` or a `TABLE`, it will be of type `Object`; if you have added a project reference to MSHTML.DLL, however, it will be cast to its specific unmanaged DOM type. + The underlying type of the object returned by will vary. If the called Active Scripting function returns scalar data, such as a string or an integer, it will be returned as a string. If it returns a script-based object, such as an object created using JScript or VBScript's `new` operator, it will be of type `Object`. (You can make calls on such objects by calling and using .) If it returns an HTML DOM element, such as a `DIV` or a `TABLE`, it will be of type `Object`; if you have added a project reference to MSHTML.DLL, however, it will be cast to its specific unmanaged DOM type. You may call any function written in any Active Scripting language installed on the user's computer, including JScript and VBScript. - The will do nothing if the user has explicitly turned off script execution in Internet Explorer, or if the current security configuration for the Web page does not allow it. + The will do nothing if the user has explicitly turned off script execution in Internet Explorer, or if the current security configuration for the Web page does not allow it. ## Examples The following code example executes the contents of a script in a Web page. The code example requires that you have a in your application called `WebBrowser1`, and that you have loaded the following Web page. @@ -1459,7 +1459,7 @@ window.alert("Name is " + name + "; address is " + address); will vary. If the called Active Scripting function returns scalar data, such as a string or an integer, it will be returned as a string. If it returns a script-based object, such as an object created using JScript or VBScript's `new` operator, it will be of type `Object`. (You can make calls on such objects by calling and using .) If it returns an HTML DOM element, such as a `DIV` or a `TABLE`, it will be of type `Object`; if you have added a project reference to MSHTML.DLL, however, it will be cast to its specific unmanaged DOM type. + The underlying type of the object returned by will vary. If the called Active Scripting function returns scalar data, such as a string or an integer, it will be returned as a string. If it returns a script-based object, such as an object created using JScript or VBScript's `new` operator, it will be of type `Object`. (You can make calls on such objects by calling and using .) If it returns an HTML DOM element, such as a `DIV` or a `TABLE`, it will be of type `Object`; if you have added a project reference to MSHTML.DLL, however, it will be cast to its specific unmanaged DOM type. You may call any function written in any Active Scripting language installed on the user's machine, including JScript and VBScript. @@ -1561,7 +1561,7 @@ window.alert("Name is " + name + "; address is " + address); ## Remarks This collection will contain all links created using the `A`, `LINK`, and `AREA` tags in HTML. - The objects contained within this collection encapsulate the unmanaged `IHTMLLinkElement` interface. To access the properties of the underlying interface safely, use the method. + The objects contained within this collection encapsulate the unmanaged `IHTMLLinkElement` interface. To access the properties of the underlying interface safely, use the method. ]]> @@ -1664,7 +1664,7 @@ window.alert("Name is " + name + "; address is " + address); ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. @@ -1717,7 +1717,7 @@ window.alert("Name is " + name + "; address is " + address); ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. @@ -1770,7 +1770,7 @@ window.alert("Name is " + name + "; address is " + address); ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. @@ -1823,7 +1823,7 @@ window.alert("Name is " + name + "; address is " + address); ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. @@ -1876,7 +1876,7 @@ window.alert("Name is " + name + "; address is " + address); ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. @@ -1923,7 +1923,7 @@ window.alert("Name is " + name + "; address is " + address); if the specified instances are equal; otherwise, . - ]]> + ]]> @@ -1999,14 +1999,14 @@ window.alert("Name is " + name + "; address is " + address); will clear the previous loaded document, including any associated state, such as variables. It will not cause navigation events in to be raised. + will clear the previous loaded document, including any associated state, such as variables. It will not cause navigation events in to be raised. - always creates a new document in the current window. To open a document in a new window, use the method on the class. + always creates a new document in the current window. To open a document in a new window, use the method on the class. ## Examples - The following code example prepares the DOM for writing and writes a new document using the method. + The following code example prepares the DOM for writing and writes a new document using the method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet11"::: @@ -2047,9 +2047,9 @@ window.alert("Name is " + name + "; address is " + address); will not have any value unless it has been set explicitly, either in code or in HTML. + will not have any value unless it has been set explicitly, either in code or in HTML. - Unlike the property on Windows Forms controls, on the managed HTML DOM will not affect the direction of Latin text. + Unlike the property on Windows Forms controls, on the managed HTML DOM will not affect the direction of Latin text. ]]> @@ -2092,7 +2092,7 @@ window.alert("Name is " + name + "; address is " + address); method of the control. Navigation failures caused by network outages or malfunctioning Web sites will not cause to occur. + The loading of a Web page will halt if program code calls the method of the control. Navigation failures caused by network outages or malfunctioning Web sites will not cause to occur. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2316,9 +2316,9 @@ window.alert("Name is " + name + "; address is " + address); should be preceded by a call to , which will clear the current document and all of its variables. Your calls to will create a new HTML document in its place. To change only a specific portion of the document, obtain the appropriate and set its property. + All calls to should be preceded by a call to , which will clear the current document and all of its variables. Your calls to will create a new HTML document in its place. To change only a specific portion of the document, obtain the appropriate and set its property. - It is recommended that you write an entire valid HTML document using the method, including `HTML` and `BODY` tags. However, if you write just HTML elements, the Document Object Model (DOM) will supply these elements for you. + It is recommended that you write an entire valid HTML document using the method, including `HTML` and `BODY` tags. However, if you write just HTML elements, the Document Object Model (DOM) will supply these elements for you. diff --git a/xml/System.Windows.Forms/HtmlElement.xml b/xml/System.Windows.Forms/HtmlElement.xml index 7be678cbd46..c36e1d4b846 100644 --- a/xml/System.Windows.Forms/HtmlElement.xml +++ b/xml/System.Windows.Forms/HtmlElement.xml @@ -35,13 +35,13 @@ ## Remarks represents any possible type of element in an HTML document, such as `BODY`, `TABLE`, and `FORM`, among others. The class exposes the most common properties you can expect to find on all elements. - Most elements can have *child elements*: other HTML elements that are placed underneath them. Use the property to test whether a given element has children, and the collection to iterate through them. The property returns the in which the current element is nested. + Most elements can have *child elements*: other HTML elements that are placed underneath them. Use the property to test whether a given element has children, and the collection to iterate through them. The property returns the in which the current element is nested. - You often need access to attributes, properties, and methods on the underlying element that are not directly exposed by , such as the `SRC` attribute on an `IMG` element or the `Submit` method on a `FORM`. The and methods enable you to retrieve and alter any attribute or property on a specific element, while provides access to any methods not exposed in the managed Document Object Model (DOM). If your application has unmanaged code permission, you can also access unexposed properties and methods with the attribute. + You often need access to attributes, properties, and methods on the underlying element that are not directly exposed by , such as the `SRC` attribute on an `IMG` element or the `Submit` method on a `FORM`. The and methods enable you to retrieve and alter any attribute or property on a specific element, while provides access to any methods not exposed in the managed Document Object Model (DOM). If your application has unmanaged code permission, you can also access unexposed properties and methods with the attribute. Use the property to test whether an element is of a specific type. - Any HTML document can be modified at run time. You can create new objects with the method of , and add them to another element using the or methods. You can also create the elements as HTML tags and assign them to an existing element's property. + Any HTML document can be modified at run time. You can create new objects with the method of , and add them to another element using the or methods. You can also create the elements as HTML tags and assign them to an existing element's property. @@ -95,7 +95,7 @@ collection instead. + To access only those elements which have the current element as their direct parent, use the collection instead. Elements in this collection will not necessarily be returned in source order. @@ -145,16 +145,16 @@ to add new elements to an existing document, or to move an element on the page. + The HTML Document Object Model (DOM) enables you to alter the run-time contents of an HTML file in a number of ways. Use to add new elements to an existing document, or to move an element on the page. If an element has already been parented, appending an element to another element will automatically remove that element from its previous parent. - Any additions made to a document at run-time using will not be persisted when you call the method on the control. + Any additions made to a document at run-time using will not be persisted when you call the method on the control. ## Examples - The following code example creates a new hyperlink using the method and adds it to end of a page using `AppendChild` on the `BODY` element. The example requires that your application contains a control named `WebBrowser1`. + The following code example creates a new hyperlink using the method and adds it to end of a page using `AppendChild` on the `BODY` element. The example requires that your application contains a control named `WebBrowser1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElement/Overview/Form1.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElement/Overview/Form1.vb" id="Snippet8"::: @@ -200,7 +200,7 @@ to add an event handler to these unexposed events. + The Managed Document Object Model (DOM) exposes only a select number of events. Most of the unexposed events are only defined for specific types of elements; such as the `submit` event, which is valid only on `FORM` elements. Use to add an event handler to these unexposed events. You should not attach an event to the document or one of its objects until the document has completed loading. The earliest you should call this method is in the event of the control. @@ -242,7 +242,7 @@ or on an arbitrary element. + Some elements, such as `IMG` and `SCRIPT`, cannot have any children. Use this property before you call or on an arbitrary element. @@ -292,13 +292,13 @@ collection provides a simple mechanism for exploring the tree structure of a document. + Many of the elements inside of an HTML file can have other HTML elements underneath them. The collection provides a simple mechanism for exploring the tree structure of a document. - only exposes elements whose direct parent is the current element. If you have an for a `TABLE` element, will give you all of the `TR` (row) elements inside of the `TABLE`. To retrieve the `TD` (cell) elements contained inside of the `TR` elements, you will need to use either the collection on each individual `TR` element, or use the collection on . + only exposes elements whose direct parent is the current element. If you have an for a `TABLE` element, will give you all of the `TR` (row) elements inside of the `TABLE`. To retrieve the `TD` (cell) elements contained inside of the `TR` elements, you will need to use either the collection on each individual `TR` element, or use the collection on . Elements in this collection are not guaranteed to be in source order. - If is `false`, `Children` will always be empty. + If is `false`, `Children` will always be empty. @@ -352,7 +352,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -394,7 +394,7 @@ will return position data only for elements that have been assigned an explicit height and width, or elements that use absolute positioning. A document is absolutely positioned if its position style is set to `absolute`, after which it can be positioned at any coordinate on the HTML page. + will return position data only for elements that have been assigned an explicit height and width, or elements that use absolute positioning. A document is absolutely positioned if its position style is set to `absolute`, after which it can be positioned at any coordinate on the HTML page. @@ -597,7 +597,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -650,7 +650,7 @@ A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to `true`. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -699,7 +699,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -741,7 +741,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -789,7 +789,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -832,7 +832,7 @@ to `false` will prevent the user from using these form fields. For other elements, such as `DIV` or `SPAN`, setting to `false` will cause all text within the element to appear shaded; however, the text will still be selectable. To cancel selection, add an event handler for the unexposed `onselectstart` event using the method. + For `FORM` elements such as text boxes and radio buttons, setting to `false` will prevent the user from using these form fields. For other elements, such as `DIV` or `SPAN`, setting to `false` will cause all text within the element to appear shaded; however, the text will still be selectable. To cancel selection, add an event handler for the unexposed `onselectstart` event using the method. ]]> @@ -905,7 +905,7 @@ in conjunction with to walk the document tree for an HTML document. + Use in conjunction with to walk the document tree for an HTML document. ]]> @@ -944,7 +944,7 @@ ## Remarks Setting the focus on an element both gives that element focus and makes it the active element; for example, the element that has focus will be returned by the property of . - Any key strokes entered by a user after has been called will be sent to that element. + Any key strokes entered by a user after has been called will be sent to that element. ]]> @@ -983,7 +983,7 @@ ## Remarks An element that had focus before the user switched to another application using the taskbar or the ALT+TAB keys will receive the and events again when the user switches back to your application. - You cannot cancel the default behavior of this event. To remove focus from an element, call on a different element from within the event. + You cannot cancel the default behavior of this event. To remove focus from an element, call on a different element from within the event. A event on an element will also occur on that element's parents and on the class itself, unless you set the property of the class to `true`. @@ -1036,14 +1036,14 @@ exposes only those attributes that are common to all elements, leaving out those that only apply to certain types of elements; `SRC` is a predefined attribute for the `IMG` tag, for example, but not for the `DIV` tag. Use and to manipulate attributes not exposed on the managed Document Object Model (DOM). + An attribute in HTML is any valid name/value pair for that element. exposes only those attributes that are common to all elements, leaving out those that only apply to certain types of elements; `SRC` is a predefined attribute for the `IMG` tag, for example, but not for the `DIV` tag. Use and to manipulate attributes not exposed on the managed Document Object Model (DOM). - and are case-insensitive. + and are case-insensitive. ## Examples - The following code example retrieves all of the `META` tags within an HTML document, using to find the `META` tag with the name `Description`. The example requires that your application has a control named `WebBrowser1`. + The following code example retrieves all of the `META` tags within an HTML document, using to find the `META` tag with the name `Description`. The example requires that your application has a control named `WebBrowser1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlDocument/Overview/Form1.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb" id="Snippet6"::: @@ -1148,7 +1148,7 @@ on a different element from within the event. + You can neither cancel this event's default behavior, nor prevent it from bubbling. To remove focus from an element, call on a different element from within the event. @@ -1213,7 +1213,7 @@ must be unique; you cannot have two elements with the same inside of the same document. Use the property to give the same identifier to a group of logically related elements. + must be unique; you cannot have two elements with the same inside of the same document. Use the property to give the same identifier to a group of logically related elements. ]]> @@ -1258,17 +1258,17 @@ and methods. Using is often the fastest way to add new content when you have to set many attributes or styles on your new elements. + There are several ways to add new elements to an existing HTML page, such as the and methods. Using is often the fastest way to add new content when you have to set many attributes or styles on your new elements. - differs from in that will not include the HTML that represents the object you are calling. See for more information about the difference between these two properties. + differs from in that will not include the HTML that represents the object you are calling. See for more information about the difference between these two properties. - Setting destroys any children previously appended to the element. If you retrieve an element from the DOM and then assign new HTML to its parents' property, your reference to that element will be useless, and its behavior when it calls its properties and methods is undefined. + Setting destroys any children previously appended to the element. If you retrieve an element from the DOM and then assign new HTML to its parents' property, your reference to that element will be useless, and its behavior when it calls its properties and methods is undefined. - For some elements, setting is not a valid operation. Some HTML tags have no closing tag, such as the `IMG` tag, and therefore cannot contain nested elements. Some tags, such as the `SCRIPT` tag, can only contain text content; setting will result in an error. For both types of tags, the property will return `false`. However, you also cannot set on `TABLE` and `TR` elements, as assigning malformed HTML to these elements could corrupt the rendering of the document. Use or the `insertRow` and `insertCell` methods on the unmanaged `IHTMLTable` interface to add rows and cells to a `TABLE`. + For some elements, setting is not a valid operation. Some HTML tags have no closing tag, such as the `IMG` tag, and therefore cannot contain nested elements. Some tags, such as the `SCRIPT` tag, can only contain text content; setting will result in an error. For both types of tags, the property will return `false`. However, you also cannot set on `TABLE` and `TR` elements, as assigning malformed HTML to these elements could corrupt the rendering of the document. Use or the `insertRow` and `insertCell` methods on the unmanaged `IHTMLTable` interface to add rows and cells to a `TABLE`. If you need only to assign text to an element and not HTML markup, use the property instead. - Assigning a value to will destroy any text values previously assigned using . + Assigning a value to will destroy any text values previously assigned using . ]]> @@ -1316,14 +1316,14 @@ , the HTML code will display as literals in the document, just as if you were viewing HTML within a text file. If you assign HTML to an element using the property, will return all of the text in that HTML with the markup removed. + If you attempt to assign HTML to an element with , the HTML code will display as literals in the document, just as if you were viewing HTML within a text file. If you assign HTML to an element using the property, will return all of the text in that HTML with the markup removed. - Assigning a value to will destroy any child elements that belong to the element. + Assigning a value to will destroy any child elements that belong to the element. ## Examples - The following code creates a new hyperlink using , and assigns text to the link using the property. + The following code creates a new hyperlink using , and assigns text to the link using the property. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElement/Overview/Form1.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElement/Overview/Form1.vb" id="Snippet8"::: @@ -1446,7 +1446,7 @@ to execute unexposed methods that take no arguments. For an example, see . + This method can be used to call methods from the Document Object Model (DOM) that do not have equivalents in managed code. Use this version of to execute unexposed methods that take no arguments. For an example, see . ]]> @@ -1500,7 +1500,7 @@ will be converted to Win32 `VARIANT` data types before they are passed to the named scripting function. + This method can be used to call methods from the Document Object Model (DOM) that do not have equivalents in managed code. All arguments supplied to will be converted to Win32 `VARIANT` data types before they are passed to the named scripting function. @@ -1553,7 +1553,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -1604,7 +1604,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -1655,7 +1655,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -1738,7 +1738,7 @@ occurs until it is given focus again, either by the user selecting it on the page or by the application calling the method on that element. + An element will no longer receive key stroke events after occurs until it is given focus again, either by the user selecting it on the page or by the application calling the method on that element. You cannot cancel this event. @@ -1796,7 +1796,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -1838,7 +1838,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -1879,7 +1879,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -1927,7 +1927,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -1976,7 +1976,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -2025,7 +2025,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlElement1`. Then ensure that the event handler is associated with the event. @@ -2081,9 +2081,9 @@ property to retrieve elements from a document using the method on the property of . + Use the property to retrieve elements from a document using the method on the property of . - When applied to `INPUT` elements, defines the variable name for that element's data when its form is submitted to the server. + When applied to `INPUT` elements, defines the variable name for that element's data when its form is submitted to the server. ]]> @@ -2121,7 +2121,7 @@ in conjunction with to walk the document tree for an HTML element. + Use in conjunction with to walk the document tree for an HTML element. ]]> @@ -2170,7 +2170,7 @@ ## Examples - The following code example shows how and differ for `span1`, `span2` and `span3`: + The following code example shows how and differ for `span1`, `span2` and `span3`: ``` @@ -2247,7 +2247,7 @@ ## Examples - The following code example shows how and differ for `span1`, `span2` and `span3`: + The following code example shows how and differ for `span1`, `span2` and `span3`: ``` @@ -2323,7 +2323,7 @@ ## Remarks The equality operator tests the `IUnknown` pointers of the underlying COM objects wrapped by the supplied classes. - The equivalent method for this operator is ]]> + The equivalent method for this operator is ]]>
@@ -2362,7 +2362,7 @@ is only one element is , or the two objects are not equal; otherwise, . - ]]> + ]]>
@@ -2402,7 +2402,7 @@ will return all HTML contained in the current element excluding the current element's surrounding tags, includes the current element's tag as well as the HTML that tag contains, for example: + Whereas will return all HTML contained in the current element excluding the current element's surrounding tags, includes the current element's tag as well as the HTML that tag contains, for example: `` @@ -2430,7 +2430,7 @@ `` - In this example, calling on `div2` will return: + In this example, calling on `div2` will return: `
` @@ -2444,7 +2444,7 @@ `
` - Calling will return: + Calling will return: `World` @@ -2454,7 +2454,7 @@ `` - If you assign a new value to , the current element reference will become invalid; it will not reflect the name, properties and child content of the HTML you have just assigned. + If you assign a new value to , the current element reference will become invalid; it will not reflect the name, properties and child content of the HTML you have just assigned. ]]>
@@ -2498,9 +2498,9 @@ , the HTML code will display as literals in the document, just as if you were viewing HTML within a text file. If you assign HTML to an element using the property, will return all of the text in that HTML with the markup removed. + If you attempt to assign HTML to an element with , the HTML code will display as literals in the document, just as if you were viewing HTML within a text file. If you assign HTML to an element using the property, will return all of the text in that HTML with the markup removed. - Assigning a value to will destroy any child elements that belong to the element. + Assigning a value to will destroy any child elements that belong to the element. ]]> @@ -2542,7 +2542,7 @@ ## Remarks The property enables discovery of an element's context. It is most useful inside of event handlers such as , which can fire for any element anywhere in the document's object hierarchy. - The property of the HTML element (the top of an HTML document) points back to itself. If you call inside a loop, verify that the loop's break condition compares the type of the current element and the type of the `Parent` property, or else your code may execute an infinite loop. + The property of the HTML element (the top of an HTML document) points back to itself. If you call inside a loop, verify that the loop's break condition compares the type of the current element and the type of the `Parent` property, or else your code may execute an infinite loop. @@ -2708,7 +2708,7 @@ ; `ScrollLeft` and are exposed independently because these are the only two properties of the scroll area that developers can set. + The full dimensions of the scroll area are available using ; `ScrollLeft` and are exposed independently because these are the only two properties of the scroll area that developers can set. ]]> @@ -2747,7 +2747,7 @@ ## Remarks An element will have a scrollable region if its content exceeds the size of its dimensions, unless the overflow style on the element forbids rendering scrollbars. - You cannot modify the size of the scroll area directly, but you can modify the distance between the edges of the scroll area and the edges of the element. Use the and properties to achieve this. + You cannot modify the size of the scroll area directly, but you can modify the distance between the edges of the scroll area and the edges of the element. Use the and properties to achieve this. ]]>
@@ -2787,7 +2787,7 @@ ; and `ScrollTop` are exposed independently because these are the only two properties of the scroll area that developers can set. + The full dimensions of the scroll area are available using ; and `ScrollTop` are exposed independently because these are the only two properties of the scroll area that developers can set. ]]> @@ -2829,18 +2829,18 @@ exposes only those attributes that are common to all elements, leaving out those that only apply to certain types of elements; `SRC` is a predefined attribute for the `IMG` tag, for example, but not for the `DIV` tag. Use and to manipulate attributes not exposed on the managed Document Object Model (DOM). + An attribute in HTML is any valid name-value pair for that element. exposes only those attributes that are common to all elements, leaving out those that only apply to certain types of elements; `SRC` is a predefined attribute for the `IMG` tag, for example, but not for the `DIV` tag. Use and to manipulate attributes not exposed on the managed Document Object Model (DOM). - If `attributeName` is not a defined attribute on an element, will define it on the element as a new attribute. + If `attributeName` is not a defined attribute on an element, will define it on the element as a new attribute. - and are case-insensitive. + and are case-insensitive. - To set the `class` attribute on an , you must refer to the attribute as `className` when specifying the first argument to + To set the `class` attribute on an , you must refer to the attribute as `className` when specifying the first argument to ## Examples - The following code example adds a new `IMG` element to the current document, using to set the `SRC` attribute for the image. + The following code example adds a new `IMG` element to the current document, using to set the `SRC` attribute for the image. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElement/Overview/Form1.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElement/Overview/Form1.vb" id="Snippet13"::: @@ -2930,9 +2930,9 @@ determines which element in an HTML document will next receive focus when the user presses the TAB key. By default, the only elements included in the tab order are `INPUT` elements, the `SELECT` control, and any element whose `contentEditable` property is set to `true`. You can include any HTML element in the tab order, such as a `DIV`, by assigning it an explicit . + determines which element in an HTML document will next receive focus when the user presses the TAB key. By default, the only elements included in the tab order are `INPUT` elements, the `SELECT` control, and any element whose `contentEditable` property is set to `true`. You can include any HTML element in the tab order, such as a `DIV`, by assigning it an explicit . - Valid values for range from -32767 to 32767. + Valid values for range from -32767 to 32767. ]]> @@ -2975,7 +2975,7 @@ when you have an element of a potentially arbitrary type, and need to perform a type-specific operation. + Many elements in the HTML Document Object Model have attributes, properties, and methods that are unique to those elements; such as the `HREF` attribute on the `A` element, or the `Submit` method on `FORM`. Use when you have an element of a potentially arbitrary type, and need to perform a type-specific operation. diff --git a/xml/System.Windows.Forms/HtmlElementCollection.xml b/xml/System.Windows.Forms/HtmlElementCollection.xml index a3318a4382d..dff036ea809 100644 --- a/xml/System.Windows.Forms/HtmlElementCollection.xml +++ b/xml/System.Windows.Forms/HtmlElementCollection.xml @@ -183,7 +183,7 @@ objects are read-only. To add an element to an HTML document, use methods such as and . + objects are read-only. To add an element to an HTML document, use methods such as and . ]]> diff --git a/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml b/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml index ba2d1ab08a1..4d4336919c4 100644 --- a/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml +++ b/xml/System.Windows.Forms/HtmlElementErrorEventArgs.xml @@ -30,14 +30,14 @@ Provides data for the event. - control named `webBrowser1`. - + control named `webBrowser1`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet16"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet16"::: + ]]> @@ -76,16 +76,16 @@ Gets the descriptive string corresponding to the error. The descriptive string corresponding to the error. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet451"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet451"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet451"::: + ]]> @@ -128,19 +128,19 @@ if the event has been handled; otherwise, . The default is . - control named `webBrowser1`. - + control named `webBrowser1`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet16"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet16"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet16"::: + ]]>
@@ -178,16 +178,16 @@ Gets the line of HTML script code on which the error occurred. An designating the script line number. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet451"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet451"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet451"::: + ]]>
@@ -219,21 +219,21 @@ Gets the location of the document that generated the error. A that represents the location of the document that generated the error. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet451"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet451"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet451"::: + ]]>
diff --git a/xml/System.Windows.Forms/HtmlElementEventArgs.xml b/xml/System.Windows.Forms/HtmlElementEventArgs.xml index 5bf3c37c3cc..75611bfe369 100644 --- a/xml/System.Windows.Forms/HtmlElementEventArgs.xml +++ b/xml/System.Windows.Forms/HtmlElementEventArgs.xml @@ -30,23 +30,23 @@ Provides data for the events defined on and . - encapsulates the same information found on the `window.event` object when programming against the unmanaged HTML DOM or when writing Active Script for HTML pages. - - In most cases, you can use to find the HTML element that's receiving the event action, and to find the HTML element that's being left. However, not every event supplies a value for these properties. - - Many events in the HTML DOM are sent to their parent elements unless they are cancelled. This is known as event bubbling. If a `SPAN` inside of a `DIV` receives a click, then a click event is raised for the `SPAN` first, then for the `DIV`, and finally for the HTML page's `BODY` element. controls whether an event behaves in this manner or not. - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + encapsulates the same information found on the `window.event` object when programming against the unmanaged HTML DOM or when writing Active Script for HTML pages. + + In most cases, you can use to find the HTML element that's receiving the event action, and to find the HTML element that's being left. However, not every event supplies a value for these properties. + + Many events in the HTML DOM are sent to their parent elements unless they are cancelled. This is known as event bubbling. If a `SPAN` inside of a `DIV` receives a click, then a click event is raised for the `SPAN` first, then for the `DIV`, and finally for the HTML page's `BODY` element. controls whether an event behaves in this manner or not. + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> event Object @@ -80,16 +80,16 @@ is the ALT key was pressed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> altKey Property @@ -123,21 +123,21 @@ if the event bubbles; if it does not. - managed wrapper bubble with the exception of . For , the `Error` and `Load` events do not bubble. Setting `BubbleEvent` to `true` during any of these events will have no effect. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + managed wrapper bubble with the exception of . For , the `Error` and `Load` events do not bubble. Setting `BubbleEvent` to `true` during any of these events will have no effect. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> cancelBubble Event @@ -170,41 +170,41 @@ Gets or sets the position of the mouse cursor in the document's client area. The current position of the mouse cursor. - if you need the mouse coordinates relative to the element that raised the event. - - - -## Examples - The following HTML file demonstrates relative positioning of a `TABLE` inside of a `BODY` tag. - -``` - - - - - - - - - -
TextMore text
- - - - - -``` - - The following code example displays the difference between , , and when the user clicks on an element of the `TABLE`. will display coordinates relative to the upper-left corner of the document's client area. will display coordinates relative to the upper-left corner of the `TABLE`. If you click on one of the lines of text, will display coordinates relative to that `TD` element. - - This example requires that you have configured `Document_MouseDown` as a handler for the event on . - + if you need the mouse coordinates relative to the element that raised the event. + + + +## Examples + The following HTML file demonstrates relative positioning of a `TABLE` inside of a `BODY` tag. + +``` + + + + + + + + + +
TextMore text
+ + + + + +``` + + The following code example displays the difference between , , and when the user clicks on an element of the `TABLE`. will display coordinates relative to the upper-left corner of the document's client area. will display coordinates relative to the upper-left corner of the `TABLE`. If you click on one of the lines of text, will display coordinates relative to that `TD` element. + + This example requires that you have configured `Document_MouseDown` as a handler for the event on . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.vb" id="Snippet2"::: + ]]>
@@ -241,16 +241,16 @@ if the CTRL key was pressed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> ctrlKey Property @@ -283,16 +283,16 @@ Gets the name of the event that was raised. The name of the event. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> @@ -342,11 +342,11 @@ Gets the the mouse pointer is moving away from. The the mouse pointer is moving away from. - will have a valid value during mouse events such as and . - + will have a valid value during mouse events such as and . + ]]>
@@ -378,16 +378,16 @@ Gets the ASCII value of the keyboard character typed in a , , or event. The ASCII value of the composed keyboard entry. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> keyCode Property @@ -420,16 +420,16 @@ Gets the mouse button that was clicked during a or event. The mouse button that was clicked. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]>
@@ -461,43 +461,43 @@ Gets or sets the position of the mouse cursor relative to a relatively positioned parent element. The position of the mouse cursor relative to the upper-left corner of the parent of the element that raised the event, if the parent element is relatively positioned. - . - - - -## Examples - The following HTML file demonstrates relative positioning of a `TABLE` inside of a `BODY` tag. - -``` - - - - - - - - -
Text/TD> - More text
- - - - - -``` - - The following code example displays the difference between , , and when the user clicks on an element of the `TABLE`. will display coordinates relative to the upper-left corner of the document's client area. will display coordinates relative to the upper-left corner of the `TABLE`. If you click on one of the lines of text, will display coordinates relative to that `TD` element. - - This example requires that you have configured `Document_MouseDown` as a handler for the event on . - + . + + + +## Examples + The following HTML file demonstrates relative positioning of a `TABLE` inside of a `BODY` tag. + +``` + + + + + + + + +
Text/TD> + More text
+ + + + + +``` + + The following code example displays the difference between , , and when the user clicks on an element of the `TABLE`. will display coordinates relative to the upper-left corner of the document's client area. will display coordinates relative to the upper-left corner of the `TABLE`. If you click on one of the lines of text, will display coordinates relative to that `TD` element. + + This example requires that you have configured `Document_MouseDown` as a handler for the event on . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.vb" id="Snippet2"::: + ]]>
@@ -533,36 +533,36 @@ Gets or sets the position of the mouse cursor relative to the element that raises the event. The mouse position relative to the element that raises the event. - - - - - - - - - -
TextMore text
- - - - - -``` - - The following code example displays the difference between , and when the user clicks on an element of the `TABLE`. will display coordinates relative to the upper-left corner of the document's client area. will display coordinates relative to the upper-left corner of the `TABLE`. If you click on one of the lines of text, will display coordinates relative to that `TD` element. - - This example requires that you have configured `Document_MouseDown` as a handler for the event on . - + + + + + + + + + +
TextMore text
+ + + + + +``` + + The following code example displays the difference between , and when the user clicks on an element of the `TABLE`. will display coordinates relative to the upper-left corner of the document's client area. will display coordinates relative to the upper-left corner of the `TABLE`. If you click on one of the lines of text, will display coordinates relative to that `TD` element. + + This example requires that you have configured `Document_MouseDown` as a handler for the event on . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.vb" id="Snippet2"::: + ]]>
@@ -599,16 +599,16 @@ if the event has been handled; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> @@ -641,16 +641,16 @@ if the SHIFT key was pressed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> shiftKey Property @@ -698,21 +698,21 @@ Gets the toward which the user is moving the mouse pointer. The element toward which the mouse pointer is moving. - will have a valid value during mouse events such as and . - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. - + will have a valid value during mouse events such as and . + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `HtmlDocument1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet422"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet422"::: + ]]> diff --git a/xml/System.Windows.Forms/HtmlHistory.xml b/xml/System.Windows.Forms/HtmlHistory.xml index d5d30e51926..d2d67fd8d96 100644 --- a/xml/System.Windows.Forms/HtmlHistory.xml +++ b/xml/System.Windows.Forms/HtmlHistory.xml @@ -39,9 +39,9 @@ ## Remarks The managed HTML Document Object Model (DOM) keeps track of the sites that a user has visited within a given *session*. A *session* is defined as the length of time from when an application hosting the managed HTML DOM starts until the application closes. - When you use the property or method of the control to navigate to a new Web page, Internet Explorer may either retrieve the latest version of that page from the server or display the version that is currently in the Internet Explorer cache. By contrast, when you use to navigate forward and backward in this stack, Internet Explorer will display the pages from the local computer's cache of downloaded Web content, unless the server indicates that the document's content should expire immediately. For more information on the history list and caching in Internet Explorer, see [How To Prevent Caching in Internet Explorer](/troubleshoot/developer/browsers/connectivity-navigation/how-to-prevent-caching). + When you use the property or method of the control to navigate to a new Web page, Internet Explorer may either retrieve the latest version of that page from the server or display the version that is currently in the Internet Explorer cache. By contrast, when you use to navigate forward and backward in this stack, Internet Explorer will display the pages from the local computer's cache of downloaded Web content, unless the server indicates that the document's content should expire immediately. For more information on the history list and caching in Internet Explorer, see [How To Prevent Caching in Internet Explorer](/troubleshoot/developer/browsers/connectivity-navigation/how-to-prevent-caching). - The principal method of is , which navigates either to the specified position in the navigation stack or to a new Uniform Resource Locator (URL). The and methods navigate down and up the navigation stack, respectively, by the required number of entries. + The principal method of is , which navigates either to the specified position in the navigation stack or to a new Uniform Resource Locator (URL). The and methods navigate down and up the navigation stack, respectively, by the required number of entries. ]]>
@@ -82,7 +82,7 @@ ## Remarks If the number supplied to `numBack` exceeds the number of previously visited entries in the history, the control will navigate to the first item in the history, for example, to the first Uniform Resource Locator (URL) visited during the current browser session. - If there are no entries behind the current page in the navigation stack, calling will have no effect, but it will not raise an error. + If there are no entries behind the current page in the navigation stack, calling will have no effect, but it will not raise an error. ]]>
@@ -124,10 +124,10 @@ method when you are finished using the object. leaves the object in an unusable state. After calling , you must release all references to so the garbage collector can reclaim the memory that was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + Call the method when you are finished using the object. leaves the object in an unusable state. After calling , you must release all references to so the garbage collector can reclaim the memory that was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). > [!NOTE] -> Always call before you release your last reference to . Otherwise, the resources is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call before you release your last reference to . Otherwise, the resources is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> @@ -169,7 +169,7 @@ . For more information, see [Importing a Type Library as an Assembly](/dotnet/framework/interop/importing-a-type-library-as-an-assembly). + You will need to add a reference to the unmanaged MSHTML.dll in order to use . For more information, see [Importing a Type Library as an Assembly](/dotnet/framework/interop/importing-a-type-library-as-an-assembly). ]]> @@ -211,7 +211,7 @@ ## Remarks If the number supplied to `numForward` exceeds the number of previously visited entries in the history, the control will navigate to the last item in the history. - If there are no entries ahead of the current page in the navigation stack, calling will have no effect, but it will not raise an error. + If there are no entries ahead of the current page in the navigation stack, calling will have no effect, but it will not raise an error. ]]>
@@ -265,7 +265,7 @@ with a negative argument is equivalent to using the method; conversely, using with a positive argument is equivalent to using the method. + Using with a negative argument is equivalent to using the method; conversely, using with a positive argument is equivalent to using the method. ]]> @@ -306,7 +306,7 @@ is equivalent to using either the property or the method of the control. + Using is equivalent to using either the property or the method of the control. ]]> @@ -347,7 +347,7 @@ is equivalent to using either the property or the method of the control. + Using is equivalent to using either the property or the method of the control. ]]> diff --git a/xml/System.Windows.Forms/HtmlWindow.xml b/xml/System.Windows.Forms/HtmlWindow.xml index 886b60daea3..564a6ab9481 100644 --- a/xml/System.Windows.Forms/HtmlWindow.xml +++ b/xml/System.Windows.Forms/HtmlWindow.xml @@ -35,11 +35,11 @@ ## Remarks should not be confused with the concept of a window in Windows Forms or the Windows API; there is no `HWND` or similar Windows resource that corresponds directly to an instance of . Rather, provides high-level descriptions of a document's location on a user's screen, as well as methods for interacting with users by way of prompts and dialog boxes. acts as a logical container for a Web page's documents and its metadata, such as the document's location and the capabilities of the Web browser. - A Web page consists of a single document, or a `FRAMESET` containing one or more `FRAME` elements, each of which hosts its own document. Web developers use framesets to show logically related pages side by side (for example, a content page next to a navigation page). When a page consists of a single document, you can access it through the property of ; if the page uses frames, you can access their documents through the collection, which consists of one or more objects. + A Web page consists of a single document, or a `FRAMESET` containing one or more `FRAME` elements, each of which hosts its own document. Web developers use framesets to show logically related pages side by side (for example, a content page next to a navigation page). When a page consists of a single document, you can access it through the property of ; if the page uses frames, you can access their documents through the collection, which consists of one or more objects. - When your host the control in a Windows Forms application, you can choose to interact with the user using standard Windows Forms classes, such as or , or you can use methods on defined for this purpose. The method presents a simple dialog box with custom text and an **OK** button; presents a line of custom text and a text input field to the user; and presents a dialog box with a line of custom text and **OK** and **Cancel** buttons. + When your host the control in a Windows Forms application, you can choose to interact with the user using standard Windows Forms classes, such as or , or you can use methods on defined for this purpose. The method presents a simple dialog box with custom text and an **OK** button; presents a line of custom text and a text input field to the user; and presents a dialog box with a line of custom text and **OK** and **Cancel** buttons. - You can use to open new windows containing new documents. loads the specified URL into the named window, creating it if it does not already exist, while always opens its URL in a newly created window. + You can use to open new windows containing new documents. loads the specified URL into the named window, creating it if it does not already exist, while always opens its URL in a newly created window. @@ -88,7 +88,7 @@ class offers a more powerful version of the method. + The class offers a more powerful version of the method. ]]> @@ -169,10 +169,10 @@ ## Remarks Use the property to determine if the window is already closed. If the window is already closed, this method has no effect. - When you create new windows using or , causes the HTML Document Object Model to open a new instance of Internet Explorer. If you don't call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application closes. + When you create new windows using or , causes the HTML Document Object Model to open a new instance of Internet Explorer. If you don't call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application closes. ## Examples - The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example was written under the assumption that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. To run this example successfully, change the first argument supplied to to a valid URL. + The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example was written under the assumption that your form has a control named `WebBrowser1`, a named `Button1`, and a class named `Timer1`. To run this example successfully, change the first argument supplied to to a valid URL. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet9"::: @@ -217,7 +217,7 @@ displays a modal dialog box; the user will not be able to access the underlying HTML page without first closing this dialog box. + displays a modal dialog box; the user will not be able to access the underlying HTML page without first closing this dialog box. ## Examples @@ -243,7 +243,7 @@ Building/Desk: ``` -The following example displays a dialog box when the user submits `NewOrderForm`. +The following example displays a dialog box when the user submits `NewOrderForm`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb" id="Snippet10"::: @@ -319,7 +319,7 @@ The following example displays a through the property of the control. Use this property when you need to access a document within a `FRAME` using the collection. + Typically, you will access the through the property of the control. Use this property when you need to access a document within a `FRAME` using the collection. @@ -375,7 +375,7 @@ The following example displays a . - You must add a referenced to the unmanaged MSHTML.dll in order to use . For more information, see [Importing a Type Library as an Assembly](/dotnet/framework/interop/importing-a-type-library-as-an-assembly). + You must add a referenced to the unmanaged MSHTML.dll in order to use . For more information, see [Importing a Type Library as an Assembly](/dotnet/framework/interop/importing-a-type-library-as-an-assembly). @@ -502,7 +502,7 @@ The following example displays a was called, that window will lose the focus. + If another window held the focus before was called, that window will lose the focus. Do not call focus on an element inside of a window until the window's event has been raised. @@ -675,7 +675,7 @@ The following example displays a contains all URLs navigated to within the current window, which is referred to as the *navigation stack*, and provides methods for navigating back to those documents. + contains all URLs navigated to within the current window, which is referred to as the *navigation stack*, and provides methods for navigating back to those documents. ]]> @@ -712,7 +712,7 @@ The following example displays a has been closed by the user or by way of a call to the method, attempting to navigate to a new URL or access the window's document will result in an error. Use this property to determine whether it is safe to call properties and methods on the current window object. + If the has been closed by the user or by way of a call to the method, attempting to navigate to a new URL or access the window's document will result in an error. Use this property to determine whether it is safe to call properties and methods on the current window object. @@ -764,7 +764,7 @@ The following example displays a event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. @@ -859,9 +859,9 @@ The following example displays a to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. + You cannot use to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. - will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control pointing to a.adatum.com, create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. + will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control pointing to a.adatum.com, create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. ]]>
@@ -904,9 +904,9 @@ The following example displays a to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. + You cannot use to move a window off of the visible edge of the screen; this method is also available through script on a Web page, and allowing untrusted script to render windows invisible is not considered secure. - will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control and it is pointing to a.adatum.com, you create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. + will raise an if the window you are trying to move and its parent window have different top-level domains. For example, if you are hosting the control and it is pointing to a.adatum.com, you create a new window using to display b.adatum.com. In this case, both windows are considered to be part of the same top-level domain, and the exception is not thrown. However, if you call to display www,microsoft.com, the two windows now have different top-level domains, and the operation will cause the exception to throw. ]]>
@@ -1070,7 +1070,7 @@ The following example displays a classes. - The equivalent method for this operator is ]]>
+ The equivalent method for this operator is ]]>
@@ -1200,7 +1200,7 @@ The following example displays a . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: + The `target` parameter can name a window that was created as the result of a previous call to . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: `Click to Start Order` @@ -1208,9 +1208,9 @@ The following example displays a or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . + If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . ]]>
@@ -1296,7 +1296,7 @@ The following example displays a . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: + The `target` parameter can name a window that was created as the result of a previous call to . The parameter may also point to a window opened by clicking on a hyperlink (`A` element) or a `FORM` element that uses the `TARGET` attribute to open its URL in a new window. The following HTML code will open a new window named `orderWindow` when the user clicks it: `Click to Start Order` @@ -1304,9 +1304,9 @@ The following example displays a or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . + If you use to load a URL in an existing window, `windowOptions` will be ignored; the window will retain the dimensions, appearance, and screen location first given it by the initial call to . ## Examples The following code example contains two methods: @@ -1402,9 +1402,9 @@ The following example displays a or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - If you want to load a document into a previously opened window, see the method. + If you want to load a document into a previously opened window, see the method. ]]>
@@ -1449,9 +1449,9 @@ The following example displays a or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. + When you create new windows using or , it causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call on all of the windows you have created, this instance of Internet Explorer will remain running even after your application has quit. - If you want to load a document into a previously opened window, see the method. + If you want to load a document into a previously opened window, see the method. ]]>
@@ -1526,7 +1526,7 @@ The following example displays a property of the control will return the position of the control relative to the upper-left corner of the form. By contrast, will return the location of the document's display area relative to the top-left corner of the user's monitor. + The property of the control will return the position of the control relative to the upper-left corner of the form. By contrast, will return the location of the document's display area relative to the top-left corner of the user's monitor. @@ -1580,7 +1580,7 @@ The following example displays a provides a quick, easy way to obtain simple text input from the user. + provides a quick, easy way to obtain simple text input from the user. ]]>
@@ -1617,7 +1617,7 @@ The following example displays a will cause that window to lose focus, but it will not automatically set focus on another window. + When called on a `FRAME` window in a `FRAMESET`, will cause that window to lose focus, but it will not automatically set focus on another window. ]]>
@@ -1654,7 +1654,7 @@ The following example displays a event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. @@ -1784,7 +1784,7 @@ The following example displays a event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. @@ -1838,7 +1838,7 @@ The following example displays a will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. + will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. @@ -1888,7 +1888,7 @@ The following example displays a will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. + will cause the document to scroll so that the specified coordinate on the document is located in the upper-left corner of the document's window. If the document is not long or wide enough for this to happen, will scroll through the document as far as possible in the specified direction. ]]>
@@ -1959,7 +1959,7 @@ The following example displays a control does not display a status bar. Any new window that you open with the or methods, however, will display a status bar by default. + The control does not display a status bar. Any new window that you open with the or methods, however, will display a status bar by default. ]]>
@@ -1996,7 +1996,7 @@ The following example displays a event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `HtmlWindow1`. Then ensure that the event handler is associated with the event. @@ -2039,7 +2039,7 @@ The following example displays a method. + This property is read-only. To navigate the window to a new document, use the method. ]]>
@@ -2076,7 +2076,7 @@ The following example displays a collection, it returns an . Call on this object if you need to access attributes of the underlying `FRAME` element, such as the `SRC` attribute. + When you retrieve a `FRAME` element from the collection, it returns an . Call on this object if you need to access attributes of the underlying `FRAME` element, such as the `SRC` attribute. diff --git a/xml/System.Windows.Forms/HtmlWindowCollection.xml b/xml/System.Windows.Forms/HtmlWindowCollection.xml index 8fc0c21f116..cbcac4ebfe9 100644 --- a/xml/System.Windows.Forms/HtmlWindowCollection.xml +++ b/xml/System.Windows.Forms/HtmlWindowCollection.xml @@ -44,7 +44,7 @@ supports the interface so that it can be used in loop constructs. It also defines an Item method, which allows access to the elements of the collection either via a method call or using standard array syntax. - If you create new windows with the or methods, and the documents hosted by these windows contain `FRAME` or `IFRAME` elements, that these elements will appear in the of the parent page. + If you create new windows with the or methods, and the documents hosted by these windows contain `FRAME` or `IFRAME` elements, that these elements will appear in the of the parent page. For more information on frames, see the documentation for the property. @@ -138,7 +138,7 @@ enables access to the elements of the collection using array syntax. + enables access to the elements of the collection using array syntax. ]]> @@ -186,7 +186,7 @@ is a zero-based collection. If there are *N* elements in the collection, valid arguments to are the integers from 0 to *N*-1. + is a zero-based collection. If there are *N* elements in the collection, valid arguments to are the integers from 0 to *N*-1. Windows are not laid out in in any predetermined order. @@ -238,7 +238,7 @@ will return a single element whose property corresponds to `elementId`. If the document contains multiple elements with the same name, will return only the first one in the collection. If you need to retrieve all elements with a property of `windowId`, use the method instead. + will return a single element whose property corresponds to `elementId`. If the document contains multiple elements with the same name, will return only the first one in the collection. If you need to retrieve all elements with a property of `windowId`, use the method instead. ]]> diff --git a/xml/System.Windows.Forms/IButtonControl.xml b/xml/System.Windows.Forms/IButtonControl.xml index b11d580c974..46a2e3761d2 100644 --- a/xml/System.Windows.Forms/IButtonControl.xml +++ b/xml/System.Windows.Forms/IButtonControl.xml @@ -31,7 +31,7 @@ ## Examples - The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. + The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IButtonControl Implementation/CPP/mybutton.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/IButtonControl/Overview/mybutton.cs" id="Snippet1"::: @@ -77,12 +77,12 @@ method and one of its buttons is clicked, the button's value is assigned to the form's property. + When a form is shown as a dialog box using the method and one of its buttons is clicked, the button's value is assigned to the form's property. ## Examples - The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. + The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IButtonControl Implementation/CPP/mybutton.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/IButtonControl/Overview/mybutton.cs" id="Snippet1"::: @@ -135,7 +135,7 @@ ## Examples - The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. + The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IButtonControl Implementation/CPP/mybutton.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/IButtonControl/Overview/mybutton.cs" id="Snippet1"::: @@ -181,7 +181,7 @@ ## Examples - The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. + The following example inherits from the class and implements the interface. Implementation is added to the property and the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IButtonControl Implementation/CPP/mybutton.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/IButtonControl/Overview/mybutton.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ICommandExecutor.xml b/xml/System.Windows.Forms/ICommandExecutor.xml index 02496a40465..7802862c349 100644 --- a/xml/System.Windows.Forms/ICommandExecutor.xml +++ b/xml/System.Windows.Forms/ICommandExecutor.xml @@ -23,11 +23,11 @@ Defines a method that executes a certain action on the type that implements this interface. - @@ -61,11 +61,11 @@ Performs a task that is determined by the type that implements this method. - method is not called on classes that exist outside the .NET Framework. - + method is not called on classes that exist outside the .NET Framework. + ]]> diff --git a/xml/System.Windows.Forms/IContainerControl.xml b/xml/System.Windows.Forms/IContainerControl.xml index 90cbcc3e634..4db1d96a063 100644 --- a/xml/System.Windows.Forms/IContainerControl.xml +++ b/xml/System.Windows.Forms/IContainerControl.xml @@ -26,7 +26,7 @@ class and implements the interface. Implementation is added to the property and the method. + The following example inherits from the class and implements the interface. Implementation is added to the property and the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IContainerControl Implementation/CPP/mycontainercontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContainerControl/.ctor/mycontainercontrol.cs" id="Snippet1"::: @@ -79,7 +79,7 @@ class and implements the interface. Implementation is added to the property and the method. + The following example inherits from the class and implements the interface. Implementation is added to the property and the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IContainerControl Implementation/CPP/mycontainercontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContainerControl/.ctor/mycontainercontrol.cs" id="Snippet1"::: @@ -126,7 +126,7 @@ class and implements the interface. Implementation is added to the property and the method. + The following example inherits from the class and implements the interface. Implementation is added to the property and the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IContainerControl Implementation/CPP/mycontainercontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContainerControl/.ctor/mycontainercontrol.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ICurrencyManagerProvider.xml b/xml/System.Windows.Forms/ICurrencyManagerProvider.xml index 9e33c166697..e397bb15621 100644 --- a/xml/System.Windows.Forms/ICurrencyManagerProvider.xml +++ b/xml/System.Windows.Forms/ICurrencyManagerProvider.xml @@ -102,7 +102,7 @@ returns the main currency manager for this , which is the same currency manager returned from the property. + If `dataMember` is `null` or an empty string (""), returns the main currency manager for this , which is the same currency manager returned from the property. ]]> diff --git a/xml/System.Windows.Forms/IDataGridColumnStyleEditingNotificationService.xml b/xml/System.Windows.Forms/IDataGridColumnStyleEditingNotificationService.xml index 6b4c91d8e16..f3c4a7764d6 100644 --- a/xml/System.Windows.Forms/IDataGridColumnStyleEditingNotificationService.xml +++ b/xml/System.Windows.Forms/IDataGridColumnStyleEditingNotificationService.xml @@ -23,11 +23,11 @@ Provides an editing notification interface. - column with special properties, you must first inherit from the class. The interface is provided to notify the when a column is being edited. - + column with special properties, you must first inherit from the class. The interface is provided to notify the when a column is being edited. + ]]> @@ -65,11 +65,11 @@ The that is editing the column. Informs the that the user has begun editing the column. - method allows the control to show a pencil in the row header indicating the row is being edited. - + method allows the control to show a pencil in the row header indicating the row is being edited. + ]]> diff --git a/xml/System.Windows.Forms/IDataGridViewEditingCell.xml b/xml/System.Windows.Forms/IDataGridViewEditingCell.xml index 41cd17bbf11..7789c7dccc2 100644 --- a/xml/System.Windows.Forms/IDataGridViewEditingCell.xml +++ b/xml/System.Windows.Forms/IDataGridViewEditingCell.xml @@ -72,7 +72,7 @@ ## Remarks The formatted value represents the value as it is displayed in the cell's user interface. The formatted value may be different in absolute value and even data type than the actual value contained in the cell. - Implementations of this property typically return a value retrieved by calling the method and passing in the value. + Implementations of this property typically return a value retrieved by calling the method and passing in the value. ]]> diff --git a/xml/System.Windows.Forms/IDataGridViewEditingControl.xml b/xml/System.Windows.Forms/IDataGridViewEditingControl.xml index 63f33ff3c59..48267f90ea5 100644 --- a/xml/System.Windows.Forms/IDataGridViewEditingControl.xml +++ b/xml/System.Windows.Forms/IDataGridViewEditingControl.xml @@ -31,11 +31,11 @@ 1. The control creates an instance of the editing control type. -2. The control calls the cell method. You can override this method to transfer the cell value to the editing control. +2. The control calls the cell method. You can override this method to transfer the cell value to the editing control. -3. The control calls the editing control method and passes in the cell's current style. You can implement this method to initialize the appearance of the editing control so that it matches the appearance of the cell. +3. The control calls the editing control method and passes in the cell's current style. You can implement this method to initialize the appearance of the editing control so that it matches the appearance of the cell. -4. The control calls the editing control method. You can implement this method to make final adjustments to the editing control, such as selecting the control value. +4. The control calls the editing control method. You can implement this method to make final adjustments to the editing control, such as selecting the control value. For more information about implementing , see [How to: Host Controls in Windows Forms DataGridView Cells](/dotnet/desktop/winforms/controls/how-to-host-controls-in-windows-forms-datagridview-cells). @@ -319,7 +319,7 @@ ## Remarks An editing control implements this method to determine which input keys should be processed by the control, and which input keys should be processed by the . - The method is called by the . The will pass in `true` for `dataGridViewWantsInputKey` when it can process the `keyData`. If the editing control can let the handle the `keyData`, should return `false` when `dataGridViewWantsInputKey` is `true`. Other implementations of may ignore a `dataGridViewWantsInputKey` value of `true` and handle the `keyData` in the editing control. + The method is called by the . The will pass in `true` for `dataGridViewWantsInputKey` when it can process the `keyData`. If the editing control can let the handle the `keyData`, should return `false` when `dataGridViewWantsInputKey` is `true`. Other implementations of may ignore a `dataGridViewWantsInputKey` value of `true` and handle the `keyData` in the editing control. @@ -364,7 +364,7 @@ that hosts the editing control when the control is in edit mode. The actual editing control may not cover the entire area of the editing panel. In this case, the implementation should return the cursor to use when the mouse pointer is over the panel but not over the control. Typically, you will want to return the same cursor that the control uses. If you want to change the cursor that appears when the pointer is over the control, you must set the property. You can set this in the constructor of the implementation, or you can set it in the implementation. + The editing panel is the that hosts the editing control when the control is in edit mode. The actual editing control may not cover the entire area of the editing panel. In this case, the implementation should return the cursor to use when the mouse pointer is over the panel but not over the control. Typically, you will want to return the same cursor that the control uses. If you want to change the cursor that appears when the pointer is over the control, you must set the property. You can set this in the constructor of the implementation, or you can set it in the implementation. diff --git a/xml/System.Windows.Forms/IDataObject.xml b/xml/System.Windows.Forms/IDataObject.xml index 6939923ae2f..14a2992d181 100644 --- a/xml/System.Windows.Forms/IDataObject.xml +++ b/xml/System.Windows.Forms/IDataObject.xml @@ -34,15 +34,15 @@ ## Remarks The `IDataObject` interface is used by the class and in drag-and-drop operations. - When implemented in a class, the methods allow the user to store data in multiple formats in an instance of the class. Storing data in more than one format increases the chance that a target application, whose format requirements you might not know, can retrieve the stored data. To store data in an instance of , call the method and specify the data format in the `format` parameter. Set the `autoConvert` parameter to `false` if you do not want stored data to be converted to another format when it is retrieved. Invoke multiple times on one instance of to store data in more than one format. + When implemented in a class, the methods allow the user to store data in multiple formats in an instance of the class. Storing data in more than one format increases the chance that a target application, whose format requirements you might not know, can retrieve the stored data. To store data in an instance of , call the method and specify the data format in the `format` parameter. Set the `autoConvert` parameter to `false` if you do not want stored data to be converted to another format when it is retrieved. Invoke multiple times on one instance of to store data in more than one format. - You retrieve stored data from an by calling the method and specifying the data format in the `format` parameter. Set the `autoConvert` parameter to `false` to retrieve only data that was stored in the specified format. To convert the stored data to the specified format, set `autoConvert` to `true`, or do not use `autoConvert`. + You retrieve stored data from an by calling the method and specifying the data format in the `format` parameter. Set the `autoConvert` parameter to `false` to retrieve only data that was stored in the specified format. To convert the stored data to the specified format, set `autoConvert` to `true`, or do not use `autoConvert`. To determine the formats of the data stored in an , use the following methods. -- Call the method to retrieve an array of all the formats in which the data is available. Set the `autoConvert` parameter to `false` to get only the formats in which the data is stored. To get all the formats in which the data is available, set `autoConvert` to `true`, or do not use this parameter. +- Call the method to retrieve an array of all the formats in which the data is available. Set the `autoConvert` parameter to `false` to get only the formats in which the data is stored. To get all the formats in which the data is available, set `autoConvert` to `true`, or do not use this parameter. -- Call the method to determine whether stored data is available in a certain format. If you do not want stored data to be converted to the specified format, set the `autoConvert` parameter to `false`. +- Call the method to determine whether stored data is available in a certain format. If you do not want stored data to be converted to the specified format, set the `autoConvert` parameter to `false`. See the class for an implementation of this interface. See the class for the predefined data formats. @@ -99,12 +99,12 @@ ## Remarks If this method cannot find data in the specified format, it attempts to convert the data to the format. If the data cannot be converted to the specified format, this method returns `null`. - To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this instance. + To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this instance. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -164,12 +164,12 @@ ## Remarks If this method cannot find data in the specified format, it attempts to convert the data to the format. If the data cannot be converted to the specified format, this method returns `null`. - To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this instance. + To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this instance. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -234,12 +234,12 @@ If the `autoConvert` parameter is `false`, this method returns data in the specified format, or `null` if no data in this format can be found. - To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this instance. + To determine whether data is associated with, or can be converted to, a format, call before calling . Call for a list of valid formats for the data stored in this instance. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -306,12 +306,12 @@ before calling . Call for the formats that are available in this instance. + Call this method to determine whether a format exists in this before calling . Call for the formats that are available in this instance. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -365,12 +365,12 @@ before calling . Call for the formats that are available in this instance. + Call this method to determine whether a format exists in this before calling . Call for the formats that are available in this instance. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -427,7 +427,7 @@ before calling . Call for the formats that are available in this instance. + Call this method to determine whether a format exists in this before calling . Call for the formats that are available in this instance. This method returns `true` when: @@ -444,7 +444,7 @@ > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -504,12 +504,12 @@ method. See the class for the predefined formats. + Call this method to get the supported data formats before calling the method. See the class for the predefined formats. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -562,12 +562,12 @@ method. See the class for the predefined formats. + Call this method to get the supported data formats before calling the method. See the class for the predefined formats. > [!NOTE] > Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text. - For an implementation of this method, see . + For an implementation of this method, see . @@ -632,7 +632,7 @@ Data stored using this method can be converted to a compatible format when it is retrieved. - For an implementation of this method, see . + For an implementation of this method, see . @@ -698,7 +698,7 @@ Data stored using this method can be converted to a compatible format when it is retrieved. - For an implementation of this method, see . + For an implementation of this method, see . @@ -764,7 +764,7 @@ Data stored using this method can be converted to a compatible format when it is retrieved. - For an implementation of this method, see . + For an implementation of this method, see . @@ -832,7 +832,7 @@ ## Remarks If you do not know the format of the target application, you can store data in multiple formats using this method. - For an implementation of this method, see . + For an implementation of this method, see . diff --git a/xml/System.Windows.Forms/IDropTarget.xml b/xml/System.Windows.Forms/IDropTarget.xml index 068bd599116..36a3f3eb151 100644 --- a/xml/System.Windows.Forms/IDropTarget.xml +++ b/xml/System.Windows.Forms/IDropTarget.xml @@ -54,13 +54,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -98,13 +98,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -142,13 +142,13 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> @@ -186,13 +186,13 @@ A that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> diff --git a/xml/System.Windows.Forms/IFeatureSupport.xml b/xml/System.Windows.Forms/IFeatureSupport.xml index 6ab84e28d41..dd4efabcb77 100644 --- a/xml/System.Windows.Forms/IFeatureSupport.xml +++ b/xml/System.Windows.Forms/IFeatureSupport.xml @@ -23,22 +23,22 @@ Specifies a standard interface for retrieving feature information from the current system. - provides methods you can use to determine whether a feature is currently installed on the system and to get the version number of a feature. Call to determine whether a feature, or a specific version of a feature, is currently installed. Call to determine the version number of an installed feature. - - See the and classes for implementations of this interface. - - - -## Examples - The following example uses the implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. - + provides methods you can use to determine whether a feature is currently installed on the system and to get the version number of a feature. Call to determine whether a feature, or a specific version of a feature, is currently installed. Call to determine the version number of an installed feature. + + See the and classes for implementations of this interface. + + + +## Examples + The following example uses the implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FeatureSupport/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: + ]]> @@ -78,20 +78,20 @@ Retrieves the version of the specified feature. A representing the version number of the specified feature; or if the feature is not installed. - . - - - -## Examples - The following example uses the implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. - + . + + + +## Examples + The following example uses the implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FeatureSupport/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: + ]]> @@ -141,15 +141,15 @@ if the feature is present; otherwise, . - implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. - + implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FeatureSupport/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: + ]]> @@ -191,15 +191,15 @@ if the requested version of the feature is present; otherwise, . - implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. - + implementation of and queries for the feature. The version is checked to see if it is `null`, to determine whether the feature is present. The result is displayed in a text box. This code assumes `textBox1` has been created and placed on a form. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FeatureSupport/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FeatureSupport/Overview/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/IMessageFilter.xml b/xml/System.Windows.Forms/IMessageFilter.xml index 68acbacf37a..71b08b53c41 100644 --- a/xml/System.Windows.Forms/IMessageFilter.xml +++ b/xml/System.Windows.Forms/IMessageFilter.xml @@ -23,13 +23,13 @@ Defines a message filter interface. - interface can be added to the application's message pump to filter out a message or perform other operations before the message is dispatched to a form or control. To add the message filter to an application's message pump, use the method in the class. - + interface can be added to the application's message pump to filter out a message or perform other operations before the message is dispatched to a form or control. To add the message filter to an application's message pump, use the method in the class. + ]]> @@ -70,11 +70,11 @@ to filter the message and stop it from being dispatched; to allow the message to continue to the next filter or control. - to filter out a message before it is dispatched to a control or form. For example, to stop the event of a control from being dispatched to the control, you implement the method and return a `true` value when the message occurs. You can also use this method to perform code work that you might need to do before the message is dispatched. - + to filter out a message before it is dispatched to a control or form. For example, to stop the event of a control from being dispatched to the control, you implement the method and return a `true` value when the message occurs. You can also use this method to perform code work that you might need to do before the message is dispatched. + ]]> diff --git a/xml/System.Windows.Forms/IWin32Window.xml b/xml/System.Windows.Forms/IWin32Window.xml index 7ac64f74c91..9562345d6bf 100644 --- a/xml/System.Windows.Forms/IWin32Window.xml +++ b/xml/System.Windows.Forms/IWin32Window.xml @@ -45,7 +45,7 @@ ## Examples - The following example sets the property of `label1` to the current of `Form1`. This example assumes that you have a called `Form1` with a called `label1` on it. + The following example sets the property of `label1` to the current of `Form1`. This example assumes that you have a called `Form1` with a called `label1` on it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic IWin32Window Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/IWin32Window/Overview/source.cs" id="Snippet1"::: @@ -91,7 +91,7 @@ ## Examples - The following example sets the property of `label1` to the current of `Form1`. This example assumes that you have a called `Form1` with a called `label1` on it. + The following example sets the property of `label1` to the current of `Form1`. This example assumes that you have a called `Form1` with a called `label1` on it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic IWin32Window Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/IWin32Window/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/IWindowTarget.xml b/xml/System.Windows.Forms/IWindowTarget.xml index b8dd4e5e721..40838e045ba 100644 --- a/xml/System.Windows.Forms/IWindowTarget.xml +++ b/xml/System.Windows.Forms/IWindowTarget.xml @@ -23,11 +23,11 @@ Defines the communication layer between a control and the Windows API. - class implements this interface internally. - + class implements this interface internally. + ]]> @@ -64,11 +64,11 @@ The new handle of the . Sets the handle of the to the specified handle. - method is called when the window handle of the control has changed. - + method is called when the window handle of the control has changed. + ]]> diff --git a/xml/System.Windows.Forms/ImageIndexConverter.xml b/xml/System.Windows.Forms/ImageIndexConverter.xml index 98e8b1643e1..fac00af8e13 100644 --- a/xml/System.Windows.Forms/ImageIndexConverter.xml +++ b/xml/System.Windows.Forms/ImageIndexConverter.xml @@ -37,7 +37,7 @@ The class is used to convert index values of an to and from other data types, typically . For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). > [!NOTE] -> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. +> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. ]]> @@ -72,7 +72,7 @@ . Instead, call the method of . For more information, see the examples in the base class. + Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. ]]> @@ -243,7 +243,7 @@ ## Remarks Returns a collection of index values for image lists associated with the property of the `context` parameter. If an is not found, then the parent of the component will be searched for such a list. - Typically the method is called to before an attempt is made to use the and methods. + Typically the method is called to before an attempt is made to use the and methods. ]]> @@ -289,11 +289,11 @@ method is exclusive, then no other values are valid. This is typical of an enumerated data type. If the list is not exclusive, then there are other valid values besides the list of standard values that provides. + If the list returned by the method is exclusive, then no other values are valid. This is typical of an enumerated data type. If the list is not exclusive, then there are other valid values besides the list of standard values that provides. As implemented in this type converter, this method always returns `false`. - Typically the method is called to before an attempt is made to use the and methods. + Typically the method is called to before an attempt is made to use the and methods. ]]> @@ -338,7 +338,7 @@ always returns `true` since this object supports a standard set of index values for images that can be picked from a list. + As implemented in this class, always returns `true` since this object supports a standard set of index values for images that can be picked from a list. ]]> diff --git a/xml/System.Windows.Forms/ImageKeyConverter.xml b/xml/System.Windows.Forms/ImageKeyConverter.xml index 2b339858d5d..0ea13b22d79 100644 --- a/xml/System.Windows.Forms/ImageKeyConverter.xml +++ b/xml/System.Windows.Forms/ImageKeyConverter.xml @@ -36,7 +36,7 @@ The class is used to convert key values of an to and from other data types. For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). > [!NOTE] -> Typically, you do not directly create an instance of an . Instead, call the method of the class. For more information, see the examples in the base class. +> Typically, you do not directly create an instance of an . Instead, call the method of the class. For more information, see the examples in the base class. ]]> @@ -251,7 +251,7 @@ supports `null` as a standard value, the method returns a collection containing a single empty string. If no image list is found, and `null` is not supported as a standard value, returns an empty collection. + If no image list is found, and the supports `null` as a standard value, the method returns a collection containing a single empty string. If no image list is found, and `null` is not supported as a standard value, returns an empty collection. ]]> @@ -293,11 +293,11 @@ method is exclusive, no other values are valid. This is typical of an enumerated data type. If the list is not exclusive, there are other valid values besides the list of standard values that provides. + If the list returned by the method is exclusive, no other values are valid. This is typical of an enumerated data type. If the list is not exclusive, there are other valid values besides the list of standard values that provides. As implemented in this type converter, this method always returns `true`. - Typically, you should call the method before you attempt to use the and methods. + Typically, you should call the method before you attempt to use the and methods. ]]> @@ -339,7 +339,7 @@ class, the method always returns `true` since supports a standard set of index values for images that can be picked from a list. + As implemented in the class, the method always returns `true` since supports a standard set of index values for images that can be picked from a list. ]]> diff --git a/xml/System.Windows.Forms/ImageList+ImageCollection.xml b/xml/System.Windows.Forms/ImageList+ImageCollection.xml index d987ca8ebbb..4793d5492ae 100644 --- a/xml/System.Windows.Forms/ImageList+ImageCollection.xml +++ b/xml/System.Windows.Forms/ImageList+ImageCollection.xml @@ -119,7 +119,7 @@ ## Examples - The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form that contains a button named `Button1`. The example assumes the existence of FeatherTexture.bmp and Gone Fishing.bmp at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system or exist at another location. + The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form that contains a button named `Button1`. The example assumes the existence of FeatherTexture.bmp and Gone Fishing.bmp at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system or exist at another location. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProviderAndImageListExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/SetHelpNavigator/form1.cs" id="Snippet2"::: @@ -337,7 +337,7 @@ to add several images to the collection. To add a single item, use one of the methods. + Use to add several images to the collection. To add a single item, use one of the methods. ]]> @@ -387,7 +387,7 @@ ## Examples - The following example demonstrates how to use . To run this example, paste the following code into a Windows Form that contains an named `imageList1` and a button and call the `AddStripToCollection` method in this example when handling the button's event. + The following example demonstrates how to use . To run this example, paste the following code into a Windows Form that contains an named `imageList1` and a button and call the `AddStripToCollection` method in this example when handling the button's event. :::code language="csharp" source="~/snippets/csharp/System.Drawing.Printing/PageSettings/Overview/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Drawing.Printing/PageSettings/Overview/form1.vb" id="Snippet1"::: @@ -486,7 +486,7 @@ method throws a exception. + This implementation of the method throws a exception. ]]> @@ -529,7 +529,7 @@ method returns `false`. + The name of an image corresponds to its key. The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, the method returns `false`. ]]> @@ -575,7 +575,7 @@ to be created. + Counting the images forces the to be created. ]]> @@ -614,7 +614,7 @@ . + You can check this property without forcing the creation of a . ]]> @@ -695,7 +695,7 @@ throws a exception. + This implementation of throws a exception. ]]> @@ -736,9 +736,9 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. - The name of an image corresponds to its key in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, the method returns -1. + The name of an image corresponds to its key in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, the method returns -1. ]]> @@ -832,7 +832,7 @@ method. + The returned bitmap is a copy of the original image and should be disposed of using the method. ]]> @@ -924,7 +924,7 @@ ## Remarks The name of an image corresponds to its key, and an image key is not case-sensitive. - If none of the images contained in the have keys, returns an empty . + If none of the images contained in the have keys, returns an empty . ]]> @@ -970,7 +970,7 @@ throws a exception. + This implementation of throws a exception. ]]> @@ -1411,7 +1411,7 @@ This member is an explicit interface member implementation. It can be used only , use the method. + To add an item to the , use the method. ]]> @@ -1554,7 +1554,7 @@ This member is an explicit interface member implementation. It can be used only class directly. To remove an item from the , use the method. + You cannot change the class directly. To remove an item from the , use the method. ]]> diff --git a/xml/System.Windows.Forms/ImageList.xml b/xml/System.Windows.Forms/ImageList.xml index 7f648a73a90..e5ee15d2624 100644 --- a/xml/System.Windows.Forms/ImageList.xml +++ b/xml/System.Windows.Forms/ImageList.xml @@ -68,7 +68,7 @@ ## Remarks is typically used by other controls, such as , , or . You can add bitmaps or icons to the , and the other controls are able to use the images as they require. - uses a handle to manage the list of images. The is not created until certain operations, such as getting the or calling , are performed on the image list. Performing other operations, such as setting the or , will cause the to be recreated. Therefore, you should perform these operations before you add images to the . In addition, when you work with forms that will be localized, you should always add an and images when the `Language` property of a form is set to `Default`. Changing the form's language before you add images will corrupt the application resource files. + uses a handle to manage the list of images. The is not created until certain operations, such as getting the or calling , are performed on the image list. Performing other operations, such as setting the or , will cause the to be recreated. Therefore, you should perform these operations before you add images to the . In addition, when you work with forms that will be localized, you should always add an and images when the `Language` property of a form is set to `Default`. Changing the form's language before you add images will corrupt the application resource files. ## Examples The following code example shows how to select, remove, and display images. @@ -124,12 +124,12 @@ |Item|Description| |----------|-----------------| -||In .NET Framework and .NET (Core) versions through .NET 7, the default is . In .NET 8 and later versions, the default is .| -||The default is a object with a height and width of 16 by 16.| -||The default value is .| +||In .NET Framework and .NET (Core) versions through .NET 7, the default is . In .NET 8 and later versions, the default is .| +||The default is a object with a height and width of 16 by 16.| +||The default value is .| ## Examples - The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. + The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProviderAndImageListExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/SetHelpNavigator/form1.cs" id="Snippet2"::: @@ -170,7 +170,7 @@ constructor enables you to associate a with any object. By associating the like this, you hand over control of the lifetime of the to the . This can be useful if you use a number of components in your application and want to dispose of all of them simultaneously. For example, if you associate a , an , and a with a , calling on the Container will force disposal of all of these components as well. + The constructor enables you to associate a with any object. By associating the like this, you hand over control of the lifetime of the to the . This can be useful if you use a number of components in your application and want to dispose of all of them simultaneously. For example, if you associate a , an , and a with a , calling on the Container will force disposal of all of these components as well. ]]> @@ -217,7 +217,7 @@ for the image list is recreated. Because setting the property causes the handle to be recreated, you should set prior to setting the property. When the handle for the has been created, setting the or properties in code, after setting the property, will cause the collection of images set for the property to be deleted. + When you set the color depth to a new value, the for the image list is recreated. Because setting the property causes the handle to be recreated, you should set prior to setting the property. When the handle for the has been created, setting the or properties in code, after setting the property, will cause the collection of images set for the property to be deleted. ]]> @@ -306,7 +306,7 @@ , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. + The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProviderAndImageListExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/SetHelpNavigator/form1.cs" id="Snippet2"::: @@ -573,7 +573,7 @@ If the image collection has not yet been created, it is created when you retrieve this property. ## Examples - The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. + The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProviderAndImageListExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/SetHelpNavigator/form1.cs" id="Snippet2"::: @@ -626,12 +626,12 @@ ## Remarks Setting the property prior to adding images to the image collection causes the images to be resized to the image size specified. - When you set the property to a new value, the for the image list is recreated. + When you set the property to a new value, the for the image list is recreated. - Because setting the property causes the handle to be recreated, you should set prior to setting the property. When the handle for the has been created, setting the or properties in code, after setting the property, will cause the collection of images set for the property to be deleted. + Because setting the property causes the handle to be recreated, you should set prior to setting the property. When the handle for the has been created, setting the or properties in code, after setting the property, will cause the collection of images set for the property to be deleted. ## Examples - The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. + The following code example demonstrates constructing an , adding images to the property, setting the property, and using the method. To run this example, place it in a form containing a button named `Button1`. The example assumes the existence of `FeatherTexture.bmp` and `Gone Fishing.bmp` at c:\Windows\\. Change the example accordingly if the bitmaps do not exist on your system, or exist at another location. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.HelpProviderAndImageListExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/HelpProvider/SetHelpNavigator/form1.cs" id="Snippet2"::: @@ -755,10 +755,10 @@ is recreated by actions such as changing the or . Special processing may be required because setting the or the property after setting the property causes the handle to be recreated and the images to be discarded. + You can use this event to do special processing when the is recreated by actions such as changing the or . Special processing may be required because setting the or the property after setting the property causes the handle to be recreated and the images to be discarded. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ImageList1`. Then ensure that the event handler is associated with the event. @@ -861,7 +861,7 @@ method returns a string that includes the and properties. + The method returns a string that includes the and properties. ]]> diff --git a/xml/System.Windows.Forms/ImeMode.xml b/xml/System.Windows.Forms/ImeMode.xml index 980bb4eeed7..4038b08a966 100644 --- a/xml/System.Windows.Forms/ImeMode.xml +++ b/xml/System.Windows.Forms/ImeMode.xml @@ -36,7 +36,7 @@ An Input Method Editor (IME) allows users to enter and edit Chinese, Japanese, and Korean characters. The IME is an essential component for writing Chinese, Japanese, and Korean scripts. These writing systems have more characters than can be encoded for a regular keyboard. The IMEs for these languages use sequences of base characters that describe an individual character or group of characters to allow you to enter a larger set of characters. Base characters can be component letters from Hangul syllables, phonetic components for Japanese Kanji characters, or various combinations for Chinese characters. > [!IMPORTANT] -> The user can interactively change the unless it has been programmatically set to Disable. In this case, the user will not be able to use the IME. +> The user can interactively change the unless it has been programmatically set to Disable. In this case, the user will not be able to use the IME. > > The property is ignored on Windows 8 when the global input mode is in effect. For more info, see [Switch Text Input Changed from Per-Thread to Per-User](https://go.microsoft.com/fwlink/?LinkID=256509). diff --git a/xml/System.Windows.Forms/InputLanguage.xml b/xml/System.Windows.Forms/InputLanguage.xml index 42e755feea1..f3fd6c64ec9 100644 --- a/xml/System.Windows.Forms/InputLanguage.xml +++ b/xml/System.Windows.Forms/InputLanguage.xml @@ -36,7 +36,7 @@ ## Remarks An input language is a culture/keyboard layout pair that determines how the physical keys on a keyboard map or plot to characters in a language. The input language is based on a Windows input locale identifier, such as that returned by the Platform SDK function, `GetKeyboardLayout`. The input locale identifier is also called a handle to a keyboard layout (HKL) value. - Use the `static` methods provided to find all installed mappings of the system and to change the input language for a thread or process. Call to get the current input language. Call for the default input language. Call to get all the installed languages in this system. After you have a list of all the installed languages, use to change the current input language to a different language. + Use the `static` methods provided to find all installed mappings of the system and to change the input language for a thread or process. Call to get the current input language. Call for the default input language. Call to get all the installed languages in this system. After you have a list of all the installed languages, use to change the current input language to a different language. @@ -262,7 +262,7 @@ ## Remarks -The method returns the first keyboard layout with matching `culture` from the list of all installed keyboard layouts. It might return an unexpected value if multiple keyboards are installed under a single user language. +The method returns the first keyboard layout with matching `culture` from the list of all installed keyboard layouts. It might return an unexpected value if multiple keyboards are installed under a single user language. Specifically, this method performs the following operations: @@ -275,12 +275,12 @@ Specifically, this method performs the following operations: 4. If no keyboard is found, returns `null`. > [!NOTE] -> The method never tries to load or install an additional keyboard if one has not already been installed for `culture`. Use the Platform SDK function, `LoadKeyboardLayout`, to install an additional keyboard. +> The method never tries to load or install an additional keyboard if one has not already been installed for `culture`. Use the Platform SDK function, `LoadKeyboardLayout`, to install an additional keyboard. ## Examples The following code example sets the default input language as the current input language. - First, is called to get the system default language. Next, is called to get the current input language. The results are printed in a text box. Then, calling with the default input language changes the current input language to the default. The new current input language is displayed in a text box. + First, is called to get the system default language. Next, is called to get the current input language. The results are printed in a text box. Then, calling with the default input language changes the current input language to the default. The new current input language is displayed in a text box. This code assumes that `textBox1` has been instantiated. @@ -363,7 +363,7 @@ Specifically, this method performs the following operations: to get the handle and prints the results in a text box. The example requires that `textBox1` has been instantiated. + The following code example gets the current input language. Then it calls to get the handle and prints the results in a text box. The example requires that `textBox1` has been instantiated. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic InputLanguage.Handle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/InputLanguage/Handle/source.cs" id="Snippet1"::: @@ -405,7 +405,7 @@ Specifically, this method performs the following operations: to get the installed languages. A text box displays the list of language names. + The following code example retrieves all the input languages installed on the computer and displays their names. The code calls to get the installed languages. A text box displays the list of language names. This code assumes that `textBox1` has been instantiated and that `textBox1.MultiLine` has been set to `true`. @@ -451,7 +451,7 @@ Specifically, this method performs the following operations: ## Examples The following code example gets the culture associated with the current input language and displays the culture name. - First, is called to get the current input language. Then, is called to get the culture information for this input language. Finally, is retrieved and displayed in a text box. + First, is called to get the current input language. Then, is called to get the culture information for this input language. Finally, is retrieved and displayed in a text box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic InputLanguage.LayoutName Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/InputLanguage/LayoutName/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/InputLanguageChangedEventArgs.xml b/xml/System.Windows.Forms/InputLanguageChangedEventArgs.xml index ed2a03e0f0c..f9515c7a38d 100644 --- a/xml/System.Windows.Forms/InputLanguageChangedEventArgs.xml +++ b/xml/System.Windows.Forms/InputLanguageChangedEventArgs.xml @@ -34,7 +34,7 @@ to make decisions about whether to change Input Method Editors (IMEs) or swap right-to-left values. You can also change the of a thread and the properties so that different resources get picked up. + You can use the data from the to make decisions about whether to change Input Method Editors (IMEs) or swap right-to-left values. You can also change the of a thread and the properties so that different resources get picked up. An identifies the locale and the character set of the new input language. @@ -266,7 +266,7 @@ This property is the Win32 character set that the user switched to. On ANSI systems, this property can be used to create fonts that can display the correct character set. On Unicode systems, you typically do not need to use this property. Instead, use the class for these functionalities. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -317,7 +317,7 @@ The property specifies a and defines a set of user preference information dependent on the language, sublanguage, country/region, and cultural conventions of the user. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -366,7 +366,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/InputLanguageChangingEventArgs.xml b/xml/System.Windows.Forms/InputLanguageChangingEventArgs.xml index ed85c0b30f0..1bc631ad556 100644 --- a/xml/System.Windows.Forms/InputLanguageChangingEventArgs.xml +++ b/xml/System.Windows.Forms/InputLanguageChangingEventArgs.xml @@ -34,7 +34,7 @@ class to prepare to change Input Method Editors (IME) or swap right-to-left values. You can also change a thread's and properties so that different resources get picked up. To prevent the input language from changing, set the property to `true`. + You can use the data from the class to prepare to change Input Method Editors (IME) or swap right-to-left values. You can also change a thread's and properties so that different resources get picked up. To prevent the input language from changing, set the property to `true`. An identifies the requested input language and the character set of new input language. The property identifies the locale of the requested language. @@ -45,7 +45,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -177,7 +177,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -225,7 +225,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. @@ -275,7 +275,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Form1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/InvalidateEventArgs.xml b/xml/System.Windows.Forms/InvalidateEventArgs.xml index 61bb3f7dac3..c45c564b189 100644 --- a/xml/System.Windows.Forms/InvalidateEventArgs.xml +++ b/xml/System.Windows.Forms/InvalidateEventArgs.xml @@ -25,23 +25,23 @@ Provides data for the event. - event occurs when a control's display is updated. An specifies the rectangle that contains the invalidated window area. - - For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event occurs when a control's display is updated. An specifies the rectangle that contains the invalidated window area. + + For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet40"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet40"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet40"::: + ]]> @@ -118,16 +118,16 @@ Gets the that contains the invalidated window area. The invalidated window area. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet40"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet40"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet40"::: + ]]> diff --git a/xml/System.Windows.Forms/ItemBoundsPortion.xml b/xml/System.Windows.Forms/ItemBoundsPortion.xml index bab1900537e..b604f35d622 100644 --- a/xml/System.Windows.Forms/ItemBoundsPortion.xml +++ b/xml/System.Windows.Forms/ItemBoundsPortion.xml @@ -24,11 +24,11 @@ Specifies a portion of the list view item from which to retrieve the bounding rectangle. - method of the control. This enumeration is also used when calling the method of the class. - + method of the control. This enumeration is also used when calling the method of the class. + ]]> diff --git a/xml/System.Windows.Forms/ItemChangedEventArgs.xml b/xml/System.Windows.Forms/ItemChangedEventArgs.xml index ab27a2ffe7d..b6519304672 100644 --- a/xml/System.Windows.Forms/ItemChangedEventArgs.xml +++ b/xml/System.Windows.Forms/ItemChangedEventArgs.xml @@ -25,23 +25,23 @@ Provides data for the event. - event occurs whenever the item in a list is changed. For example, this event will occur when the text of the list item is changed to a new value. This event is not raised when the item is moved to a new position within the list because of a new item being added. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `CurrencyManager1`. Then ensure that the event handler is associated with the event. - + event occurs whenever the item in a list is changed. For example, this event will occur when the text of the list item is changed to a new value. This event is not raised when the item is moved to a new position within the list because of a new item being added. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `CurrencyManager1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet191"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet191"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet191"::: + ]]> @@ -81,16 +81,16 @@ Indicates the position of the item being changed within the list. The zero-based index to the item being changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `CurrencyManager1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `CurrencyManager1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet191"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet191"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet191"::: + ]]> diff --git a/xml/System.Windows.Forms/ItemCheckEventArgs.xml b/xml/System.Windows.Forms/ItemCheckEventArgs.xml index b9136aa61a9..c262fa68fda 100644 --- a/xml/System.Windows.Forms/ItemCheckEventArgs.xml +++ b/xml/System.Windows.Forms/ItemCheckEventArgs.xml @@ -31,25 +31,25 @@ Provides data for the event of the and controls. - event occurs when the checked state of an item in a checked list box changes. The class specifies the index of the item to change, the current value of the check box for the item, and the new value to set for the check box. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates a checked control that handles the event. The method uses the and properties of the object to retrieve and tally the price of the menu items selected. To run this example paste the following code in a form containing a named `ListView1` and a named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure all events are associated with their event-handling methods. - + event occurs when the checked state of an item in a checked list box changes. The class specifies the index of the item to change, the current value of the check box for the item, and the new value to set for the check box. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates a checked control that handles the event. The method uses the and properties of the object to retrieve and tally the price of the menu items selected. To run this example paste the following code in a form containing a named `ListView1` and a named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure all events are associated with their event-handling methods. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet2"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet2"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet2"::: + ]]> @@ -131,23 +131,23 @@ Gets a value indicating the current state of the item's check box. One of the values. - before the check state change to apply is made. - - - -## Examples - The following code example demonstrates a checked control that handles the event. The method uses the and properties of the object to retrieve and tally the price of the menu items selected. To run this example paste the following code in a form containing a named `ListView1` and a named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure all events are associated with their event-handling methods. - + before the check state change to apply is made. + + + +## Examples + The following code example demonstrates a checked control that handles the event. The method uses the and properties of the object to retrieve and tally the price of the menu items selected. To run this example paste the following code in a form containing a named `ListView1` and a named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure all events are associated with their event-handling methods. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet2"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet2"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet2"::: + ]]> @@ -187,23 +187,23 @@ Gets the zero-based index of the item to change. The zero-based index of the item to change. - is being changed. - - - -## Examples - The following code example demonstrates a checked control that handles the event. The method uses the and properties of the object to retrieve and tally the price of the menu items selected. To run this example paste the following code in a form containing a named `ListView1` and a named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure all events are associated with their event-handling methods. - + is being changed. + + + +## Examples + The following code example demonstrates a checked control that handles the event. The method uses the and properties of the object to retrieve and tally the price of the menu items selected. To run this example paste the following code in a form containing a named `ListView1` and a named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure all events are associated with their event-handling methods. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet2"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet2"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.vb" id="Snippet2"::: + ]]> @@ -246,21 +246,21 @@ Gets or sets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate. One of the values. - control. In addition to determining the new check state, you can use this property in an event handler for the event to change the state to a different check state than the one specified. For example, if the user placed a check mark next to an item in the that you have determined should not be checked based on the state of your application, you can override the change in the check mark state by setting this property to its previous setting or to a different check state. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `CheckedListBox1`. Then ensure that the event handler is associated with the event. - + control. In addition to determining the new check state, you can use this property in an event handler for the event to change the state to a different check state than the one specified. For example, if the user placed a check mark next to an item in the that you have determined should not be checked based on the state of your application, you can override the change in the check mark state by setting this property to its previous setting or to a different check state. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `CheckedListBox1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet156"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet156"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet156"::: + ]]> diff --git a/xml/System.Windows.Forms/ItemCheckedEventArgs.xml b/xml/System.Windows.Forms/ItemCheckedEventArgs.xml index 65731388043..04ee5008b3c 100644 --- a/xml/System.Windows.Forms/ItemCheckedEventArgs.xml +++ b/xml/System.Windows.Forms/ItemCheckedEventArgs.xml @@ -30,16 +30,16 @@ Provides data for the event of the control. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet475"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet475"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet475"::: + ]]> @@ -112,16 +112,16 @@ Gets the whose checked state is changing. The whose checked state is changing. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet475"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet475"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet475"::: + ]]> diff --git a/xml/System.Windows.Forms/ItemDragEventArgs.xml b/xml/System.Windows.Forms/ItemDragEventArgs.xml index e066e7607f7..541106685cd 100644 --- a/xml/System.Windows.Forms/ItemDragEventArgs.xml +++ b/xml/System.Windows.Forms/ItemDragEventArgs.xml @@ -43,7 +43,7 @@ ## Examples - The following example illustrates the use of when enabling drag-and-drop operations within a . The property determines whether the dragged node should be moved or copied to its destination. The node, represented by the property, is then passed to the control's method along with a value indicating the desired effect. + The following example illustrates the use of when enabling drag-and-drop operations within a . The property determines whether the dragged node should be moved or copied to its destination. The node, represented by the property, is then passed to the control's method along with a value indicating the desired effect. For the complete example, see the reference topic. @@ -182,7 +182,7 @@ ## Examples - The following example illustrates the use of the class when you enable drag-and-drop operations within a control. The property determines whether the dragged node should be moved or copied to its destination. The node, represented by the property, is then passed to the control's method, along with a value that indicates the desired effect of the drag-and-drop operation. + The following example illustrates the use of the class when you enable drag-and-drop operations within a control. The property determines whether the dragged node should be moved or copied to its destination. The node, represented by the property, is then passed to the control's method, along with a value that indicates the desired effect of the drag-and-drop operation. For the complete example, see the reference topic. @@ -237,7 +237,7 @@ ## Examples - The following example illustrates the use of when enabling drag-and-drop operations within a control. The property determines whether the dragged node should be moved or copied to its destination. The node, represented by the property, is then passed to the control's method along with a value that indicates the desired effect of the drag-and-drop operation. + The following example illustrates the use of when enabling drag-and-drop operations within a control. The property determines whether the dragged node should be moved or copied to its destination. The node, represented by the property, is then passed to the control's method along with a value that indicates the desired effect of the drag-and-drop operation. For the complete example, see the reference topic. diff --git a/xml/System.Windows.Forms/KeyEventArgs.xml b/xml/System.Windows.Forms/KeyEventArgs.xml index c09f673fa4d..d0d405da103 100644 --- a/xml/System.Windows.Forms/KeyEventArgs.xml +++ b/xml/System.Windows.Forms/KeyEventArgs.xml @@ -261,7 +261,7 @@ is implemented differently by different controls within Windows Forms. For controls like which subclass native Win32 controls, it is interpreted to mean that the key message should not be passed to the underlying native control. If you set `Handled` to true on a , that control will not pass the key press `events` to the underlying Win32 text box control, but it will still display the characters that the user typed. + is implemented differently by different controls within Windows Forms. For controls like which subclass native Win32 controls, it is interpreted to mean that the key message should not be passed to the underlying native control. If you set `Handled` to true on a , that control will not pass the key press `events` to the underlying Win32 text box control, but it will still display the characters that the user typed. If you want to prevent the current control from receiving a key press, use the property. @@ -379,12 +379,12 @@ to extract information from the property. Use the bitwise AND operator to compare data returned by with constants in to obtain information about which keys the user pressed. To determine whether a specific modifier key was pressed, use the , , and properties. + You can use constants from to extract information from the property. Use the bitwise AND operator to compare data returned by with constants in to obtain information about which keys the user pressed. To determine whether a specific modifier key was pressed, use the , , and properties. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -428,7 +428,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -472,7 +472,7 @@ , , and properties. Modifier flags can be combined with bitwise OR. + To determine whether a specific modifier key was pressed, use the , , and properties. Modifier flags can be combined with bitwise OR. @@ -575,7 +575,7 @@ ## Remarks You can assign `true` to this property in an event handler such as in order to prevent user input. - Setting to `true` also sets to `true`. + Setting to `true` also sets to `true`. diff --git a/xml/System.Windows.Forms/KeyPressEventArgs.xml b/xml/System.Windows.Forms/KeyPressEventArgs.xml index ac919405dab..7870216a834 100644 --- a/xml/System.Windows.Forms/KeyPressEventArgs.xml +++ b/xml/System.Windows.Forms/KeyPressEventArgs.xml @@ -40,7 +40,7 @@ With each event, a is passed. A is passed with each and event. A specifies whether any modifier keys (CTRL, SHIFT, or ALT) were pressed along with another key. (This modifier information can also be obtained through the property of the class.) - Set to `true` to cancel the `KeyPress` event. This keeps the control from processing the key press. + Set to `true` to cancel the `KeyPress` event. This keeps the control from processing the key press. > [!NOTE] > Some controls will process certain key strokes on . For example, processes the Enter key before is called. In such cases, you cannot cancel the event, and must cancel the key stroke from instead. @@ -50,7 +50,7 @@ ## Examples - The following example illustrates using the to count keys as they are pressed and to display the results after each key press. is then set to true to keep the operating system from further processing the key. The example assumes a form with a placed on it. + The following example illustrates using the to count keys as they are pressed and to display the results after each key press. is then set to true to keep the operating system from further processing the key. The example assumes a form with a placed on it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic KeyPressEventArgs Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/KeyPressEventArgs/Overview/source.cs" id="Snippet1"::: @@ -164,7 +164,7 @@ to `true` to cancel the `KeyPress` event. + If the event is not handled, it will be sent to the operating system for default processing. Set to `true` to cancel the `KeyPress` event. @@ -225,7 +225,7 @@ property to sample keystrokes at run time and to modify keystrokes under special run-time circumstances. For example, you can use to disable non-numeric keypresses when the user enters a ZIP code, change all alphabetical keypresses to uppercase in a data entry field, or monitor the keyboard or other key input device for specific key combinations. + Use the property to sample keystrokes at run time and to modify keystrokes under special run-time circumstances. For example, you can use to disable non-numeric keypresses when the user enters a ZIP code, change all alphabetical keypresses to uppercase in a data entry field, or monitor the keyboard or other key input device for specific key combinations. You can get or set the following keys: diff --git a/xml/System.Windows.Forms/KeyPressEventHandler.xml b/xml/System.Windows.Forms/KeyPressEventHandler.xml index 38db2fa6638..65703a8e18d 100644 --- a/xml/System.Windows.Forms/KeyPressEventHandler.xml +++ b/xml/System.Windows.Forms/KeyPressEventHandler.xml @@ -41,24 +41,24 @@ A that contains the event data. Represents the method that will handle the event of a . - to `true` to cancel the `KeyPress` event. This keeps the control from processing the key press. - - When you create a 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples + to `true` to cancel the `KeyPress` event. This keeps the control from processing the key press. + + When you create a 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/KeyPressEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/KeyPressEventArgs/Handled/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/KeyPressEventArgs/Handled/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/KeyPressEventArgs/Handled/form1.vb" id="Snippet1"::: + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Control.KeyDown/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/KeyDown/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/KeyDown/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/KeyDown/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/Keys.xml b/xml/System.Windows.Forms/Keys.xml index 672b751e9a1..7292fd1ba9c 100644 --- a/xml/System.Windows.Forms/Keys.xml +++ b/xml/System.Windows.Forms/Keys.xml @@ -57,7 +57,7 @@ > [!NOTE] > This enumeration provides no way to test whether the CAPS LOCK or NUM LOCK keys are currently activated. You can use one of the following techniques to determine if these keys are activated: -- Call the method of the class. +- Call the method of the class. - For finer control, use the Windows API functions `GetKeyState`, `GetAsyncKeyState`, or `GetKeyboardState` defined in user32.dll, to do this. For more information about calling native functions, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). diff --git a/xml/System.Windows.Forms/KeysConverter.xml b/xml/System.Windows.Forms/KeysConverter.xml index c5a5d9efc9b..d8754df2af3 100644 --- a/xml/System.Windows.Forms/KeysConverter.xml +++ b/xml/System.Windows.Forms/KeysConverter.xml @@ -35,19 +35,19 @@ Provides a to convert objects to and from other representations. - type converter is used to convert instances to and from their corresponding localized representations. - - - -## Examples - The following code example demonstrates how to use the class to convert a to a . This example assumes that you have a named `TextBox1` on a named `Form1`. - + type converter is used to convert instances to and from their corresponding localized representations. + + + +## Examples + The following code example demonstrates how to use the class to convert a to a . This example assumes that you have a named `TextBox1` on a named `Form1`. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/KeysConverter/Overview/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/KeysConverter/Overview/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/KeysConverter/Overview/Form1.vb" id="Snippet1"::: + ]]> @@ -85,13 +85,13 @@ Initializes an instance of the class. - class. - - Typically, you do not directly create an instance of a . Instead, call the method of class. For more information, see the examples in the base class. - + class. + + Typically, you do not directly create an instance of a . Instead, call the method of class. For more information, see the examples in the base class. + ]]> @@ -140,16 +140,16 @@ if the conversion can be performed; otherwise, . - method is specialized to return `true` if the `sourceType` parameter is of type or array; otherwise, it defers evaluation to the base implementation of this method. - + method is specialized to return `true` if the `sourceType` parameter is of type or array; otherwise, it defers evaluation to the base implementation of this method. + ]]> - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + The context can be used to extract additional information about the environment this converter is being invoked from. This may be , so you should always check. Also, properties on the context object may also return . @@ -191,16 +191,16 @@ if the conversion can be performed; otherwise, . - method is specialized to return `true` if the `destinationType` parameter is of type array; otherwise, it defers evaluation to the base implementation of this method. - + method is specialized to return `true` if the `destinationType` parameter is of type array; otherwise, it defers evaluation to the base implementation of this method. + ]]> - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + The context can be used to extract additional information about the environment this converter is being invoked from. This may be , so you should always check. Also, properties on the context object may also return . @@ -243,31 +243,31 @@ An that represents the first key to compare. An that represents the second key to compare. Compares two key values for equivalence. - An integer indicating the relationship between the two parameters. - - Value Type - - Condition - - A negative integer. - - is less than . - + An integer indicating the relationship between the two parameters. + + Value Type + + Condition + + A negative integer. + + is less than . + 0 - - equals . - - A positive integer. - - is greater than . - + + equals . + + A positive integer. + + is greater than . + - to compare the two objects. - + to compare the two objects. + ]]> @@ -317,17 +317,17 @@ Converts the specified object to the converter's native type. An object that represents the converted . - method is specialized to convert objects of type or array. In this case, it will return an object of type . Otherwise, it defers evaluation to the base implementation of this method. - + method is specialized to convert objects of type or array. In this case, it will return an object of type . Otherwise, it defers evaluation to the base implementation of this method. + ]]> - An invalid key combination was supplied. - - -or- - + An invalid key combination was supplied. + + -or- + An invalid key name was supplied. The parameter can be used to extract additional information about the environment this converter is being invoked from. This may be , so you should always check. Also, properties on the context object may also return . @@ -382,18 +382,18 @@ Converts the specified object to the specified destination type. An that represents the converted . - method is specialized to convert objects of type or . In this case, it will return an object of type . Otherwise, it defers evaluation to the base implementation of this method. - + method is specialized to convert objects of type or . In this case, it will return an object of type . Otherwise, it defers evaluation to the base implementation of this method. + ]]> is . - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + The context parameter can be used to extract additional information about the environment this converter is being invoked from. This may be , so you should always check for this return value. Also, properties on the context object may also return . @@ -440,11 +440,11 @@ Returns a collection of standard values for the data type that this type converter is designed for when provided with a format context. A that holds a standard set of valid values, which can be empty if the data type does not support a standard set of values. - @@ -485,13 +485,13 @@ if the collection returned from is an exhaustive list of possible values; otherwise, if other values are possible. The default implementation for this method always returns . - data type. If the list is not exclusive, then there are other valid values besides the list of standard values provides. - + data type. If the list is not exclusive, then there are other valid values besides the list of standard values provides. + ]]> @@ -531,11 +531,11 @@ Gets a value indicating whether this object supports a standard set of values that can be picked from a list. Always returns . - diff --git a/xml/System.Windows.Forms/Label.xml b/xml/System.Windows.Forms/Label.xml index e5fb284e0cc..e2569d59be0 100644 --- a/xml/System.Windows.Forms/Label.xml +++ b/xml/System.Windows.Forms/Label.xml @@ -81,7 +81,7 @@ ## Remarks controls are typically used to provide descriptive text for a control. For example, you can use a to add descriptive text for a control to inform the user about the type of data expected in the control. controls can also be used to add descriptive text to a to provide the user with helpful information. For example, you can add a to the top of a that provides instructions to the user on how to input data in the controls on the form. controls can be also used to display run time information on the status of an application. For example, you can add a control to a form to display the status of each file as a list of files is processed. - A participates in the tab order of a form, but does not receive focus (the next control in the tab order receives focus). For example, if the property is set to `true`, and a mnemonic character - the first character after an ampersand (&) - is specified in the property of the control, when a user presses ALT+ the mnemonic key, focus moves to the next control in the tab order. This feature provides keyboard navigation for a form. In addition to displaying text, the control can also display an image using the property, or a combination of the and properties. + A participates in the tab order of a form, but does not receive focus (the next control in the tab order receives focus). For example, if the property is set to `true`, and a mnemonic character - the first character after an ampersand (&) - is specified in the property of the control, when a user presses ALT+ the mnemonic key, focus moves to the next control in the tab order. This feature provides keyboard navigation for a form. In addition to displaying text, the control can also display an image using the property, or a combination of the and properties. > [!NOTE] > A can be made transparent by setting its property to `Color.Transparent`. When you use a transparent label, use only the current device coordinate system to draw on the container, or the background might paint improperly. @@ -89,7 +89,7 @@ ## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and contains an image. The image is displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and contains an image. The image is displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -133,7 +133,7 @@ ## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -188,10 +188,10 @@ to `true` to display text that extends beyond the width of the in a tooltip when the user passes over the control with the mouse. If is `true`, the label will grow to fit the text and an ellipsis will not appear. + Set to `true` to display text that extends beyond the width of the in a tooltip when the user passes over the control with the mouse. If is `true`, the label will grow to fit the text and an ellipsis will not appear. > [!IMPORTANT] -> If the font is taller than the height of the and is `true`, you must set to `false` for text to be drawn. +> If the font is taller than the height of the and is `true`, you must set to `false` for text to be drawn. ]]> @@ -261,7 +261,7 @@ When this property is set to `true`, the adjusts its width to display its entire contents. This property is typically set to `true` when you use a control to display various lengths of text, such as the status of an application process. You can also use this property when the application will display text in various languages, and the size of the text might increase or decrease based on the language settings in Windows. > [!IMPORTANT] -> If the font is taller than the height of the and is `true`, you must set to `false` for text to be drawn. +> If the font is taller than the height of the and is `true`, you must set to `false` for text to be drawn. ## Examples The following code example demonstrates the property. To run this example, paste the following code in a form and call the `InitializeLabel` method from the form's constructor or `Load` method. @@ -324,7 +324,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named Label1. Then ensure that the event handler is associated with the event. @@ -572,7 +572,7 @@ ## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -921,7 +921,7 @@ property is set to `FlatStyle.System`, any values assigned to the , , , and properties are ignored. In addition, the property ignores any property values that are not vertical property settings. Horizontally aligned settings of the property are aligned to the top of the control. For example, if you set the property to `ContentAlignment.TopCenter`, `ContentAlignment.MiddleCenter`, or `ContentAlignment.BottomCenter`, when the property is set to `FlatStyle.System`, the text in the control will be aligned to the top and center locations within the bounds of the control. + When the property is set to `FlatStyle.System`, any values assigned to the , , , and properties are ignored. In addition, the property ignores any property values that are not vertical property settings. Horizontally aligned settings of the property are aligned to the top of the control. For example, if you set the property to `ContentAlignment.TopCenter`, `ContentAlignment.MiddleCenter`, or `ContentAlignment.BottomCenter`, when the property is set to `FlatStyle.System`, the text in the control will be aligned to the top and center locations within the bounds of the control. > [!NOTE] > In the .NET Framework version 1.1, setting the property to `FlatStyle.System` does not cause the value of the property to be ignored. In addition, the property has no effect in the derived class, . @@ -1002,7 +1002,7 @@ property cannot be used at the same time as the and properties. When the property is used to display an image, the and properties are automatically set to their default settings. + The property cannot be used at the same time as the and properties. When the property is used to display an image, the and properties are automatically set to their default settings. @@ -1062,12 +1062,12 @@ control to ensure that the image is properly displayed. You can add an image to a using the property or the and properties. Images displayed in the control cannot be stretched or shrunk to fill the control if the control is larger or smaller than the image. + This property enables you to align an image within the boundaries of the control to ensure that the image is properly displayed. You can add an image to a using the property or the and properties. Images displayed in the control cannot be stretched or shrunk to fill the control if the control is larger or smaller than the image. ## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -1143,16 +1143,16 @@ and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is automatically set to `null`. + The and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is automatically set to `null`. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). -If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. ## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -1226,8 +1226,8 @@ For example, consider a button control whose property specifies the image from the image list to display on the . - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -1275,15 +1275,15 @@ If you set the property, the and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is set to `null`. + The and the properties cannot be used at the same time as the property. When the property and properties are used to display an image, the property is set to `null`. > [!NOTE] -> The will not be garbage collected if its is still referenced elsewhere. Set the property of the to `null` to enable efficient garbage collection. +> The will not be garbage collected if its is still referenced elsewhere. Set the property of the to `null` to enable efficient garbage collection. ## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -1706,7 +1706,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1912,7 +1912,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2085,7 +2085,7 @@ If you set the property, the control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -2150,7 +2150,7 @@ If you set the property, the control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: @@ -2317,7 +2317,7 @@ If you set the property, the property to `true`, the label will be sized to fit the contents of the label. If you set to `false` after calling the method, the label will receive the dimensions you specified in the call. + If you set the property to `true`, the label will be sized to fit the contents of the label. If you set to `false` after calling the method, the label will receive the dimensions you specified in the call. ]]> @@ -2368,7 +2368,7 @@ If you set the property, the property is not relevant for the class, so setting to `true` has no effect. + The property is not relevant for the class, so setting to `true` has no effect. ]]> @@ -2554,7 +2554,7 @@ If you set the property, the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named Label1. Then ensure that the event handler is associated with the event. @@ -2637,7 +2637,7 @@ If you set the property, the class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, it's recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. -You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. +You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. ]]> @@ -2688,7 +2688,7 @@ You can set the `UseCompatibleTextRendering` property to `true` for a specific c ## Examples - The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. + The following code example demonstrates how to create a control that has a three-dimensional border and an image displayed using the and properties. The control also has a caption with a mnemonic character specified. The example code uses the and properties to properly size the control on the form on which it is displayed. This example requires that an has been created and named imageList1 and that it has loaded two images. The example also requires that the code is within a form that has the namespace added to its code. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Label Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Label/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/LabelEditEventArgs.xml b/xml/System.Windows.Forms/LabelEditEventArgs.xml index fe59edc34b2..f951250175b 100644 --- a/xml/System.Windows.Forms/LabelEditEventArgs.xml +++ b/xml/System.Windows.Forms/LabelEditEventArgs.xml @@ -37,12 +37,12 @@ A specifies the index and caption of a and the caption after it has been edited by the user. This class also provides a property. You can use this property in a event handler to prevent the user from editing the label. You can also use it in an event handler to revert the change, returning the label it to its original value. This is useful when you want to validate user input before committing the change. > [!NOTE] -> Because the event takes place before the label edit is committed, calling the method in a handler for this event will sort the item using the original value. +> Because the event takes place before the label edit is committed, calling the method in a handler for this event will sort the item using the original value. ## Examples - The following code example demonstrates handling the event and using the and properties. To run the example, paste the following code in a form containing a control named `ListView1` and populated with at least 3 items. Ensure all events are associated with their event-handling methods. + The following code example demonstrates handling the event and using the and properties. To run the example, paste the following code in a form containing a control named `ListView1` and populated with at least 3 items. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView3/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LabelEditEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -195,7 +195,7 @@ ## Examples - The following code example demonstrates handling the event and using the and properties. To run the example, paste the following code in a form containing a ListView control named ListView1 and populated with at least 3 items. Ensure all events are associated with their event-handling methods. + The following code example demonstrates handling the event and using the and properties. To run the example, paste the following code in a form containing a ListView control named ListView1 and populated with at least 3 items. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView3/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LabelEditEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -242,7 +242,7 @@ event and using the and properties. To run the example, paste the following code in a form containing a ListView control named ListView1 and populated with at least 3 items. Ensure all events are associated with their event-handling methods. + The following code example demonstrates handling the event and using the and properties. To run the example, paste the following code in a form containing a ListView control named ListView1 and populated with at least 3 items. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView3/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LabelEditEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -290,7 +290,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/LayoutEventArgs.xml b/xml/System.Windows.Forms/LayoutEventArgs.xml index c19f919891e..961e19de53d 100644 --- a/xml/System.Windows.Forms/LayoutEventArgs.xml +++ b/xml/System.Windows.Forms/LayoutEventArgs.xml @@ -36,14 +36,14 @@ ## Remarks Changes to a control such as resizing, showing or hiding child controls, and adding or removing child controls make it necessary for a control to layout its child controls. A specifies the child control that has been changed and its affected property. For example, if a control has been made visible since the last layout operation, the property is affected. - The and properties are set to `null` if no values were provided when the method was called. + The and properties are set to `null` if no values were provided when the method was called. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example uses the and properties as arguments to coordinate the size of a Windows form and its controls with various property changes to both the Windows form and the controls. + The following code example uses the and properties as arguments to coordinate the size of a Windows form and its controls with various property changes to both the Windows form and the controls. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/LayoutEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -181,7 +181,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -224,12 +224,12 @@ property is set to `null` if no value was provided when the method was called. + The property is set to `null` if no value was provided when the method was called. ## Examples - The following code example uses the and properties as arguments to coordinate the size of a Windows form and its controls with various property changes to both the Windows form and the controls. + The following code example uses the and properties as arguments to coordinate the size of a Windows form and its controls with various property changes to both the Windows form and the controls. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/LayoutEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -281,12 +281,12 @@ property is affected. The property is set to `null` if no value was provided when the method was called. + If a child control has been made visible since the last layout operation, the property is affected. The property is set to `null` if no value was provided when the method was called. ## Examples - The following code example uses the and properties as arguments to coordinate the size of a Windows form and its controls with various property changes to both the Windows form and the controls. + The following code example uses the and properties as arguments to coordinate the size of a Windows form and its controls with various property changes to both the Windows form and the controls. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/LayoutEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutEventArgs/Overview/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/LeftRightAlignment.xml b/xml/System.Windows.Forms/LeftRightAlignment.xml index 8fe6c8b0b06..e99fd87cb5e 100644 --- a/xml/System.Windows.Forms/LeftRightAlignment.xml +++ b/xml/System.Windows.Forms/LeftRightAlignment.xml @@ -30,11 +30,11 @@ Specifies whether an object or text is aligned to the left or right of a reference point. - and properties. - + and properties. + ]]> diff --git a/xml/System.Windows.Forms/LinkArea+LinkAreaConverter.xml b/xml/System.Windows.Forms/LinkArea+LinkAreaConverter.xml index 287d449ad17..13226bcf170 100644 --- a/xml/System.Windows.Forms/LinkArea+LinkAreaConverter.xml +++ b/xml/System.Windows.Forms/LinkArea+LinkAreaConverter.xml @@ -37,7 +37,7 @@ For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). > [!NOTE] -> You should never create an instance of a . Instead, call the method of . For more information, see the examples in the base class. +> You should never create an instance of a . Instead, call the method of . For more information, see the examples in the base class. ]]> @@ -404,7 +404,7 @@ for the correct data type. + By default, a type does not return any properties. An easy implementation of this method can just call for the correct data type. ]]> diff --git a/xml/System.Windows.Forms/LinkArea.xml b/xml/System.Windows.Forms/LinkArea.xml index ea75ec4cebf..a407340f24d 100644 --- a/xml/System.Windows.Forms/LinkArea.xml +++ b/xml/System.Windows.Forms/LinkArea.xml @@ -46,14 +46,14 @@ control. You can access the method of the class through the property of the to add multiple hyperlinks to the control's text. If you only need to add a single hyperlink to the text of the control, you can use the property of the . This property accepts a that defines the location of the hyperlink within the control's text. When a hyperlink is specified using the property, the link area is then added to the in the same manner as adding the link using the method of the . + There are two ways to add a hyperlink to the text of a control. You can access the method of the class through the property of the to add multiple hyperlinks to the control's text. If you only need to add a single hyperlink to the text of the control, you can use the property of the . This property accepts a that defines the location of the hyperlink within the control's text. When a hyperlink is specified using the property, the link area is then added to the in the same manner as adding the link using the method of the . - The property specifies the number of characters within the text of the to include in the link area. The property specifies the first character in the control text to include in the hyperlink. If you want to determine whether a specific is empty, you can use the property instead of checking the values of the and properties. + The property specifies the number of characters within the text of the to include in the link area. The property specifies the first character in the control text to include in the hyperlink. If you want to determine whether a specific is empty, you can use the property instead of checking the values of the and properties. ## Examples - The following code example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following code example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -272,7 +272,7 @@ and properties. + You can use this property to determine whether a valid link area has been specified in this object instead of evaluating the values of the and properties. ]]> @@ -364,7 +364,7 @@ if two instances of the class are equal; otherwise, . - ]]> + ]]> diff --git a/xml/System.Windows.Forms/LinkBehavior.xml b/xml/System.Windows.Forms/LinkBehavior.xml index c95ac9839d6..a6ba384ba44 100644 --- a/xml/System.Windows.Forms/LinkBehavior.xml +++ b/xml/System.Windows.Forms/LinkBehavior.xml @@ -32,7 +32,7 @@ ## Examples - The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , and properties. To run this sample place it in a blank form and call the InitializeLinkLabel method from the form's constructor or Load method. + The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , and properties. To run this sample place it in a blank form and call the InitializeLinkLabel method from the form's constructor or Load method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkBehavior/Overview/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/LinkClickedEventArgs.xml b/xml/System.Windows.Forms/LinkClickedEventArgs.xml index a7f2a288d42..d5d96a78a0a 100644 --- a/xml/System.Windows.Forms/LinkClickedEventArgs.xml +++ b/xml/System.Windows.Forms/LinkClickedEventArgs.xml @@ -35,21 +35,21 @@ Provides data for the event. - specifies the text of the link that is clicked in the . - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. - + specifies the text of the link that is clicked in the . + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet541"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet541"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet541"::: + ]]> @@ -91,11 +91,11 @@ The text of the link that is clicked in the control. Initializes a new instance of the class. - @@ -222,21 +222,21 @@ The values for and Gets the text of the link being clicked. The text of the link that is clicked in the control. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet541"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet541"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet541"::: + ]]> diff --git a/xml/System.Windows.Forms/LinkConverter.xml b/xml/System.Windows.Forms/LinkConverter.xml index 47d9f77a31f..d1317e3b39c 100644 --- a/xml/System.Windows.Forms/LinkConverter.xml +++ b/xml/System.Windows.Forms/LinkConverter.xml @@ -30,11 +30,11 @@ Provides a type converter for objects. - class to convert links of one type to another type, and to access standard values and subordinate properties. Access this class through . - + class to convert links of one type to another type, and to access standard values and subordinate properties. Access this class through . + ]]> @@ -250,11 +250,11 @@ Converts the specified object to another type. The converted object. - to another . The default implementation calls on the object if the object is valid and if the `destinationType` is . - + to another . The default implementation calls on the object if the object is valid and if the `destinationType` is . + ]]> The object cannot be converted to the destination type. diff --git a/xml/System.Windows.Forms/LinkLabel+Link.xml b/xml/System.Windows.Forms/LinkLabel+Link.xml index be8f2f49321..821d6dd70b2 100644 --- a/xml/System.Windows.Forms/LinkLabel+Link.xml +++ b/xml/System.Windows.Forms/LinkLabel+Link.xml @@ -40,12 +40,12 @@ ## Remarks The class defines the properties of a link within a control. You can use these properties to provide data to the event of the control to perform tasks when the link is clicked in the control. The property enables you to define information that the event can use to display a URL within a browser or to open a file. - In addition to information related to the link, the properties of the class also help define the text of the and its display state. The and properties define the location and length of text from the text of the control to display as a link. The property allows you to display the link as a disabled link, and the property can alert the user that they already visited the specified link in the current instance of the . + In addition to information related to the link, the properties of the class also help define the text of the and its display state. The and properties define the location and length of text from the text of the control to display as a link. The property allows you to display the link as a disabled link, and the property can alert the user that they already visited the specified link in the current instance of the . You can display multiple links in a single control. Each is added into the associated with the control. To obtain the collection of links defined in a control, use the property. ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -331,7 +331,7 @@ You can use this property to supply information related to the link. The information provided by this property can be used within the event of the to provide information about the link that can be used to process the link being clicked. For example, you can specify the URL to display in the browser when the link is clicked as the value of the property. You can also use the property to identify a dialog to display when the user clicks on the link. ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -537,7 +537,7 @@ ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/LinkLabel+LinkCollection.xml b/xml/System.Windows.Forms/LinkLabel+LinkCollection.xml index a3a0606b59e..b2867487255 100644 --- a/xml/System.Windows.Forms/LinkLabel+LinkCollection.xml +++ b/xml/System.Windows.Forms/LinkLabel+LinkCollection.xml @@ -46,9 +46,9 @@ ## Remarks The class stores the link displayed in the control. Each item in the collection is an instance of the class, which defines the information of the link. - The method provides the ability to add a single to the collection. To remove links, you can use either the method or the method if you know where the link is located within the collection. The method enables you to remove all links from the collection instead of using the method to remove a single link at a time. + The method provides the ability to add a single to the collection. To remove links, you can use either the method or the method if you know where the link is located within the collection. The method enables you to remove all links from the collection instead of using the method to remove a single link at a time. - In addition to methods and properties for adding and removing items, the also provides methods to find links within the collection. The method enables you to determine whether a is a member of the collection. Once you know that the link is located within the collection, you can use the method to determine where the link is located within the collection. + In addition to methods and properties for adding and removing items, the also provides methods to find links within the collection. The method enables you to determine whether a is a member of the collection. Once you know that the link is located within the collection, you can use the method to determine where the link is located within the collection. ]]> @@ -170,7 +170,7 @@ control can display multiple links within the text of the control. The method enables you to convert text within the control to a link that can be clicked on by the user to perform tasks similar to a control. This method adds the link that is created to the for the . For example, if you want to set the word "quick" in the label text, "The quick brown fox", you call this method with the `start` parameter set to the value of four (4), and the `length` parameter to five (5). The word "quick" then changes to a link and the link is added to the collection. If you want to associate information with the link, such as the URL to display or a file to open when the user clicks on the link, use the other version of the method. + A control can display multiple links within the text of the control. The method enables you to convert text within the control to a link that can be clicked on by the user to perform tasks similar to a control. This method adds the link that is created to the for the . For example, if you want to set the word "quick" in the label text, "The quick brown fox", you call this method with the `start` parameter set to the value of four (4), and the `length` parameter to five (5). The word "quick" then changes to a link and the link is added to the collection. If you want to associate information with the link, such as the URL to display or a file to open when the user clicks on the link, use the other version of the method. > [!NOTE] > Two links cannot share the same text. If you create a link that uses text that is already used by another link, an exception is thrown. @@ -178,7 +178,7 @@ ## Examples - The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , , and properties and adding items to a . To run this example, paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or `Load` method. + The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , , and properties and adding items to a . To run this example, paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkBehavior/Overview/form1.cs" id="Snippet1"::: @@ -235,7 +235,7 @@ control can display multiple links within the text of the control. The method enables you to convert text within the control to a link that can be clicked on by the user to perform tasks similar to a control. This method adds the link that is created to the for the . For example, if you want to set the word "quick" in the label text, "The quick brown fox", you call this method with the `start` parameter set to the value of four (4), and the `length` parameter to five (5). The word "quick" then changes to a link and the link is added to the collection. This version of the Add method enables you to provide additional information that can be associated with the link through the `linkData` parameter. For example, you can pass a to the `linkData` parameter that contains a URL to display when the link is clicked. You can then use this information in your handler for the event of the control to display the URL in a browser. + A control can display multiple links within the text of the control. The method enables you to convert text within the control to a link that can be clicked on by the user to perform tasks similar to a control. This method adds the link that is created to the for the . For example, if you want to set the word "quick" in the label text, "The quick brown fox", you call this method with the `start` parameter set to the value of four (4), and the `length` parameter to five (5). The word "quick" then changes to a link and the link is added to the collection. This version of the Add method enables you to provide additional information that can be associated with the link through the `linkData` parameter. For example, you can pass a to the `linkData` parameter that contains a URL to display when the link is clicked. You can then use this information in your handler for the event of the control to display the URL in a browser. > [!NOTE] > Two links cannot share the same text. If you create a link that uses text that's already used by another link, an exception is thrown. @@ -285,7 +285,7 @@ , use the or method. + When you remove links from the collection, all information about the removed links is deleted. To remove a single link from the , use the or method. ]]> @@ -329,7 +329,7 @@ method enables you to determine whether a is a member of the collection. Once you know that the link is located within the collection, you can use the method to determine where the link is located within the collection. + The method enables you to determine whether a is a member of the collection. Once you know that the link is located within the collection, you can use the method to determine where the link is located within the collection. ]]> @@ -372,7 +372,7 @@ property corresponds to the key for a in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. + The property corresponds to the key for a in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. ]]> @@ -493,12 +493,12 @@ method enables you to determine where a link is located within the collection. To determine if a link is located within the collection before calling this method, use the method. + The method enables you to determine where a link is located within the collection. To determine if a link is located within the collection before calling this method, use the method. ## Examples - The following code example demonstrates setting the property using the enumeration. It also demonstrates setting the , , and properties and adding and accessing links in a . To run this example, paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or event handler. + The following code example demonstrates setting the property using the enumeration. It also demonstrates setting the , , and properties and adding and accessing links in a . To run this example, paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkBehavior/Overview/form1.cs" id="Snippet1"::: @@ -543,9 +543,9 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. - The property corresponds to the key for a in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. + The property corresponds to the key for a in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. ]]> @@ -636,7 +636,7 @@ method. + You can use this method to obtain the link stored at a specific location within the collection. To determine the index of a specific item within the collection, use the method. ]]> @@ -686,7 +686,7 @@ returns `null`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. The property corresponds to the key for a in the . @@ -764,7 +764,7 @@ method. To remove all links from the collection, use the method. + When you remove a link from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted. You can use this method to remove a specific link from the collection by specifying the actual item to remove from the collection. To specify the index of the link to remove instead of the link itself, use the method. To remove all links from the collection, use the method. ]]> @@ -809,7 +809,7 @@ method. To remove all links from the collection, use the method. + When you remove a link from the collection, the indexes change for subsequent items in the collection. All information about the deleted link is lost. You can use this method to remove a specific link from the collection by specifying the index of the link to remove from the collection. To specify the link to remove instead of the index to the link, use the method. To remove all links from the collection, use the method. ]]> diff --git a/xml/System.Windows.Forms/LinkLabel.xml b/xml/System.Windows.Forms/LinkLabel.xml index 30c552fd233..4d0065fb3fc 100644 --- a/xml/System.Windows.Forms/LinkLabel.xml +++ b/xml/System.Windows.Forms/LinkLabel.xml @@ -64,13 +64,13 @@ Each hyperlink displayed in the control is an instance of the class. The class defines display information, state, and location of the hyperlink. In addition, the property of the class enables you to associate information, such as a URL to display, with the hyperlink. When a user clicks a hyperlink within the control, the event is raised, and the object representing the hyperlink that was clicked is passed as part of the object that is passed as a parameter to the event handler. You can use this object to obtain the object associated with the hyperlink that was clicked by the user. All hyperlinks contained within the control are stored in the class instance for the control. - There are two ways to add a hyperlink to the control. The quickest way is to specify a and assign it to the property. This enables you to specify a single hyperlink within the text of the control. To add multiple hyperlinks, you can use the method of the class by accessing the collection through the property. + There are two ways to add a hyperlink to the control. The quickest way is to specify a and assign it to the property. This enables you to specify a single hyperlink within the text of the control. To add multiple hyperlinks, you can use the method of the class by accessing the collection through the property. - When a control is created, a default hyperlink that contains all the text within the control is added to the . You can override this default link by specifying a new link area with the property, or specify a link using the method of the . You can also remove the default hyperlink by using the method of the class. + When a control is created, a default hyperlink that contains all the text within the control is added to the . You can override this default link by specifying a new link area with the property, or specify a link using the method of the . You can also remove the default hyperlink by using the method of the class. - The property is `true` by default, as long as there is at least one link of greater than zero length in the collection. The control has a single value. However, each link of greater than zero length gets its own tab stop, in left-to-right order. To prevent tab navigation to the control, set the property to `false`. However, be aware that adding new links to the collection will automatically set the property to `true` again. + The property is `true` by default, as long as there is at least one link of greater than zero length in the collection. The control has a single value. However, each link of greater than zero length gets its own tab stop, in left-to-right order. To prevent tab navigation to the control, set the property to `false`. However, be aware that adding new links to the collection will automatically set the property to `true` again. - The provides a number of properties that enable you to define the display appearance of hyperlinks in the control. The , , , and properties define the colors used when displaying a hyperlink in various states. The property defines the display of the underline that is associated with a hyperlink. + The provides a number of properties that enable you to define the display appearance of hyperlinks in the control. The , , , and properties define the colors used when displaying a hyperlink in various states. The property defines the display of the underline that is associated with a hyperlink. @@ -80,7 +80,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkLabel/Overview/form.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LinkLabel/Overview/form.vb" id="Snippet1"::: - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -122,7 +122,7 @@ class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -165,7 +165,7 @@ ## Remarks An active link is a link that is in the process of being clicked. This is similar to the depressed state of a control. You can use this property to specify the color that the link is displayed in when the link is in the process of being clicked. - There are a number of colors associated with a link. The specifies the color of all links displayed in the control. The property enables you to specify the color of a link after it has been visited by the user. When a link is disabled, the is used to display the link in a disabled state. + There are a number of colors associated with a link. The specifies the color of all links displayed in the control. The property enables you to specify the color of a link after it has been visited by the user. When a link is disabled, the is used to display the link in a disabled state. > [!NOTE] > When setting this property, ensure that the color you are setting the property to does not conflict with the color of the control's background or the text does not display properly. For example, if the background color of the control is `Color.Red` and this property is set to `Color.Red`, the text is not shown properly when the link is in the process of being clicked. @@ -173,7 +173,7 @@ ## Examples - The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , and properties. To run this sample paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or `Load` method. + The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , and properties. To run this sample paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkBehavior/Overview/form1.cs" id="Snippet1"::: @@ -219,11 +219,11 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. Note: To get or set the property, you must add a reference to the Accessibility assembly installed with the .NET Framework. - Notes to Inheritors: When overriding in a derived class, you should not call the base class's method. + Notes to Inheritors: When overriding in a derived class, you should not call the base class's method. ]]> @@ -300,7 +300,7 @@ ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -443,18 +443,18 @@ To add multiple hyperlinks to the text of the control, you can use the property. The property enables you to access the properties and methods of the , which stores the links specified for the control. This method of adding links to the also enables you to specify data in the property that is associated with the link being created. The value of the property can be used to store the location of a file to display or the address of a Web site. - When a control is created, a default hyperlink that contains all the text within the control is added to the . You can override this default link by specifying a new link area with the property, or specify a link using the method of the . You can also remove the default hyperlink by using the method of the class. + When a control is created, a default hyperlink that contains all the text within the control is added to the . You can override this default link by specifying a new link area with the property, or specify a link using the method of the . You can also remove the default hyperlink by using the method of the class. > [!NOTE] > The property always returns the first item in the , regardless of how the hyperlink was added to the collection. > [!NOTE] -> The property on will differ if you call , and the property contains double-byte characters. If you call , it will return the number of bytes in the string. Otherwise, it will return the number of actual characters. +> The property on will differ if you call , and the property contains double-byte characters. If you call , it will return the number of bytes in the string. Otherwise, it will return the number of actual characters. ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -516,7 +516,7 @@ ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -577,7 +577,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkLabel/Overview/form.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LinkLabel/Overview/form.vb" id="Snippet1"::: - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -622,7 +622,7 @@ ## Remarks This property enables you to specify the color that is initially displayed for all links in the . - There are a number of colors associated with a link. The property enables you to specify the color of the link when it is in the process of being clicked. The property enables you to specify the color of a link after it has been visited by the user. When a link is disabled, the is used to display the link in a disabled state. + There are a number of colors associated with a link. The property enables you to specify the color of the link when it is in the process of being clicked. The property enables you to specify the color of a link after it has been visited by the user. When a link is disabled, the is used to display the link in a disabled state. > [!NOTE] > When setting this property, ensure that the color you are setting the property to does not conflict with the color of the control's background or the text does not display properly. For example, if the background color of the control is `Color.Red` and this property is set to `Color.Red`, the text of the link is not shown properly. @@ -630,7 +630,7 @@ ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -691,14 +691,14 @@ ## Remarks A control can display any number of links within the text of the control. This property enables you to access the instance associated with the that represents the collection of links displayed in the control. You can then use the members of the class to add, remove, and find links in the collection. For more information on the types of tasks you can perform with the link collection, see . - When a control is created, a default hyperlink that contains all the text within the control is added to the . You can override this default link by specifying a new link area with the property, or specify a link using the method of the . You can also remove the default hyperlink by using the method of the class. + When a control is created, a default hyperlink that contains all the text within the control is added to the . You can override this default link by specifying a new link area with the property, or specify a link using the method of the . You can also remove the default hyperlink by using the method of the class. If you do not need to specify more than one link to display within the , you can use the property. ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: @@ -755,7 +755,7 @@ ## Examples - The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , and properties. To run this sample paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or `Load` method. + The following example demonstrates setting the property using the enumeration. It also demonstrates setting the , and properties. To run this sample paste it in a blank form and call `InitializeLinkLabel` from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabelExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkBehavior/Overview/form1.cs" id="Snippet1"::: @@ -800,7 +800,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -845,7 +845,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1016,7 +1016,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1293,7 +1293,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1861,7 +1861,7 @@ property is `true` by default, as long as there is at least one link of greater than zero length in the collection. The control has a single value. However, each link of greater than zero length gets its own tab stop, in left-to-right order. To prevent tab navigation to the control, set the property to `false`. However, be aware that adding new links to the collection will automatically set the property to `true` again. + The property is `true` by default, as long as there is at least one link of greater than zero length in the collection. The control has a single value. However, each link of greater than zero length gets its own tab stop, in left-to-right order. To prevent tab navigation to the control, set the property to `false`. However, be aware that adding new links to the collection will automatically set the property to `true` again. ]]> @@ -1916,7 +1916,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `LinkLabel1`. Then ensure that the event handler is associated with the event. @@ -2006,7 +2006,7 @@ The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, it's recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. -You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. +You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. ]]> @@ -2049,7 +2049,7 @@ You can set the `UseCompatibleTextRendering` property to `true` for a specific c ## Remarks This property enables you to specify the color that is displayed for all links in the `LinkLabel` that have been visited by the user. - There are a number of colors associated with a link. All links in the are initially displayed with the color defined in the property. The property enables you to specify the color of the link when it is in the process of being clicked. When a link is disabled, the is used to display the link in a disabled state. + There are a number of colors associated with a link. All links in the are initially displayed with the color defined in the property. The property enables you to specify the color of the link when it is in the process of being clicked. When a link is disabled, the is used to display the link in a disabled state. > [!NOTE] > When setting this property, ensure that the color you are setting the property to does not conflict with the color of the control's background or the text does not display properly. For example, if the background color of the control is `Color.Red` and this property is set to `Color.Red`, the text is not shown properly when the link is displayed as a visited link. @@ -2057,7 +2057,7 @@ You can set the `UseCompatibleTextRendering` property to `true` for a specific c ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/LinkLabelLinkClickedEventArgs.xml b/xml/System.Windows.Forms/LinkLabelLinkClickedEventArgs.xml index 55bb12b166c..55fd680fec9 100644 --- a/xml/System.Windows.Forms/LinkLabelLinkClickedEventArgs.xml +++ b/xml/System.Windows.Forms/LinkLabelLinkClickedEventArgs.xml @@ -168,7 +168,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `LinkLabel1`. Then ensure that the event handler is associated with the event. @@ -217,7 +217,7 @@ class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following code example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/LinkLabelLinkClickedEventHandler.xml b/xml/System.Windows.Forms/LinkLabelLinkClickedEventHandler.xml index afe5a18bd95..cffd7554a1f 100644 --- a/xml/System.Windows.Forms/LinkLabelLinkClickedEventHandler.xml +++ b/xml/System.Windows.Forms/LinkLabelLinkClickedEventHandler.xml @@ -49,7 +49,7 @@ ## Examples - The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. + The following example demonstrates using the class, with multiple sections defined, to display a label on a form. The example demonstrates setting the , , , , and properties to customize the look of the . The first is specified using the property. Additional links are added to the using the method. The example handles the event by starting the Web browser for hyperlinks, and displaying a for other links. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.LinkLabel/CPP/linklabel.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LinkArea/Overview/linklabel.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ListBindingConverter.xml b/xml/System.Windows.Forms/ListBindingConverter.xml index f7a0cc7d502..1500dc5771d 100644 --- a/xml/System.Windows.Forms/ListBindingConverter.xml +++ b/xml/System.Windows.Forms/ListBindingConverter.xml @@ -31,18 +31,18 @@ Provides a type converter to convert objects to and from various other representations. - is used to evaluate and convert a property of an object into a . - - The is applied to the class with the type of the as an argument. - - For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + is used to evaluate and convert a property of an object into a . + + The is applied to the class with the type of the as an argument. + + For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> You should never create an instance of the class. Instead, call the method of . For more information, see the examples in the base class. - +> You should never create an instance of the class. Instead, call the method of . For more information, see the examples in the base class. + ]]> diff --git a/xml/System.Windows.Forms/ListBindingHelper.xml b/xml/System.Windows.Forms/ListBindingHelper.xml index d52d3978ea7..d2a735bf704 100644 --- a/xml/System.Windows.Forms/ListBindingHelper.xml +++ b/xml/System.Windows.Forms/ListBindingHelper.xml @@ -30,13 +30,13 @@ Provides functionality to discover a bindable list and the properties of the items contained in the list when they differ from the public properties of the object to which they bind. - . - - Note that for Smartphone applications, this class requires Windows Mobile Version 5.0 software for Smartphones. - + . + + Note that for Smartphone applications, this class requires Windows Mobile Version 5.0 software for Smartphones. + ]]> @@ -82,11 +82,11 @@ Returns a list associated with the specified data source. An representing the underlying list if it exists; otherwise, the original data source specified by . - interface, then the method will return an object of type that represents the associated list. Otherwise, this method will just return the specified data source since there is no underlying list. - + interface, then the method will return an object of type that represents the associated list. Otherwise, this method will just return the specified data source since there is no underlying list. + ]]> @@ -125,15 +125,15 @@ Returns an object, typically a list, from the evaluation of a specified data source and optional data member. An representing the underlying list if it was found; otherwise, . - method returns `dataSource`. - - If `dataSource` is not a list, returns the value of the `dataSource` property that matches the `dataMember` value. - - If `dataSource` is a list, in that it implements either the or interfaces, then the underlying list is obtained by choosing an item from the list and querying that item for the value of the property named by `dataMember`. - + method returns `dataSource`. + + If `dataSource` is not a list, returns the value of the `dataSource` property that matches the `dataMember` value. + + If `dataSource` is a list, in that it implements either the or interfaces, then the underlying list is obtained by choosing an item from the list and querying that item for the value of the property named by `dataMember`. + ]]> The specified data member name did not match any of the properties found for the data source. @@ -187,17 +187,17 @@ Returns the that describes the properties of an item type contained in a specified data source, or properties of the specified data source. The containing the properties of the items contained in , or properties of . - method is used to examine the collection of properties for a data source. The action of this method depends on the actual type of the `list` parameter according to the following table: - -|Parameter type|Action| -|--------------------|------------| -|A type that is a list or collection of items.|Returns a describing the properties of the item type contained in the list.| -|A type that is not a list or collection.|Returns a describing the properties of the type.| -|`null`|Returns an empty .| - + method is used to examine the collection of properties for a data source. The action of this method depends on the actual type of the `list` parameter according to the following table: + +|Parameter type|Action| +|--------------------|------------| +|A type that is a list or collection of items.|Returns a describing the properties of the item type contained in the list.| +|A type that is not a list or collection.|Returns a describing the properties of the type.| +|`null`|Returns an empty .| + ]]> @@ -251,11 +251,11 @@ Returns the that describes the properties of an item type contained in a collection property of a data source. Uses the specified array to indicate which properties to examine. The describing the properties of the item type contained in a collection property of the data source. - method is useful when the data source has properties that are a collection of items and you need to know properties of the item type in the collection, not the properties of the collection type. - + method is useful when the data source has properties that are a collection of items and you need to know properties of the item type in the collection, not the properties of the collection type. + ]]> @@ -304,13 +304,13 @@ Returns the that describes the properties of an item type contained in the specified data member of a data source. Uses the specified array to indicate which properties to examine. The describing the properties of an item type contained in a collection property of the specified data source. - method will return property descriptions using the data source and the array. - - is useful when the data member has properties that are a collection of items and you need to know properties of the item type in the collection, not the properties of the collection type. - + method will return property descriptions using the data source and the array. + + is useful when the data member has properties that are a collection of items and you need to know properties of the item type in the collection, not the properties of the collection type. + ]]> The specified data member could not be found in the specified data source. @@ -358,11 +358,11 @@ Returns the data type of the items in the specified list. The of the items contained in the list. - @@ -402,15 +402,15 @@ Returns the data type of the items in the specified data source. For complex data binding, the of the items represented by the in the data source; otherwise, the of the item in the list itself. - method is used to determine the type of items used in complex or simple data-binding schemes. This static method may be useful in determining whether a proposed data-binding scheme is appropriate before attempting it. - - If `dataSource` is `null`, the property descriptors cannot be found for the list items of the specified data member, or the property descriptor for the list item is an , then this method returns the type of the class. - - If `dataMember` is `null` or empty, then this method returns the of the items in the data source, if it is a list; otherwise, this method returns the of the data source itself. - + method is used to determine the type of items used in complex or simple data-binding schemes. This static method may be useful in determining whether a proposed data-binding scheme is appropriate before attempting it. + + If `dataSource` is `null`, the property descriptors cannot be found for the list items of the specified data member, or the property descriptor for the list item is an , then this method returns the type of the class. + + If `dataMember` is `null` or empty, then this method returns the of the items in the data source, if it is a list; otherwise, this method returns the of the data source itself. + ]]> @@ -463,11 +463,11 @@ Returns the name of an underlying list, given a data source and optional array. The name of the list in the data source, as described by , or the name of the data source type. - method returns the name of the data source type. - + method returns the name of the data source type. + ]]> diff --git a/xml/System.Windows.Forms/ListBox+IntegerCollection.xml b/xml/System.Windows.Forms/ListBox+IntegerCollection.xml index 19d23627159..001c9ec652a 100644 --- a/xml/System.Windows.Forms/ListBox+IntegerCollection.xml +++ b/xml/System.Windows.Forms/ListBox+IntegerCollection.xml @@ -43,7 +43,7 @@ is a sorted collection to which items are appended by using the and methods. Duplicate values are removed. + is a sorted collection to which items are appended by using the and methods. Duplicate values are removed. The is used mainly by the property. @@ -302,7 +302,7 @@ method to determine whether an integer is a member of the . Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. + Use the method to determine whether an integer is a member of the . Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. ]]> @@ -346,7 +346,7 @@ method to combine the integers from multiple collections into a single array. You can then use this array to populate the contents of another control using the method. + Use the method to combine the integers from multiple collections into a single array. You can then use this array to populate the contents of another control using the method. ]]> @@ -436,7 +436,7 @@ method to determine where an item is located within the collection. To determine whether an item is located within the collection before calling this method, use the method. + Use the method to determine where an item is located within the collection. To determine whether an item is located within the collection before calling this method, use the method. ]]> @@ -509,7 +509,7 @@ , the indexes change for subsequent integers in the collection. All information about the removed integer is deleted. You can use the method to remove a specific item from the list by specifying the actual item to remove from the list. To specify the index of the integer to remove instead of the integer itself, use the method. + When you remove an integer from the , the indexes change for subsequent integers in the collection. All information about the removed integer is deleted. You can use the method to remove a specific item from the list by specifying the actual item to remove from the list. To specify the index of the integer to remove instead of the integer itself, use the method. If the integer is not in the , this method does nothing. @@ -550,7 +550,7 @@ , the indexes change for subsequent integers in the collection. All information about the removed integer is deleted. You can use the method to remove a specific integer from the list by specifying the index of the integer to remove from the list. To specify the item to remove instead of the index to the item, use the method. + When you remove an integer from the , the indexes change for subsequent integers in the collection. All information about the removed integer is deleted. You can use the method to remove a specific integer from the list by specifying the index of the integer to remove from the list. To specify the item to remove instead of the index to the item, use the method. ]]> @@ -669,7 +669,7 @@ or to throw an exception. + This method creates an enumerator that contains a snapshot of the collection. You can change the collection by changing the enumerator; however, multiple enumerators can simultaneously access the same collection. Changing the collection (either directly or through another enumerator) can thus cause or to throw an exception. Two enumerators created from the same collection at the same time can contain different snapshots. diff --git a/xml/System.Windows.Forms/ListBox+ObjectCollection.xml b/xml/System.Windows.Forms/ListBox+ObjectCollection.xml index dc1284424f6..881b3d2d200 100644 --- a/xml/System.Windows.Forms/ListBox+ObjectCollection.xml +++ b/xml/System.Windows.Forms/ListBox+ObjectCollection.xml @@ -50,16 +50,16 @@ ## Remarks The class stores the items displayed in the . There are two other collections defined within the class that enable you to determine what items are selected within this collection. The class provides properties and methods for determining what items are selected within the , while the class enables you to determine what indexes within the are selected. - There are a number of ways to add items to the collection. The method provides the ability to add a single object to the collection. To add a number of objects to the collection, you create an array of items and assign it to the method. If you want to insert an object at a specific location within the collection, you can use the method. To remove items, you can use either the method or the method if you know where the item is located within the collection. The method enables you to remove all items from the collection instead of using the method to remove a single item at a time. + There are a number of ways to add items to the collection. The method provides the ability to add a single object to the collection. To add a number of objects to the collection, you create an array of items and assign it to the method. If you want to insert an object at a specific location within the collection, you can use the method. To remove items, you can use either the method or the method if you know where the item is located within the collection. The method enables you to remove all items from the collection instead of using the method to remove a single item at a time. You can also manipulate the items of a by using the property. If you use the property to add items to a , you can view the items in the using the property but you cannot add or remove items from the list using the methods of the . - In addition to methods and properties for adding and removing items, the also provides methods to find items within the collection. The method enables you to determine whether an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. + In addition to methods and properties for adding and removing items, the also provides methods to find items within the collection. The method enables you to determine whether an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. ## Examples - The following code example demonstrates an owner-drawn by setting the property to the `OwnerDrawVariable` value and handling the and events. It also demonstrates setting the and properties and using the method. + The following code example demonstrates an owner-drawn by setting the property to the `OwnerDrawVariable` value and handling the and events. It also demonstrates setting the and properties and using the method. To run this example, paste it into an empty form that imports the namespace and the namespace. Call `InitializeOwnerDrawnListBox` from the form's constructor or `Load` method. @@ -241,12 +241,12 @@ property of the is set to `true`, the item is inserted into the list alphabetically. Otherwise, the item is inserted at the end of the list. To insert an item into the list box at a specific position, use the method. To add a set of items to the list box in a single operation, use the method. If you want to use the method to add a large number of items to the list, use the and methods to prevent the from repainting each time an item is added to the list until all items are added to the list. When adding items to a , it is more efficient to sort the items first and then add new items. + If the property of the is set to `true`, the item is inserted into the list alphabetically. Otherwise, the item is inserted at the end of the list. To insert an item into the list box at a specific position, use the method. To add a set of items to the list box in a single operation, use the method. If you want to use the method to add a large number of items to the list, use the and methods to prevent the from repainting each time an item is added to the list until all items are added to the list. When adding items to a , it is more efficient to sort the items first and then add new items. - When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. + When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. ## Examples - The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection (through the property) and the (through the property). This example requires that the code is located in and called from a . + The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection (through the property) and the (through the property). This example requires that the code is located in and called from a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ListBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/Add/source.cs" id="Snippet1"::: @@ -312,10 +312,10 @@ property of the is set to `true`, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order that they occur within the array. This method is typically passed an array of objects, but an array of any type of object can be passed to this method. When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. When using this method to add items to the , you do not need to call the and methods to optimize performance. When adding items to a , it is more efficient to sort the items first and then add new items. You can use this method to add a group of items to the list or to reuse the items stored in a different . + If the property of the is set to `true`, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order that they occur within the array. This method is typically passed an array of objects, but an array of any type of object can be passed to this method. When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. When using this method to add items to the , you do not need to call the and methods to optimize performance. When adding items to a , it is more efficient to sort the items first and then add new items. You can use this method to add a group of items to the list or to reuse the items stored in a different . ## Examples - The following code example demonstrates an owner-drawn by setting the property to the `OwnerDrawVariable` value and handling the and events. It also demonstrates setting the and properties and using the method. + The following code example demonstrates an owner-drawn by setting the property to the `OwnerDrawVariable` value and handling the and events. It also demonstrates setting the and properties and using the method. To run this example, paste it into an empty form that imports the namespace and the namespace. Call `InitializeOwnerDrawnListBox` from the form's constructor or `Load` method. @@ -363,9 +363,9 @@ property of the is set to `true`, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order that they occur within the array. This method is typically passed an array of objects, but an array of any type of object can be passed to this method. When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. + If the property of the is set to `true`, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order that they occur within the array. This method is typically passed an array of objects, but an array of any type of object can be passed to this method. When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. - When using this method to add items to the , you do not need to call the and methods to optimize performance. When adding items to a , it is more efficient to sort the items first and then add new items. You can use this method to reuse the items stored in a different . + When using this method to add items to the , you do not need to call the and methods to optimize performance. When adding items to a , it is more efficient to sort the items first and then add new items. You can use this method to reuse the items stored in a different . ]]> @@ -407,7 +407,7 @@ , use the or method. + When you remove items from the list, all information about the deleted items is lost. To remove a single item from the , use the or method. ]]> @@ -455,7 +455,7 @@ method enables you to determine whether an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. + The method enables you to determine whether an object is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the item is located within the collection. ]]> @@ -509,7 +509,7 @@ control using the method of the class. + You can use this method to combine the items from multiple collections into a single array. You can then use this array to populate the contents of another control using the method of the class. ]]> @@ -631,7 +631,7 @@ method enables you to determine where an item is located within the collection. To determine whether an item is located within the collection before calling this method, use the method. + The method enables you to determine where an item is located within the collection. To determine whether an item is located within the collection before calling this method, use the method. ]]> @@ -681,7 +681,7 @@ . If the property of the is set to true, the item is added in the correct position within the sorted list regardless of the values specified in the `index` parameter. When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. + This method enables you to insert an item at a specific position within the . If the property of the is set to true, the item is added in the correct position within the sorted list regardless of the values specified in the `index` parameter. When an object is added to the collection, the first checks to see if the property of the class has the name of a member from the object specified to reference when obtaining the item text. If the property does not have a member specified, the then calls the method of the object to obtain the text to display in the list. ]]> @@ -779,7 +779,7 @@ item stored at a specific location within the collection. To determine the index of a specific item within the collection, use the method. + You can use this method to obtain the item stored at a specific location within the collection. To determine the index of a specific item within the collection, use the method. ]]> @@ -826,7 +826,7 @@ method. To remove all items from the list, use the method. + When you remove an item from the list, the indexes change for subsequent items in the list. All information about the removed item is deleted. You can use this method to remove a specific item from the list by specifying the actual item to remove from the list. To specify the index of the item to remove instead of the item itself, use the method. To remove all items from the list, use the method. ]]> @@ -871,12 +871,12 @@ method. To remove all items from the list, use the method. + When you remove an item from the list, the indexes change for subsequent items in the list. All information about the removed item is deleted. You can use this method to remove a specific item from the list by specifying the index of the item to remove from the list. To specify the item to remove instead of the index to the item, use the method. To remove all items from the list, use the method. ## Examples - The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . + The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.SelectedIndex/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ListBox+SelectedIndexCollection.xml b/xml/System.Windows.Forms/ListBox+SelectedIndexCollection.xml index 39f136ba17b..e2fd44c20c2 100644 --- a/xml/System.Windows.Forms/ListBox+SelectedIndexCollection.xml +++ b/xml/System.Windows.Forms/ListBox+SelectedIndexCollection.xml @@ -64,12 +64,12 @@ |1|3| |2|4| - You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an index position from the class is a member of the selected indexes stored in the . Once you know that the item is located within the collection, you can use the method to determine where a specific index position within the for the is stored. + You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an index position from the class is a member of the selected indexes stored in the . Once you know that the item is located within the collection, you can use the method to determine where a specific index position within the for the is stored. ## Examples - The following example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. + The following example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.FindString/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+SelectedIndexCollection/Overview/form1.cs" id="Snippet1"::: @@ -219,7 +219,7 @@ method enables you to determine whether an index position from the class is a member of the selected indexes stored in the . You can use this to determine whether a specific item in a multiple-selection is selected. + The method enables you to determine whether an index position from the class is a member of the selected indexes stored in the . You can use this to determine whether a specific item in a multiple-selection is selected. ]]> @@ -323,7 +323,7 @@ ## Examples - The following example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. + The following example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.FindString/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+SelectedIndexCollection/Overview/form1.cs" id="Snippet1"::: @@ -402,7 +402,7 @@ method), you can use the method to determine where a specific index position within the for the is stored within the . + Once you know that an item is located within the collection (using the method), you can use the method to determine where a specific index position within the for the is stored within the . ]]> @@ -644,7 +644,7 @@ ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - You cannot change the class directly. To add an item to the , use the property or the method. + You cannot change the class directly. To add an item to the , use the property or the method. ]]> @@ -732,7 +732,7 @@ ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - The method enables you to determine whether an index position from the a member of the selected indexes stored in the . You can use this method to determine whether a specific item in a multiple-selection list box is selected. + The method enables you to determine whether an index position from the a member of the selected indexes stored in the . You can use this method to determine whether a specific item in a multiple-selection list box is selected. ]]> @@ -829,7 +829,7 @@ ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - You cannot change the class directly. To add an item to the , use the property or the method. + You cannot change the class directly. To add an item to the , use the property or the method. ]]> @@ -967,7 +967,7 @@ ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - You cannot change the class directly. To remove an item from the , use the property or the method. + You cannot change the class directly. To remove an item from the , use the property or the method. ]]> @@ -1013,7 +1013,7 @@ ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - You cannot change the class directly. To remove an item from the , use the property or the method. + You cannot change the class directly. To remove an item from the , use the property or the method. ]]> diff --git a/xml/System.Windows.Forms/ListBox+SelectedObjectCollection.xml b/xml/System.Windows.Forms/ListBox+SelectedObjectCollection.xml index b0102b47b34..c9ccbee0808 100644 --- a/xml/System.Windows.Forms/ListBox+SelectedObjectCollection.xml +++ b/xml/System.Windows.Forms/ListBox+SelectedObjectCollection.xml @@ -64,7 +64,7 @@ |1|object4| |2|object5| - You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an item from the class is a member of the . Once you know that the item is located within the collection, you can use the method to determine where a specific item within the for the is stored within the . + You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an item from the class is a member of the . Once you know that the item is located within the collection, you can use the method to determine where a specific item within the for the is stored within the . ]]> @@ -208,7 +208,7 @@ method enables you to determine whether an item from the class is a member of the selected items stored in the . You can use this to determine if a specific item in a multiple-selection is selected. + The method enables you to determine whether an item from the class is a member of the selected items stored in the . You can use this to determine if a specific item in a multiple-selection is selected. ]]> @@ -380,7 +380,7 @@ method), you can use the method to determine where a specific item within the for the is stored within the . + Once you know that an item is located within the collection (using the method), you can use the method to determine where a specific item within the for the is stored within the . ]]> diff --git a/xml/System.Windows.Forms/ListBox.xml b/xml/System.Windows.Forms/ListBox.xml index eb692305b17..ec4210ae7d8 100644 --- a/xml/System.Windows.Forms/ListBox.xml +++ b/xml/System.Windows.Forms/ListBox.xml @@ -68,11 +68,11 @@ ## Remarks The control enables you to display a list of items to the user that the user can select by clicking. A control can provide single or multiple selections using the property. The also provides the property to enable the display of items in columns instead of a straight vertical list of items. With this, the control can display more visible items and the user no longer needs to scroll to an item. - Typically, Windows handles the task of drawing the items to display in the . You can use the property, and handle the and events so you can override the automatic drawing that Windows provides and draw the items yourself. You can use owner-drawn controls to display variable-height items, images, or a different color or font for the text of each item in the list. The property, , and also help you draw your own items. + Typically, Windows handles the task of drawing the items to display in the . You can use the property, and handle the and events so you can override the automatic drawing that Windows provides and draw the items yourself. You can use owner-drawn controls to display variable-height items, images, or a different color or font for the text of each item in the list. The property, , and also help you draw your own items. - In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. The and methods enable you to add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. + In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. The and methods enable you to add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. - The , , and properties provide access to the three collections that are used by the . The following table outlines the three collections used by the and their use within the control. + The , , and properties provide access to the three collections that are used by the . The following table outlines the three collections used by the and their use within the control. |Collection class|Use within the | |----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -108,7 +108,7 @@ |1|3| |2|4| - The method of the class enables you to add items to the . The method can accept any object when adding a member to the . When an object is being added to the , the control uses the text defined in the method of the object unless a member name within the object is specified in the property. In addition to adding items using the method of the class you can also add items using the property of the class. + The method of the class enables you to add items to the . The method can accept any object when adding a member to the . When an object is being added to the , the control uses the text defined in the method of the object unless a member name within the object is specified in the property. In addition to adding items using the method of the class you can also add items using the property of the class. > [!NOTE] > If you have a , , or on a base Windows form and want to modify the string collections of those controls in a derived Windows form, the string collections of those controls in the base Windows form must be empty. If the string collections are not empty, they become read-only when you derive another Windows form. @@ -116,7 +116,7 @@ ## Examples - The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection, through the property, and the , through the property. This example requires that the code is located in and called from a . + The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection, through the property, and the , through the property. This example requires that the code is located in and called from a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ListBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/Add/source.cs" id="Snippet1"::: @@ -153,7 +153,7 @@ control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection, through the property, and the , through the property. This example requires that the code is located in and called from a . + The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection, through the property, and the , through the property. This example requires that the code is located in and called from a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ListBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/Add/source.cs" id="Snippet1"::: @@ -497,12 +497,12 @@ is to use the method of the class (through the property of the ). This enables you to add an array of items to the list in a single operation. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. + The preferred way to add multiple items to the is to use the method of the class (through the property of the ). This enables you to add an array of items to the list in a single operation. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. ## Examples - The following code example uses the and methods while adding five thousand items to a . This example requires that a control, named `listBox1`, has been added to a and that this method is placed within the form and called from it. + The following code example uses the and methods while adding five thousand items to a . This example requires that a control, named `listBox1`, has been added to a and that this method is placed within the form and called from it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ListBox.BeginUpdate Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/BeginUpdate/source.cs" id="Snippet1"::: @@ -595,7 +595,7 @@ ## Examples - The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . + The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.SelectedIndex/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet1"::: @@ -1061,12 +1061,12 @@ is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. + The preferred way to add items to the is to use the method of the class (through the property of the ). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the list. ## Examples - The following code example uses the and methods while adding five thousand items to a . This example requires that a control, named `listBox1`, has been added to a and that this method is placed within the form and called from it. + The following code example uses the and methods while adding five thousand items to a . This example requires that a control, named `listBox1`, has been added to a and that this method is placed within the form and called from it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ListBox.BeginUpdate Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/BeginUpdate/source.cs" id="Snippet1"::: @@ -1127,12 +1127,12 @@ method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you can use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. + The search performed by this method is not case-sensitive. The search looks for words that partially match the specified search string parameter, `s`. You can use this method to search for the first item that matches the specified string. You can then perform tasks such as removing the item that contains the search text by using the method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you can use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. ## Examples - The following code example demonstrates how to use the method to search for the first instance of a string in a . If no items are found that match the search string returns a -1 value and the example displays a . If an item is found that matches the search text, the example uses the method to select the item in the . + The following code example demonstrates how to use the method to search for the first instance of a string in a . If no items are found that match the search string returns a -1 value and the example displays a . If an item is found that matches the search text, the example uses the method to select the item in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.FindString2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/FindString/form1.cs" id="Snippet1"::: @@ -1182,7 +1182,7 @@ . You can then perform tasks such as removing the item that contains the search text by using the method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a search for an exact word match instead of a partial match, use the method. + The search performed by this method is not case-sensitive. The search looks for words that partially match the specified search string parameter, `s`. You can use this method to search for the first item that matches the specified string at the specified starting index within the list of items for the . You can then perform tasks such as removing the item that contains the search text by using the method or changing the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a search for an exact word match instead of a partial match, use the method. > [!NOTE] > When the search reaches the bottom of the , it continues searching from the top of the back to the item specified by the `startIndex` parameter. @@ -1190,7 +1190,7 @@ ## Examples - The following code example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. + The following code example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.FindString/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+SelectedIndexCollection/Overview/form1.cs" id="Snippet1"::: @@ -1253,12 +1253,12 @@ method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you can use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform partial word search instead of an exact word match, use the method. + The search performed by this method is not case-sensitive. The search looks for an exact match to the words specified in the search string parameter, `s`. You can use this method to search for the first item that matches the specified string. You can then perform tasks such as removing the item that contains the search text by using the method or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , you can use the version of the method that provides a parameter for specifying a starting index within the . If you want to perform partial word search instead of an exact word match, use the method. ## Examples - The following code example demonstrates how to use the method to search a control for an item that exactly matches a specified string. If no items are found that match the search string, returns a -1 value and the example displays a . If an item is found that matches the search text, the example uses the method to select the item in the . + The following code example demonstrates how to use the method to search a control for an item that exactly matches a specified string. If no items are found that match the search string, returns a -1 value and the example displays a . If an item is found that matches the search text, the example uses the method to select the item in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.FindStringExact/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/FindStringExact/form1.cs" id="Snippet1"::: @@ -1307,7 +1307,7 @@ . You can then perform tasks such as removing the item that contains the search text using the method or change the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a partial word search instead of an exact word match, use the method. + The search performed by this method is not case-sensitive. The search looks for words that exactly match the specified search string parameter, `s`. You can use this method to search for the first item that matches the specified string at the specified starting index within the list of items for the . You can then perform tasks such as removing the item that contains the search text using the method or change the item's text. This method is typically used after a call has been made using the version of this method that does not specify a starting index. Once an initial item has been found in the list, this method is typically used to find further instances of the search text by specifying the index position in the `startIndex` parameter of the item after the first found instance of the search text. If you want to perform a partial word search instead of an exact word match, use the method. > [!NOTE] > When the search reaches the bottom of the , it continues searching from the top of the back to the item specified by the `startIndex` parameter. @@ -1315,7 +1315,7 @@ ## Examples - The following code example demonstrates how to use the method to search for all items in a that exactly match the specified search text. The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items, to prevent a recursive search. Once items are found in the , they are selected using the method. + The following code example demonstrates how to use the method to search for all items in a that exactly match the specified search text. The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items, to prevent a recursive search. Once items are found in the , they are selected using the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.FindStringExact2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/FindStringExact/form11.cs" id="Snippet1"::: @@ -1464,7 +1464,7 @@ method. + If the item specified in the `index` parameter is not visible, the rectangle returned by this method will be outside the visible portion of the control. You can use this method to determine the size and position of an item within the list. To get the height of an item, especially a variable-height owner drawn list item, you can use the method. ]]> @@ -1515,7 +1515,7 @@ class overrides the method to ensure that the requested height is scaled rather than the current height. + The class overrides the method to ensure that the requested height is scaled rather than the current height. ]]> @@ -1562,7 +1562,7 @@ ## Examples - The following code example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example requires that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. + The following code example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example requires that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.GetSelected/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/GetSelected/form1.cs" id="Snippet1"::: @@ -1623,7 +1623,7 @@ ## Examples - The following code example demonstrates how to use the and properties to display a horizontal scroll bar that shows all item text in the control. The example also uses the property to ensure that items are not partially displayed due to the size of the control. This example requires that a control, named `listBox1`, has been added to a form. + The following code example demonstrates how to use the and properties to display a horizontal scroll bar that shows all item text in the control. The example also uses the property to ensure that items are not partially displayed due to the size of the control. This example requires that a control, named `listBox1`, has been added to a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.HorizontalExtent/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/HorizontalExtent/form1.cs" id="Snippet1"::: @@ -1685,7 +1685,7 @@ ## Examples - The following code example demonstrates how to use the and properties to display a horizontal scroll bar that shows all item text in the control. The example also uses the property to ensure that items are not partially displayed due to the size of the control. This example requires that a control, named `listBox1`, has been added to a form. + The following code example demonstrates how to use the and properties to display a horizontal scroll bar that shows all item text in the control. The example also uses the property to ensure that items are not partially displayed due to the size of the control. This example requires that a control, named `listBox1`, has been added to a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.HorizontalExtent/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/HorizontalExtent/form1.cs" id="Snippet1"::: @@ -1740,12 +1740,12 @@ . The location of the cursor can be determined and passed to the `p` parameter of the method to determine which item the user right-clicked the mouse over. You can then display a shortcut menu to the user to provide tasks and features based on the specific item. + This method enables you to determine which item is located at a specific location within the control. You can use this method to determine which item within the list is selected when a user right-clicks the . The location of the cursor can be determined and passed to the `p` parameter of the method to determine which item the user right-clicked the mouse over. You can then display a shortcut menu to the user to provide tasks and features based on the specific item. ## Examples - The following code example demonstrates how to perform drag-and-drop operations using a control that contains items to drop into a control. The constructor of the form sets the property to `true` to enable drag-and-drop operations to occur in the . The example uses the event of the to start the drag operation by calling the method. The example uses the event to determine if an item being dragged into the is a valid data type. The event performs the actual dropping of a dragged item into the control at the current cursor location within the . This example requires that the and events have been connected to the event handlers defined in the example. + The following code example demonstrates how to perform drag-and-drop operations using a control that contains items to drop into a control. The constructor of the form sets the property to `true` to enable drag-and-drop operations to occur in the . The example uses the event of the to start the drag operation by calling the method. The example uses the event to determine if an item being dragged into the is a valid data type. The event performs the actual dropping of a dragged item into the control at the current cursor location within the . This example requires that the and events have been connected to the event handlers defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.AllowDrop/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/IndexFromPoint/form1.cs" id="Snippet1"::: @@ -1792,12 +1792,12 @@ . The location of the cursor can be determined and passed to the `x` and `y` parameters of the method to determine which item the user right-clicked the mouse over. You can then display a shortcut menu to the user to provide tasks and features based on the specific item. + This method enables you to determine which item that is located at a specific location within the control. You can use this method to determine which item within the list is selected when a user right-clicks the . The location of the cursor can be determined and passed to the `x` and `y` parameters of the method to determine which item the user right-clicked the mouse over. You can then display a shortcut menu to the user to provide tasks and features based on the specific item. ## Examples - The following code example demonstrates how to perform drag-and-drop operations using a control that contains items to drop into a control. The constructor of the form sets the property to `true` to enable drag-and-drop operations to occur in the . The example uses the event of the to start the drag operation by calling the method. The example uses the event to determine if an item being dragged into the is a valid data type. The event performs the actual dropping of a dragged item into the control at the current cursor location within the . This example requires that the and events have been connected to the event handlers defined in the example. + The following code example demonstrates how to perform drag-and-drop operations using a control that contains items to drop into a control. The constructor of the form sets the property to `true` to enable drag-and-drop operations to occur in the . The example uses the event of the to start the drag operation by calling the method. The example uses the event to determine if an item being dragged into the is a valid data type. The event performs the actual dropping of a dragged item into the control at the current cursor location within the . This example requires that the and events have been connected to the event handlers defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.AllowDrop/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/IndexFromPoint/form1.cs" id="Snippet1"::: @@ -1859,7 +1859,7 @@ ## Remarks When this property is set to `true`, the control automatically resizes to ensure that an item is not partially displayed. If you want to maintain the original size of the based on the space requirements of your form, set this property to `false`. - By default, the and the sizes are such that they show only whole items. If you want the or to completely fill a docked area, set to `false`. This causes the control to completely fill the area, but the last item is not fully displayed. + By default, the and the sizes are such that they show only whole items. If you want the or to completely fill a docked area, set to `false`. This causes the control to completely fill the area, but the last item is not fully displayed. If the does not contain any items, this property has no effect. @@ -1872,7 +1872,7 @@ ## Examples - The following code example demonstrates how to use the and properties to display a horizontal scroll bar that shows all item text in the control. The example also uses the property to ensure that items are not partially displayed due to the size of the control. This example requires that a control, named `listBox1`, has been added to a form. + The following code example demonstrates how to use the and properties to display a horizontal scroll bar that shows all item text in the control. The example also uses the property to ensure that items are not partially displayed due to the size of the control. This example requires that a control, named `listBox1`, has been added to a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.HorizontalExtent/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/HorizontalExtent/form1.cs" id="Snippet1"::: @@ -1928,7 +1928,7 @@ property is set to `DrawMode.OwnerDrawFixed`, all items have the same height. When the property is set to `DrawMode.OwnerDrawVariable`, the property specifies the height of each item added to the . Because each item in an owner-drawn list can have a different height, you can use the method to get the height of a specific item in the . If you use the property on a with items of variable height, this property returns the height of the first item in the control. + When the property is set to `DrawMode.OwnerDrawFixed`, all items have the same height. When the property is set to `DrawMode.OwnerDrawVariable`, the property specifies the height of each item added to the . Because each item in an owner-drawn list can have a different height, you can use the method to get the height of a specific item in the . If you use the property on a with items of variable height, this property returns the height of the first item in the control. The maximum height of a item is 255 pixels. @@ -2004,7 +2004,7 @@ ## Examples - The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection (through the property) and the (through the property). This example requires that the code is located in and called from a . + The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection (through the property) and the (through the property). This example requires that the code is located in and called from a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ListBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/Add/source.cs" id="Snippet1"::: @@ -2061,7 +2061,7 @@ ## Examples - The following code example demonstrates an owner-drawn by setting the property to and handling the and events. It also demonstrates setting the and properties and using the method. + The following code example demonstrates an owner-drawn by setting the property to and handling the and events. It also demonstrates setting the and properties and using the method. To run this example, paste it in an empty form that imports the namespace and the namespace. Call `InitializeOwnerDrawnListBox` from the form's constructor or event-handling method. @@ -2207,7 +2207,7 @@ , , and methods when no matching values are found in a search. + This constant is returned by the , , and methods when no matching values are found in a search. ]]> @@ -2348,7 +2348,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -2532,7 +2532,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2950,7 +2950,7 @@ property is set and the property in the data source that is assigned to changes, use the method to update the value in the control. + If the property is set and the property in the data source that is assigned to changes, use the method to update the value in the control. ]]> @@ -3191,7 +3191,7 @@ ## Examples - The following code example demonstrates an owner-drawn by setting the property to the `OwnerDrawVariable` value and handling the and events. It also demonstrates setting the and properties and using the method. + The following code example demonstrates an owner-drawn by setting the property to the `OwnerDrawVariable` value and handling the and events. It also demonstrates setting the and properties and using the method. To run this example, paste it in an empty form that imports the namespace and the namespace. Call `InitializeOwnerDrawnListBox` from the form's constructor or event-handling method. @@ -3256,7 +3256,7 @@ ## Examples - The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . + The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.SelectedIndex/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet1"::: @@ -3310,14 +3310,14 @@ ## Remarks You can create an event handler for this event to determine when the selected index in the has been changed. This can be useful when you need to display information in other controls based on the current selection in the . You can use the event handler for this event to load the information in the other controls. - If the property is set to or , any change to the collection, including removing an item from the selection, will raise this event. + If the property is set to or , any change to the collection, including removing an item from the selection, will raise this event. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates how to use the event to search for and select an item in a different control. The example uses the event to determine when the selected item in the is changed. The example code then reads the text of the item using the property and calls the method on a different using the text returned by in the first . If an item is found in the other , the item is selected. This example requires that two controls, named `listBox1` and `listBox2`, have been added to a form and that both controls contain items that are identical. The example also requires that the event-handling method defined in the example is connected to the event of `listBox1`. + The following code example demonstrates how to use the event to search for and select an item in a different control. The example uses the event to determine when the selected item in the is changed. The example code then reads the text of the item using the property and calls the method on a different using the text returned by in the first . If an item is found in the other , the item is selected. This example requires that two controls, named `listBox1` and `listBox2`, have been added to a form and that both controls contain items that are identical. The example also requires that the event-handling method defined in the example is connected to the event of `listBox1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.SelectedIndexChanged/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/SelectedIndexChanged/form1.cs" id="Snippet1"::: @@ -3376,7 +3376,7 @@ ## Examples - The following code example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. + The following code example demonstrates how to use the method to search for all instances of the search text in the items of the . The example uses the version of the method that enables you to specify a starting search index from which to do a continual search of all items in the . The example also demonstrates how to determine when the method begins searching from the top of the list after it reaches the bottom of the list of items to prevent a recursive search. Once items are found in the , they are selected using the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.FindString/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+SelectedIndexCollection/Overview/form1.cs" id="Snippet1"::: @@ -3446,7 +3446,7 @@ ## Examples - The following code example demonstrates how to use the event to search for and select an item in a different control. The example uses the event to determine when the selected item in the is changed. The example code then reads the text of the item using the property and calls the method on a different using the text returned by in the first . If an item is found in the other , the item is selected. This example requires that two controls, named `listBox1` and `listBox2`, have been added to a form and that both controls contain items that are identical. The example also requires that the event-handling method defined in the example is connected to the event of `listBox1`. + The following code example demonstrates how to use the event to search for and select an item in a different control. The example uses the event to determine when the selected item in the is changed. The example code then reads the text of the item using the property and calls the method on a different using the text returned by in the first . If an item is found in the other , the item is selected. This example requires that two controls, named `listBox1` and `listBox2`, have been added to a form and that both controls contain items that are identical. The example also requires that the event-handling method defined in the example is connected to the event of `listBox1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.SelectedIndexChanged/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/SelectedIndexChanged/form1.cs" id="Snippet1"::: @@ -3551,7 +3551,7 @@ ## Examples - The following code example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example requires that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. + The following code example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example requires that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.GetSelected/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/GetSelected/form1.cs" id="Snippet1"::: @@ -3605,11 +3605,11 @@ control increases and decreases by a multiple of the property. If height is a number that is not a multiple of , the height of the will change by the largest multiple that is less than height. + The height of the control increases and decreases by a multiple of the property. If height is a number that is not a multiple of , the height of the will change by the largest multiple that is less than height. Typically, the parameters that correspond to the bounds not included in the specified parameter are passed in with their current values. For example, the `height`, `width`, or the `x` or `y` properties of the property can be passed in with a reference to the current instance of the control. However, all values passed in are honored and applied to the control. - The `specified` parameter represents the elements of the controls changed by your application. For example, if you change the of the control, the `specified` parameter value is . However, if the is adjusted in response to the property being set, the `specified` parameter value is . + The `specified` parameter represents the elements of the controls changed by your application. For example, if you change the of the control, the `specified` parameter value is . However, if the is adjusted in response to the property being set, the `specified` parameter value is . ]]> @@ -3728,7 +3728,7 @@ ## Examples - The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection (through the property) and the (through the property). This example requires that the code is located in and called from a . + The following code example demonstrates how to create a control that displays multiple items in columns and can have more than one item selected in the control's list. The code for the example adds 50 items to the using the method of the class and then selects three items from the list using the method. The code then displays values from the collection (through the property) and the (through the property). This example requires that the code is located in and called from a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ListBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/Add/source.cs" id="Snippet1"::: @@ -3772,12 +3772,12 @@ forces the collection to add each item back to itself if the property is `true`. Each item is then inserted into the correct position. + forces the collection to add each item back to itself if the property is `true`. Each item is then inserted into the correct position. ## Examples - The following code example demonstrates using the method. The example demonstrates inheriting from the class and overriding the method in the derived class to perform a user-defined sort. To run this example paste the following code in an empty form. + The following code example demonstrates using the method. The example demonstrates inheriting from the class and overriding the method in the derived class to perform a user-defined sort. To run this example paste the following code in an empty form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListBoxSort/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/Sort/form1.cs" id="Snippet1"::: @@ -3835,12 +3835,12 @@ ## Remarks Use the property to automatically sort strings alphabetically in a . As items are added to a sorted , the items are moved to the appropriate location in the sorted list. When adding items to a , it is more efficient to sort the items first and then add new items. - A with its set to `true` should not be bound to data using the property. To display sorted data in a bound , you should bind to a data source that supports sorting and have the data source provide the sorting. + A with its set to `true` should not be bound to data using the property. To display sorted data in a bound , you should bind to a data source that supports sorting and have the data source provide the sorting. ## Examples - The following code example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example requires that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. + The following code example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example requires that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.GetSelected/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/GetSelected/form1.cs" id="Snippet1"::: @@ -3995,7 +3995,7 @@ ## Examples - The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . + The following code example demonstrates how to use the property with the property to move the currently selected item to the top of the list of items in the display area of the . The example further demonstrates how to remove items using the method of the class, and how to clear all item selection using the method. The code first moves the currently selected item in the to the top of the list. The code then removes all items before the currently selected item and clears all selections in the . This example requires that a containing items is added to a form and that an item is currently selected in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.SelectedIndex/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox+ObjectCollection/RemoveAt/form1.cs" id="Snippet1"::: @@ -4200,7 +4200,7 @@ method on the base class to ensure that the list continues to function properly. + Inheriting classes can override this to add extra functionality, but should call the method on the base class to ensure that the list continues to function properly. ]]> diff --git a/xml/System.Windows.Forms/ListControl.xml b/xml/System.Windows.Forms/ListControl.xml index 46cd2227da0..b0bcabc0377 100644 --- a/xml/System.Windows.Forms/ListControl.xml +++ b/xml/System.Windows.Forms/ListControl.xml @@ -48,12 +48,12 @@ ## Remarks The class provides implementations of common elements for the and controls. - The following properties are of primary concern to users of a data-bound or : , , , and properties. + The following properties are of primary concern to users of a data-bound or : , , , and properties. ## Examples - The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. When the user selects an item in the list box, the selected value is used to return the data associated with the selected item. + The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. When the user selects an item in the list box, the selected value is used to return the data associated with the selected item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListControl/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListControl/Overview/form1.cs" id="Snippet1"::: @@ -224,18 +224,18 @@ ## Remarks There are two ways to fill the and controls. - For example, you can add objects to the by using the method. You can also add objects to a by using the , , and properties to fill the . + For example, you can add objects to the by using the method. You can also add objects to a by using the , , and properties to fill the . When the property is set, a user cannot modify the items collection. If setting the property causes the data source to change, the event is raised. If setting this property causes the data member to change, the event is raised. - When you set to `null`, is set to an empty string (""). + When you set to `null`, is set to an empty string (""). ## Examples - The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. When the user selects an item in the list box, the selected value is used to return the data associated with the selected item. + The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. When the user selects an item in the list box, the selected value is used to return the data associated with the selected item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListControl/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListControl/Overview/form1.cs" id="Snippet1"::: @@ -282,7 +282,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. @@ -362,14 +362,14 @@ can display diverse types of objects. If the specified property does not exist on the object or the value of is an empty string (""), the results of the object's `ToString` method are displayed instead. + The controls that inherit from can display diverse types of objects. If the specified property does not exist on the object or the value of is an empty string (""), the results of the object's `ToString` method are displayed instead. If the new display member cannot be set, the previous display member setting is maintained. ## Examples - The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. When the user selects an item in the list box, the selected value is used to return the data associated with the selected item. + The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. When the user selects an item in the list box, the selected value is used to return the data associated with the selected item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListControl/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListControl/Overview/form1.cs" id="Snippet1"::: @@ -415,7 +415,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. @@ -544,7 +544,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. @@ -604,7 +604,7 @@ property will override the default formatting behavior, which uses the setting. + Setting the property will override the default formatting behavior, which uses the setting. ]]> @@ -655,7 +655,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. @@ -763,7 +763,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. @@ -817,11 +817,11 @@ ## Remarks Setting the property to `true` causes the event to be raised for each visible member of the . - , , and are related as follows: + , , and are related as follows: -- If is `false`, will not be set to -1 when is blank. +- If is `false`, will not be set to -1 when is blank. -- If is `true`, will be set to -1 when is blank. +- If is `true`, will be set to -1 when is blank. ]]> @@ -862,7 +862,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. @@ -1013,7 +1013,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1058,7 +1058,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1102,7 +1102,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1146,7 +1146,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1190,7 +1190,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1234,7 +1234,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1365,7 +1365,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1516,18 +1516,18 @@ , returns the results of the `ToString` method of the object. + If a property is not specified in , returns the results of the `ToString` method of the object. - , , and are related as follows: + , , and are related as follows: -- If is `false`, will not be set to -1 when is blank. +- If is `false`, will not be set to -1 when is blank. -- If is `true`, will be set to -1 when is blank. +- If is `true`, will be set to -1 when is blank. ## Examples - The following code example shows the returning the value of the property specified by the property. This code is an excerpt from the example shown in the class overview. See for the whole code listing. + The following code example shows the returning the value of the property specified by the property. This code is an excerpt from the example shown in the class overview. See for the whole code listing. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListControl/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListControl/Overview/form1.cs" id="Snippet3"::: @@ -1575,7 +1575,7 @@ ## Examples - The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. The example also uses the event to fill in a text box when the user selects an item in the list box. The text box is filled with the data associated with the selected item. + The following code example is a complete application that shows how you can use , , , and members of the class as implemented by the class. The example loads an and the list box. The example also uses the event to fill in a text box when the user selects an item in the list box. The text box is filled with the data associated with the selected item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListControl/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListControl/Overview/form1.cs" id="Snippet1"::: @@ -1715,7 +1715,7 @@ ## Examples - The following code example shows loading the data into an and setting the to a property of the object in the list. + The following code example shows loading the data into an and setting the to a property of the object in the list. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListControl/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListControl/Overview/form1.cs" id="Snippet1"::: @@ -1762,7 +1762,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ListControlConvertEventArgs.xml b/xml/System.Windows.Forms/ListControlConvertEventArgs.xml index 444786970f1..c55cf984598 100644 --- a/xml/System.Windows.Forms/ListControlConvertEventArgs.xml +++ b/xml/System.Windows.Forms/ListControlConvertEventArgs.xml @@ -30,16 +30,16 @@ Provides data for the event. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet144"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet144"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet144"::: + ]]> @@ -82,11 +82,11 @@ The data source item to be displayed in the . Initializes a new instance of the class with the specified object, type, and list item. - from the data source item. - + from the data source item. + ]]> @@ -125,16 +125,16 @@ Gets a data source item. The that represents an item in the data source. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ListControl1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet144"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet144"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet144"::: + ]]> diff --git a/xml/System.Windows.Forms/ListView+CheckedIndexCollection.xml b/xml/System.Windows.Forms/ListView+CheckedIndexCollection.xml index 449ae56dbfc..3d0d5cf5d31 100644 --- a/xml/System.Windows.Forms/ListView+CheckedIndexCollection.xml +++ b/xml/System.Windows.Forms/ListView+CheckedIndexCollection.xml @@ -68,7 +68,7 @@ |1|3| |2|4| - You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an index position from the is one of the indexes stored in the . Once you know that the item is in the collection, you can use the method to determine the position of the index in the . + You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an index position from the is one of the indexes stored in the . Once you know that the item is in the collection, you can use the method to determine the position of the index in the . ]]> @@ -155,7 +155,7 @@ method enables you to determine whether an index position from the is one of the checked indexes stored in the . Once you know that an item is in the checked index collection, you can use the method to determine the position of the index in the . + The method enables you to determine whether an index position from the is one of the checked indexes stored in the . Once you know that an item is in the checked index collection, you can use the method to determine the position of the index in the . ]]> @@ -277,7 +277,7 @@ method), you can use the method to determine the position of the index in the . + Once you know that an item is in the checked index collection (using the method), you can use the method to determine the position of the index in the . ]]> diff --git a/xml/System.Windows.Forms/ListView+CheckedListViewItemCollection.xml b/xml/System.Windows.Forms/ListView+CheckedListViewItemCollection.xml index 73f2d261127..f9647f3fa64 100644 --- a/xml/System.Windows.Forms/ListView+CheckedListViewItemCollection.xml +++ b/xml/System.Windows.Forms/ListView+CheckedListViewItemCollection.xml @@ -68,7 +68,7 @@ |1|Item4| |2|Item5| - You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an item from the class is a member of the . Once you know that the item is in the collection, you can use the method to determine the position of the item in the . + You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an item from the class is a member of the . Once you know that the item is in the collection, you can use the method to determine the position of the item in the . ]]> @@ -147,7 +147,7 @@ method enables you to determine whether an item from the is a one of the checked items stored in the . Once you know that an item is in the checked item collection, you can use the method to determine the position of the item in the . + The method enables you to determine whether an item from the is a one of the checked items stored in the . Once you know that an item is in the checked item collection, you can use the method to determine the position of the item in the . ]]> @@ -356,7 +356,7 @@ method), you can use the method to determine where a specific item within the for the is stored within the . + Once you know that an item is located within the collection (using the method), you can use the method to determine where a specific item within the for the is stored within the . ]]> @@ -399,9 +399,9 @@ ## Remarks The property of a corresponds to the key for an item in a . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. - If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. ]]> @@ -541,7 +541,7 @@ returns `null` if the `key` parameter is `null` or empty. + returns `null` if the `key` parameter is `null` or empty. The property corresponds to the key for an item in the . diff --git a/xml/System.Windows.Forms/ListView+ColumnHeaderCollection.xml b/xml/System.Windows.Forms/ListView+ColumnHeaderCollection.xml index eb8aeb96a60..223ab9b6601 100644 --- a/xml/System.Windows.Forms/ListView+ColumnHeaderCollection.xml +++ b/xml/System.Windows.Forms/ListView+ColumnHeaderCollection.xml @@ -50,9 +50,9 @@ ## Remarks A class stores the column headers that are displayed in the control when the property is set to . The stores objects that define the text to display for a column as well as how the column header is displayed in the control when displaying columns. When a displays columns, the items and their subitems are displayed in their own columns. To specify which columns subitem data is displayed under, see the class. - There are a number of ways to add column headers to the collection. The method adds a single column header to the collection. To add a number of column headers to the collection, you create an array of objects and pass it to the method. If you want to insert a column header at a specific location in the collection, you can use the method. To remove column headers, you can use either the method or the method if you know where the column header is located in the collection. The method allows you to remove all column headers from the collection instead of using the method to remove a single column header at a time. + There are a number of ways to add column headers to the collection. The method adds a single column header to the collection. To add a number of column headers to the collection, you create an array of objects and pass it to the method. If you want to insert a column header at a specific location in the collection, you can use the method. To remove column headers, you can use either the method or the method if you know where the column header is located in the collection. The method allows you to remove all column headers from the collection instead of using the method to remove a single column header at a time. - In addition to methods and properties for adding and removing column headers, the also provides methods to find column headers in the collection. The method enables you to determine whether a column header is a member of the collection. Once you know that the column header is located in the collection, you can use the method to determine where the column header is located in the collection. + In addition to methods and properties for adding and removing column headers, the also provides methods to find column headers in the collection. The method enables you to determine whether a column header is a member of the collection. Once you know that the column header is located in the collection, you can use the method to determine where the column header is located in the collection. > [!NOTE] > Unexpected behavior can result when the combined width of all columns exceeds 32,768 pixels. @@ -60,7 +60,7 @@ ## Examples - The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. + The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.ColumnClick/CPP/listviewsort1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView+ColumnHeaderCollection/Overview/listviewsort1.cs" id="Snippet1"::: @@ -199,14 +199,14 @@ method to add an existing to the collection. If you want to create a new at the time you add it to the collection, you can use the other version of the method. + You can use this version of the method to add an existing to the collection. If you want to create a new at the time you add it to the collection, you can use the other version of the method. - When column headers are added, they are added to the end of the collection. To insert a column header into the collection at a specific position, use the method. To add a set of column headers to the collection in a single operation, use the method. + When column headers are added, they are added to the end of the collection. To insert a column header into the collection at a specific position, use the method. To add a set of column headers to the collection in a single operation, use the method. ## Examples - The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. + The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.ColumnClick/CPP/listviewsort1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView+ColumnHeaderCollection/Overview/listviewsort1.cs" id="Snippet1"::: @@ -412,28 +412,28 @@ method to create a new to add to the collection. The text of the new added to the control is based on the `text` parameter. This version of the method also allows you to specify the width of the column and the alignment of text in the column header. If you have an existing that you want to add to the collection, use the version of the method that accepts a as its parameter. + You can use this version of the method to create a new to add to the collection. The text of the new added to the control is based on the `text` parameter. This version of the method also allows you to specify the width of the column and the alignment of text in the column header. If you have an existing that you want to add to the collection, use the version of the method that accepts a as its parameter. - When column headers are added, they are added to the end of the collection. To insert a column header into the collection at a specific position, use the method. To add a set of column headers to the collection in a single operation, use the method. + When column headers are added, they are added to the end of the collection. To insert a column header into the collection at a specific position, use the method. To add a set of column headers to the collection in a single operation, use the method. ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -606,7 +606,7 @@ control. If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. + You can use this method to reuse the column headers used in a different control. If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. ]]> @@ -649,7 +649,7 @@ or method. + When you remove column headers from the collection, all information about the deleted column headers is lost. To remove a single column header from the collection use the or method. ]]> @@ -693,7 +693,7 @@ method enables you to determine whether a is a member of the collection. Once you know that the column header is in the collection, you can use the method to determine the position of the column header in the collection. + The method enables you to determine whether a is a member of the collection. Once you know that the column header is in the collection, you can use the method to determine the position of the column header in the collection. ]]> @@ -735,7 +735,7 @@ returns `false`. + The key comparison is not case-sensitive. If `key` is `null` or empty, returns `false`. The property corresponds to the key for an item in the . @@ -859,7 +859,7 @@ method enables you to determine the position of a column header in the collection. To determine whether a column header is contained in the collection before calling this method, use the method. + The method enables you to determine the position of a column header in the collection. To determine whether a column header is contained in the collection before calling this method, use the method. ]]> @@ -900,11 +900,11 @@ returns -1`.` + The key comparison is not case-sensitive. If `key` is `null` or an empty string, returns -1`.` The property corresponds to the key for a column in the . - If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. ]]> @@ -954,7 +954,7 @@ method. If you want to add an array of column headers to the collection, use the method. + To add a column header without specifying a position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. ]]> @@ -998,9 +998,9 @@ method enables you to insert an existing at a specific position in the . + This version of the method enables you to insert an existing at a specific position in the . - If you want to create a new and insert it at a specific position in the collection, use the other version of the method. To add a column header without specifying a specific position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. + If you want to create a new and insert it at a specific position in the collection, use the other version of the method. To add a column header without specifying a specific position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. ]]> @@ -1047,7 +1047,7 @@ method. If you want to add an array of column headers to the collection, use the method. + To add a column header without specifying a position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. ]]> @@ -1090,7 +1090,7 @@ method. If you want to add an array of column headers to the collection, use the method. + To add a column header without specifying a position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. The property corresponds to the key for a column in the . @@ -1137,7 +1137,7 @@ method. If you want to add an array of column headers to the collection, use the method. + To add a column header without specifying a position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. The property corresponds to the key for a column in the . @@ -1192,7 +1192,7 @@ method enables you to create a new with specific column header text, width, and text alignment setting and insert it at a specific position in the . You can use this method if you want to insert a new column header into an existing collection of column headers. If you want to use an existing and insert it at a specific position in the collection, use the other version of the method. To add a column header without specifying a specific position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. + This version of the method enables you to create a new with specific column header text, width, and text alignment setting and insert it at a specific position in the . You can use this method if you want to insert a new column header into an existing collection of column headers. If you want to use an existing and insert it at a specific position in the collection, use the other version of the method. To add a column header without specifying a specific position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. ]]> @@ -1245,7 +1245,7 @@ method. If you want to add an array of column headers to the collection, use the method. + To add a column header without specifying a position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. The property corresponds to the key for a column in the . @@ -1303,7 +1303,7 @@ method. If you want to add an array of column headers to the collection, use the method. + To add a column header without specifying a position in the collection, use the method. If you want to add an array of column headers to the collection, use the method. The property corresponds to the key for a column in the . @@ -1402,7 +1402,7 @@ stored at a specific location in the collection. To determine the index of a specific column header in the collection, use the method. + You can use this method to obtain the stored at a specific location in the collection. To determine the index of a specific column header in the collection, use the method. ]]> @@ -1445,7 +1445,7 @@ returns `null`. + The key comparison is not case-sensitive. If `key` is `null` or an empty string, returns `null`. ]]> @@ -1485,7 +1485,7 @@ to remove. To specify the index of the column header to remove instead of the column header itself, use the method. To remove all column headers from the collection, use the method. + When you remove a column header from the collection, the indexes change for subsequent column headers in the collection. All information about the removed column header is deleted. You can use this method to remove a specific column header from the collection by specifying the actual to remove. To specify the index of the column header to remove instead of the column header itself, use the method. To remove all column headers from the collection, use the method. ]]> @@ -1530,7 +1530,7 @@ method. To remove all column headers from the collection, use the method. + When you remove a column header from the collection, the indexes change for subsequent column headers in the collection. All information about the removed column header is deleted. You can use this method to remove a specific column header from the collection by specifying the index of the column header to remove from the collection. To specify the column header to remove instead of the index to the column header, use the method. To remove all column headers from the collection, use the method. ]]> @@ -1575,7 +1575,7 @@ ## Remarks The property corresponds to the key for a column in the . - The key comparison is not-case sensitive. If `key` is `null` or an empty string, does not change the collection`.` + The key comparison is not-case sensitive. If `key` is `null` or an empty string, does not change the collection`.` ]]> diff --git a/xml/System.Windows.Forms/ListView+ListViewItemCollection.xml b/xml/System.Windows.Forms/ListView+ListViewItemCollection.xml index 65a12443adf..9989fb61f09 100644 --- a/xml/System.Windows.Forms/ListView+ListViewItemCollection.xml +++ b/xml/System.Windows.Forms/ListView+ListViewItemCollection.xml @@ -50,9 +50,9 @@ ## Remarks A stores the items displayed in a control or assigned to a . There are two other collections defined within the class that enable you to determine what items are selected within a control. The class provides properties and methods for determining what items are selected in a control, while the class enables you to determine what indexes within the of a control are selected. In addition to selection collection classes, there are also two classes that enable you to determine what items are checked (when the property of the control is set to `true`) within this collection. - There are a number of ways to add items to the collection. The method adds a single item to the collection. To add a number of items to the collection, you create an array of items and pass it to the method. If you want to insert an item at a specific location in the collection, you can use the method. To remove items, you can use either the method or the method if you know where the item is located in the collection. The method enables you to remove all items from the collection instead of using the method to remove a single item at a time. + There are a number of ways to add items to the collection. The method adds a single item to the collection. To add a number of items to the collection, you create an array of items and pass it to the method. If you want to insert an item at a specific location in the collection, you can use the method. To remove items, you can use either the method or the method if you know where the item is located in the collection. The method enables you to remove all items from the collection instead of using the method to remove a single item at a time. - In addition to methods and properties for adding and removing items, the also provides methods to find items in the collection. The method enables you to determine whether an item is a member of the collection. Once you know that the item is located in the collection, you can use the method to determine where the item is located in the collection. + In addition to methods and properties for adding and removing items, the also provides methods to find items in the collection. The method enables you to determine whether an item is a member of the collection. Once you know that the item is located in the collection, you can use the method to determine where the item is located in the collection. @@ -164,9 +164,9 @@ method to create a new to add to a control. The text of the new added to the control is based on the `text` parameter. If you want to specify an image for the item, use the version of the method that accepts an image index as a parameter. If you have an existing that you want to add to the collection, use the version of the method that accepts a as its parameter. + You can use this version of the method to create a new to add to a control. The text of the new added to the control is based on the `text` parameter. If you want to specify an image for the item, use the version of the method that accepts an image index as a parameter. If you have an existing that you want to add to the collection, use the version of the method that accepts a as its parameter. - If the property is set to a value other than or if the property is set, the list is sorted after the item is added. Otherwise, the item is inserted at the end of the list. If the list is not sorted, you can use the method to insert an item into the at a specific position. To add a set of items to the control in a single operation, use the method. If you want to use the method to add a large number of items to the control, use the and methods to prevent the from repainting until all items are added. When adding items to a , it is more efficient to sort the items first and then add new items. + If the property is set to a value other than or if the property is set, the list is sorted after the item is added. Otherwise, the item is inserted at the end of the list. If the list is not sorted, you can use the method to insert an item into the at a specific position. To add a set of items to the control in a single operation, use the method. If you want to use the method to add a large number of items to the control, use the and methods to prevent the from repainting until all items are added. When adding items to a , it is more efficient to sort the items first and then add new items. ]]> @@ -210,11 +210,11 @@ method to add an existing to the collection. This version of the method is typically used to reuse items from other controls or if the was created manually before adding it to the collection. If you want to create a new instead of using an existing item, use the other versions of the method. + You can use this version of the method to add an existing to the collection. This version of the method is typically used to reuse items from other controls or if the was created manually before adding it to the collection. If you want to create a new instead of using an existing item, use the other versions of the method. - If the property is set to a value other than or if the property is set, the list is sorted after the item is added. Otherwise, the item is inserted at the end of the list. If the list is not sorted, you can use the method to insert an item into the at a specific position. To add a set of items to the control in a single operation, use the method. If you want to use the method to add a large number of items to the control, use the and methods to prevent the from repainting until all items are added. When adding items to a , it is more efficient to sort the items first and then add new items. + If the property is set to a value other than or if the property is set, the list is sorted after the item is added. Otherwise, the item is inserted at the end of the list. If the list is not sorted, you can use the method to insert an item into the at a specific position. To add a set of items to the control in a single operation, use the method. If you want to use the method to add a large number of items to the control, use the and methods to prevent the from repainting until all items are added. When adding items to a , it is more efficient to sort the items first and then add new items. - This version of the method is also used to assign a to a . + This version of the method is also used to assign a to a . ]]> @@ -268,9 +268,9 @@ method to create a new to add to the control. The text of the new added to the control is based on the `text` parameter. You can also specify an image for the item by passing the index of the assigned to the and properties to the `imageIndex` parameter. (Typically, the and properties use the same index positions to display related images.) If you do not want to specify an image index for the item, use the version of the method that accepts only a string as a parameter. If you have an existing that you want to add to the collection, use the version of the method that accepts a as its parameter. + You can use this version of the method to create a new to add to the control. The text of the new added to the control is based on the `text` parameter. You can also specify an image for the item by passing the index of the assigned to the and properties to the `imageIndex` parameter. (Typically, the and properties use the same index positions to display related images.) If you do not want to specify an image index for the item, use the version of the method that accepts only a string as a parameter. If you have an existing that you want to add to the collection, use the version of the method that accepts a as its parameter. - If the property is set to a value other than or if the property is set, the list is sorted after the item is added. Otherwise, the item is inserted at the end of the list. If the list is not sorted, you can use the method to insert an item into the at a specific position. To add a set of items to the control in a single operation, use the method. If you want to use the method to add a large number of items to the control, use the and methods to prevent the from repainting until all items are added. When adding items to a , it is more efficient to sort the items first and then add new items. + If the property is set to a value other than or if the property is set, the list is sorted after the item is added. Otherwise, the item is inserted at the end of the list. If the list is not sorted, you can use the method to insert an item into the at a specific position. To add a set of items to the control in a single operation, use the method. If you want to use the method to add a large number of items to the control, use the and methods to prevent the from repainting until all items are added. When adding items to a , it is more efficient to sort the items first and then add new items. ]]> @@ -363,7 +363,7 @@ ## Remarks If the is sorted, the item is added in the correctly sorted order; otherwise, it is added to the end of the collection. The property corresponds to the key for a in the . - The method sets the property to the specified key, so the item can be retrieved by its index or by key. + The method sets the property to the specified key, so the item can be retrieved by its index or by key. ]]> @@ -411,7 +411,7 @@ ## Remarks The property corresponds to the key for a in the . - If the is sorted, the item is added in the correctly sorted order; otherwise, it is added to the end of the collection. The method sets the property of the item to the specified key, so the item can be retrieved by its index or by key. + If the is sorted, the item is added in the correctly sorted order; otherwise, it is added to the end of the collection. The method sets the property of the item to the specified key, so the item can be retrieved by its index or by key. ]]> @@ -459,7 +459,7 @@ is sorted, the method will add the items in sorted order; otherwise, it will add them to the end of the collection. + If the containing is sorted, the method will add the items in sorted order; otherwise, it will add them to the end of the collection. ]]> @@ -519,30 +519,30 @@ control. If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. + You can use this method to reuse items from a different control. If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. You can also use this method to assign multiple objects to a . - If the property is set to a value other than or if the property is set, the list is sorted after the items are added. Otherwise, the items are inserted at the end of the list. If the list is not sorted, you can use the method to insert items into the at specific positions. + If the property is set to a value other than or if the property is set, the list is sorted after the items are added. Otherwise, the items are inserted at the end of the list. If the list is not sorted, you can use the method to insert items into the at specific positions. ## Examples - The following example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and called the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -593,7 +593,7 @@ or method. + When you remove items from the collection, all information about the deleted items is lost. To remove a single item from the collection, use the or method. ]]> @@ -637,7 +637,7 @@ method enables you to determine whether a is a member of the collection. Once you know that the item is in the collection, you can use the method to determine the position of the item in the collection. + The method enables you to determine whether a is a member of the collection. Once you know that the item is in the collection, you can use the method to determine the position of the item in the collection. ]]> @@ -856,7 +856,7 @@ is in virtual mode, you cannot enumerate through the using an enumerator or call . Instead, use the property to access an item by index value. + When the owner is in virtual mode, you cannot enumerate through the using an enumerator or call . Instead, use the property to access an item by index value. ]]> @@ -898,7 +898,7 @@ method enables you to determine the position of an item in the collection. To determine whether an item is contained in the collection before calling this method, use the method. + The method enables you to determine the position of an item in the collection. To determine whether an item is contained in the collection before calling this method, use the method. ]]> @@ -940,11 +940,11 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1`.` + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1`.` ]]> @@ -1004,12 +1004,12 @@ method allows you to insert a new item at a specific position in the . The text specified in the `text` parameter is used to create a new that is then inserted into the at the specified location. + This version of the method allows you to insert a new item at a specific position in the . The text specified in the `text` parameter is used to create a new that is then inserted into the at the specified location. > [!NOTE] > If the property is set to a value other than or if the property is set, the list is sorted after the item is inserted. - To add an item without specifying a specific position in the collection, use the method. If you want to add an array of items to the collection, use the method. You can use this method if you want to insert a new item into an existing collection of items. + To add an item without specifying a specific position in the collection, use the method. If you want to add an array of items to the collection, use the method. You can use this method if you want to insert a new item into an existing collection of items. ]]> @@ -1055,12 +1055,12 @@ method allows you to insert an existing at a specific position in the . + This version of the method allows you to insert an existing at a specific position in the . > [!NOTE] > If the property is set to a value other than or if the property is set, the list is sorted after the item is inserted. - To add an item without specifying a specific position in the collection to add the item, use the method. If you want to add an array of items to the collection, use the method. You can use this method if you want to insert a new item into an existing collection of items. + To add an item without specifying a specific position in the collection to add the item, use the method. If you want to add an array of items to the collection, use the method. You can use this method if you want to insert a new item into an existing collection of items. ]]> @@ -1116,14 +1116,14 @@ method allows you to insert a new item at a specific position in the . The text specified in the `text` parameter is used to create a new that is then inserted into the at the specified location. + This version of the method allows you to insert a new item at a specific position in the . The text specified in the `text` parameter is used to create a new that is then inserted into the at the specified location. > [!NOTE] > If the property is set to a value other than or if the property is set, the list is sorted after the item is inserted. - You can also use this version of the method to specify an image for the item by passing the index of the assigned to the and properties to the `imageIndex` parameter. (Typically, the and properties use the same index positions to display related images.) If you do not want to specify an image index for the item, use the other version of the method that accepts a string as a parameter. + You can also use this version of the method to specify an image for the item by passing the index of the assigned to the and properties to the `imageIndex` parameter. (Typically, the and properties use the same index positions to display related images.) If you do not want to specify an image index for the item, use the other version of the method that accepts a string as a parameter. - To add an item without specifying a specific position in the collection, use the method. If you want to add an array of items to the collection, use the method. + To add an item without specifying a specific position in the collection, use the method. If you want to add an array of items to the collection, use the method. ]]> @@ -1212,7 +1212,7 @@ method sets the property of the item to the specified key, so the item can be retrieved by its index or by key. + The method sets the property of the item to the specified key, so the item can be retrieved by its index or by key. ]]> @@ -1260,7 +1260,7 @@ method sets the property of the item to the specified key, so the item can be retrieved by its index or by key. + The method sets the property of the item to the specified key, so the item can be retrieved by its index or by key. ]]> @@ -1404,7 +1404,7 @@ stored at a specific location in the collection. To determine the index of a specific item in the collection, use the method. + You can use this method to obtain the stored at a specific location in the collection. To determine the index of a specific item in the collection, use the method. ]]> @@ -1446,7 +1446,7 @@ method. To remove all items from the collection, use the method. + When you remove an item from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted. You can use this method to remove a specific item from the collection by specifying the actual item to remove. To specify the index of the item to remove instead of the item itself, use the method. To remove all items from the collection, use the method. ]]> @@ -1492,7 +1492,7 @@ method. To remove all items from the collection, use the method. + When you remove an item from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted. You can use this method to remove a specific item from the collection by specifying the index of the item to remove from the collection. To specify the item to remove instead of the index to the item, use the method. To remove all items from the collection, use the method. ]]> @@ -1660,7 +1660,7 @@ This member is an explicit interface member implementation. It can be used only , it is added to the . If `item` is another type, a new is created containing the string from the method of `item`. + The `item` parameter can be any type. If `item` is a , it is added to the . If `item` is another type, a new is created containing the string from the method of `item`. ]]> @@ -1783,7 +1783,7 @@ This member is an explicit interface member implementation. It can be used only , it is added to the . If `item` is another type, a new is created containing the string from the method of `item`. + The `item` parameter can be any type. If `item` is a , it is added to the . If `item` is another type, a new is created containing the string from the method of `item`. ]]> @@ -1879,7 +1879,7 @@ This member is an explicit interface member implementation. It can be used only , it is added to the . If `item` is another type, a new is created containing the string from the method of `item`. + The `item` parameter can be set to any type. If `item` is a , it is added to the . If `item` is another type, a new is created containing the string from the method of `item`. ]]> diff --git a/xml/System.Windows.Forms/ListView+SelectedIndexCollection.xml b/xml/System.Windows.Forms/ListView+SelectedIndexCollection.xml index 3d4565324d4..56046a36aa4 100644 --- a/xml/System.Windows.Forms/ListView+SelectedIndexCollection.xml +++ b/xml/System.Windows.Forms/ListView+SelectedIndexCollection.xml @@ -68,10 +68,10 @@ |1|3| |2|4| - You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an index position from the is one of the indexes stored in the . Once you know that the item is in the collection, you can use the method to determine the position of the index in the . + You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an index position from the is one of the indexes stored in the . Once you know that the item is in the collection, you can use the method to determine the position of the index in the . ## Examples - The following code example demonstrates how to use the , , and members and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or event handler. This example requires that the event handler is correctly associated with the event. + The following code example demonstrates how to use the , , and members and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or event handler. This example requires that the event handler is correctly associated with the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -245,7 +245,7 @@ method enables you to determine whether an index position from the is one of the selected indexes stored in the . Once you know that an item is in the selected index collection, you can use the method to determine the position of the index in the . + The method enables you to determine whether an index position from the is one of the selected indexes stored in the . Once you know that an item is in the selected index collection, you can use the method to determine the position of the index in the . ]]> @@ -412,7 +412,7 @@ method), you can use the method to determine the position of the index in the . + Once you know that an item is in the selected index collection (using the method), you can use the method to determine the position of the index in the . ]]> @@ -536,7 +536,7 @@ is in virtual mode and the handle for the owner has not been created (you can check this using the property), calling the method will have no effect on the . + If the is in virtual mode and the handle for the owner has not been created (you can check this using the property), calling the method will have no effect on the . ]]> diff --git a/xml/System.Windows.Forms/ListView+SelectedListViewItemCollection.xml b/xml/System.Windows.Forms/ListView+SelectedListViewItemCollection.xml index 6912707c120..aa2027f9945 100644 --- a/xml/System.Windows.Forms/ListView+SelectedListViewItemCollection.xml +++ b/xml/System.Windows.Forms/ListView+SelectedListViewItemCollection.xml @@ -68,10 +68,10 @@ | 1 | Item4 | | 2 | Item5 | -You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an item from the class is a member of the . Once you know that the item is in the collection, you can use the method to determine the position of the item in the . +You can use the properties and methods of this class to perform a variety of tasks with the collection. The method enables you to determine whether an item from the class is a member of the . Once you know that the item is in the collection, you can use the method to determine the position of the item in the . ## Examples - The following code example demonstrates using the , event, and members and the class. To run this example, paste the following code in a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or the event handler. This example requires that the event handler is correctly associated with the event + The following code example demonstrates using the , event, and members and the class. To run this example, paste the following code in a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or the event handler. This example requires that the event handler is correctly associated with the event :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -190,7 +190,7 @@ You can use the properties and methods of this class to perform a variety of tas method enables you to determine whether an item from the class is one of the selected items stored in the . Once you know that the item is in the selected item collection, you can use the method to determine the position of the item in the . + The method enables you to determine whether an item from the class is one of the selected items stored in the . Once you know that the item is in the selected item collection, you can use the method to determine the position of the item in the . ]]> @@ -234,7 +234,7 @@ You can use the properties and methods of this class to perform a variety of tas ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. ]]> @@ -400,7 +400,7 @@ You can use the properties and methods of this class to perform a variety of tas method), you can use the method to determine the position of the item in the . + Once you know that an item is in the selected item collection (using the method), you can use the method to determine the position of the item in the . ]]> @@ -443,9 +443,9 @@ You can use the properties and methods of this class to perform a variety of tas ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. - If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. ]]> @@ -585,7 +585,7 @@ You can use the properties and methods of this class to perform a variety of tas ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. ]]> diff --git a/xml/System.Windows.Forms/ListView.xml b/xml/System.Windows.Forms/ListView.xml index 24a7821fd9d..5ea352d498c 100644 --- a/xml/System.Windows.Forms/ListView.xml +++ b/xml/System.Windows.Forms/ListView.xml @@ -68,19 +68,19 @@ ## Remarks A control allows you to display a list of items with item text and, optionally, an icon to identify the type of item. For example, the Windows Explorer list of files is similar in appearance to a control. It displays a list of the files and folders currently selected in the tree. Each file and folder displays an icon associated with it to help identify the type of file or folder. The class represents an item within a control. The items that are displayed in the list can be shown in one of five different views. Items can be displayed as large icons, as small icons, or as small icons in a vertical list. Items can also have subitems which contain information that is related to the parent item. The details view allows you to display the item and its subitems in a grid with column headers that identify the information being displayed in a subitem. The tile view, which has limited availability as described below, allows you to display the item and its subitems as a tile that contains a large icon next to the textual information. supports single or multiple selection. The multiple selection feature lets the user select from a list of items in a way similar to a control. Additionally, the user can activate selected items to perform a task. For example, you could use a control to display a list of files that the application can then open and utilize. The user can select the files to open and then double-click them to activate the items and open the files in the application. The can also display check boxes, using the property, to allow the user to check the items that they want to perform an action on. You can use the control in a variety of ways. The control can be used to display information from an application, a database, or a text file. The can also be used to obtain information from the user, such as selecting a set of files to process. - provides a large number of properties that provide flexibility in appearance and behavior. The property allows you to change the way in which items are displayed. The , , and properties allow you to specify the objects that contain the images displayed for items and, in the case of the , the check boxes that are displayed when the property is set to `true`. To determine which items are checked, you can use the property to access the collection. The property allows access to the , which stores the column headers that are displayed when the property of the control is set to . Items are added and removed from the through the property. The property allows you to access the of the control, which provides methods for manipulating the items in the control. If you want to allow the user to edit the text of an item, you can use the property. When your control contains a large number of items, it is often easier for the user to see them in a sorted list. You can use the property to sort the items alphabetically. You can also completely customize the appearance of a control. To do this, set the property to `true` and handle one or more of the following events: , , . + provides a large number of properties that provide flexibility in appearance and behavior. The property allows you to change the way in which items are displayed. The , , and properties allow you to specify the objects that contain the images displayed for items and, in the case of the , the check boxes that are displayed when the property is set to `true`. To determine which items are checked, you can use the property to access the collection. The property allows access to the , which stores the column headers that are displayed when the property of the control is set to . Items are added and removed from the through the property. The property allows you to access the of the control, which provides methods for manipulating the items in the control. If you want to allow the user to edit the text of an item, you can use the property. When your control contains a large number of items, it is often easier for the user to see them in a sorted list. You can use the property to sort the items alphabetically. You can also completely customize the appearance of a control. To do this, set the property to `true` and handle one or more of the following events: , , . Many of the properties of the control are used when the property of the control is set to . The property allows the user of your control to reconfigure the order of columns at run time. The property allows an item and its subitems to be selected instead of just the item. To display gridlines in the details view to identify the boundaries of items and subitems in the , you can use the property. The property allows you to specify the type of column headers to display. - A control can operate in virtual mode, where objects are generated dynamically instead of being stored in the collection. This can be useful for dealing with very large lists or lists whose contents frequently change. To enable Virtual mode, set the property to `true` and handle the , , and events. + A control can operate in virtual mode, where objects are generated dynamically instead of being stored in the collection. This can be useful for dealing with very large lists or lists whose contents frequently change. To enable Virtual mode, set the property to `true` and handle the , , and events. - In addition to the many properties that are available for a control, there are methods and events that your application can use to provide additional capabilities to the . The and methods allow you to improve performance when you add many items to a by preventing the control from repainting every time that an item is added. If your control is displaying items and subitems, you may want to provide functionality when the user right-clicks a subitem. To determine the item whose subitem is being clicked, you can use the method. When performing validation of the items after the user has edited them, you may want to display a specific item to the user to change. The method can be called to ensure that the specific item is in the visible area of the control. + In addition to the many properties that are available for a control, there are methods and events that your application can use to provide additional capabilities to the . The and methods allow you to improve performance when you add many items to a by preventing the control from repainting every time that an item is added. If your control is displaying items and subitems, you may want to provide functionality when the user right-clicks a subitem. To determine the item whose subitem is being clicked, you can use the method. When performing validation of the items after the user has edited them, you may want to display a specific item to the user to change. The method can be called to ensure that the specific item is in the visible area of the control. If the property set to `true`, you can perform tasks such as validating the text being edited before and after the text changed by creating an event handler for the and events. To perform tasks such as opening a file or displaying a dialog box to edit an item displayed in a , you can create an event handler for the event. If you allow the user to sort the items in a when they click a column header, you can create an event handler for the event to perform the sorting. When the property is set to `true`, you can determine when a change in an item's check state has occurred by handling the event. You can also set a background image for the with the property. Your application must have the on its `Main` method to correctly display the background image for the control. In addition, if a control with a background image is hosted in Internet Explorer, specify comctl32.dll version 6.0 as a dependent assembly in the application manifest file to ensure the background image is properly displayed. - Windows XP and Windows Server 2003 provide three features that enhance the control when your application calls the method: tile view, grouping, and the insertion mark. + Windows XP and Windows Server 2003 provide three features that enhance the control when your application calls the method: tile view, grouping, and the insertion mark. The tile view lets you balance graphical and textual information by displaying item and subitem text next to large icons. Set the property to to enable this behavior. @@ -88,7 +88,7 @@ The insertion mark feature lets you provide drag-and-drop item repositioning with visual feedback to indicate drop locations. Use the object retrieved through the property to display the insertion mark. - These features are available only under Windows XP and Windows Server 2003. On earlier operating systems, the code that relate to these features has no effect, the tile view appears as the large icon view, and the insertion mark and groups do not display. In some cases, you might want to include code that determines whether these features are available, and provide alternate functionality when they are unavailable. These features are provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. + These features are available only under Windows XP and Windows Server 2003. On earlier operating systems, the code that relate to these features has no effect, the tile view appears as the large icon view, and the insertion mark and groups do not display. In some cases, you might want to include code that determines whether these features are available, and provide alternate functionality when they are unavailable. These features are provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. The following table shows some of the members and the views they are valid in. @@ -96,26 +96,26 @@ |---------------------|----------| | property| or | | property| or | -| method|| +| method|| | property| or | | event|| -| method|, , or | -| method| or | -| method| or | +| method|, , or | +| method| or | +| method| or | | property|All views except | | property|| | property|, , or | ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- -- -- -- -- -- -- +- +- +- +- +- +- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -157,21 +157,21 @@ control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -270,7 +270,7 @@ The event occurs when the user finishes modifying the text for an item. The new string that the user types for the item is passed to the event, and the event handler can reject the change. If the event handler rejects the change, the text reverts to the text as it was before the user began editing the item. > [!NOTE] -> Because the event takes place before the label edit is committed, calling the method in a handler for this event will sort the item using the original value. +> Because the event takes place before the label edit is committed, calling the method in a handler for this event will sort the item using the original value. In order for the event to be raised, the property of the control must be set to `true`. @@ -394,21 +394,21 @@ ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -468,7 +468,7 @@ method is only useful when the property is set to or . Calling this version of the method arranges the items based on the value of the property. To cause the items to be aligned based on a value that differs from that of the property, use the other version of the method. + The method is only useful when the property is set to or . Calling this version of the method arranges the items based on the value of the property. To cause the items to be aligned based on a value that differs from that of the property, use the other version of the method. ]]> @@ -509,7 +509,7 @@ method is only useful when the property is set to or . This version of the method arranges the icons in the based on the value specified in the `value` parameter. Calling this method does not change the value of the property of the control. This method is used to arrange icons on the control using a different value than that of the property. To cause the items to be aligned based on the value of the property, use the other version of the method. + The method is only useful when the property is set to or . This version of the method arranges the icons in the based on the value specified in the `value` parameter. Calling this method does not change the value of the property of the control. This method is used to arrange icons on the control using a different value than that of the property. To cause the items to be aligned based on the value of the property, use the other version of the method. ]]> @@ -556,7 +556,7 @@ property only arranges items in the control when the property is set to or . To change the alignment of items in the control, use the property. You can use to ensure that all items in your control are automatically arranged to avoid overlapping at run time. + The property only arranges items in the control when the property is set to or . To change the alignment of items in the control, use the property. You can use to ensure that all items in your control are automatically arranged to avoid overlapping at run time. ]]> @@ -598,12 +598,12 @@ and containing have been constructed, and the column headers and columns are populated with items. If new items are added to the , the columns will not resize unless is called again. + Calling this method is only effective once the and containing have been constructed, and the column headers and columns are populated with items. If new items are added to the , the columns will not resize unless is called again. ## Examples - The following example initializes a in detail view and automatically resizes the columns using the method. To run this example, paste this code into a Windows Form and call the `InitializeResizingListView` method from the form's constructor or event handler. + The following example initializes a in detail view and automatically resizes the columns using the method. To run this example, paste this code into a Windows Form and call the `InitializeResizingListView` method from the form's constructor or event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/AutoResizeColumn/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet1"::: @@ -653,12 +653,12 @@ and containing have been constructed, and the column headers and columns are populated with items. If new items are added to the , the columns will not resize unless is called again. + Calling this method is only effective once the and containing have been constructed, and the column headers and columns are populated with items. If new items are added to the , the columns will not resize unless is called again. ## Examples - The following code example demonstrates initializing a in detail view and automatically resizing the columns using the method. To run this example, paste this code into a Windows Form and call the `InitializeResizingListView2` method from the form's constructor or event handler. + The following code example demonstrates initializing a in detail view and automatically resizing the columns using the method. To run this example, paste this code into a Windows Form and call the `InitializeResizingListView2` method from the form's constructor or event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/AutoResizeColumn/form1.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet9"::: @@ -927,7 +927,7 @@ ## Examples - The following code example demonstrates handling the event and using the and properties. To run the example, paste the following code into a form that contains a control named `ListView1` and populated with at least three items. Ensure the event handler in the example is associated with its event. + The following code example demonstrates handling the event and using the and properties. To run the example, paste the following code into a form that contains a control named `ListView1` and populated with at least three items. Ensure the event handler in the example is associated with its event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView3/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LabelEditEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -972,14 +972,14 @@ is to use the method of the (accessed through the property of the ). This enables you to add an array of items to the list in a single operation. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the every time that an item is added. When you have completed the task of adding items to the control, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when lots of items are being added to the control. + The preferred way to add multiple items to a is to use the method of the (accessed through the property of the ). This enables you to add an array of items to the list in a single operation. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the every time that an item is added. When you have completed the task of adding items to the control, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when lots of items are being added to the control. - If is called more than once, must be called an equivalent number of times. Until the last call to the will not repaint. Other than this, multiple calls to have no effect. + If is called more than once, must be called an equivalent number of times. Until the last call to the will not repaint. Other than this, multiple calls to have no effect. ## Examples - The following code example demonstrates initializing a control to contain check boxes. It also demonstrates how to use the and methods. To run this example, paste the following code into a form that contains a named `ListView1`. Call the `InitializeListView` method from the form's constructor or `Load` method. + The following code example demonstrates initializing a control to contain check boxes. It also demonstrates how to use the and methods. To run this example, paste the following code into a form that contains a named `ListView1`. Call the `InitializeListView` method from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -1075,7 +1075,7 @@ is `true`. Handling this event allows the to update the item information held in the cache so that it is readily available. This can improve performance on large lists, or lists whose items are expensive to calculate. + This event only occurs when is `true`. Handling this event allows the to update the item information held in the cache so that it is readily available. This can improve performance on large lists, or lists whose items are expensive to calculate. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1143,21 +1143,21 @@ ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -1328,12 +1328,12 @@ You can use this method to remove all items and columns from the control without having to call the individual `Clear` methods from the and classes. > [!NOTE] -> The method does not clear specified for the control. To clear call . +> The method does not clear specified for the control. To clear call . ## Examples - The following code example demonstrates the use of and members. To run this example, paste the following code into a form that contains a named `ListView1` and a button, located toward the bottom of the form, named `Button1`. Call the `InitializeListView` method from the form's constructor or `Load` method. + The following code example demonstrates the use of and members. To run this example, paste the following code into a form that contains a named `ListView1` and a button, located toward the bottom of the form, named `Button1`. Call the `InitializeListView` method from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView4/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/Clear/form1.cs" id="Snippet1"::: @@ -1383,7 +1383,7 @@ ## Examples - The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. + The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.ColumnClick/CPP/listviewsort1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView+ColumnHeaderCollection/Overview/listviewsort1.cs" id="Snippet1"::: @@ -1424,14 +1424,14 @@ event is a cancelable event and can be canceled by handling the event and setting the property to `true`. However, if the event is canceled, the of the will not change to the value. + The event is a cancelable event and can be canceled by handling the event and setting the property to `true`. However, if the event is canceled, the of the will not change to the value. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -1511,21 +1511,21 @@ ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -1576,7 +1576,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -1624,7 +1624,7 @@ ## Examples - The following code example demonstrates handling the event. It also demonstrates the and members. To run this example, paste the code into a Windows Form. Call `InitializeListView1` from the form's constructor or event handler. + The following code example demonstrates handling the event. It also demonstrates the and members. To run this example, paste the code into a Windows Form. Call `InitializeListView1` from the form's constructor or event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/AutoResizeColumn/form1.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet6"::: @@ -1801,7 +1801,7 @@ method when the component is no longer needed. This method removes the component from its container (if the component has a site) and triggers the dispose event. + Call the method when the component is no longer needed. This method removes the component from its container (if the component has a site) and triggers the dispose event. ]]> @@ -1874,7 +1874,7 @@ ## Examples - The following code example provides an implementation of a event handler. For the complete example, including the implementation of the event handler, see the reference topic. + The following code example provides an implementation of a event handler. For the complete example, including the implementation of the event handler, see the reference topic. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.vb" id="Snippet5"::: @@ -1925,14 +1925,14 @@ The event can occur for each item. When the property is set to , the and events also occur. In this case, you can handle the event to draw elements common to all items, such as the background, and handle the event to draw elements for individual subitems, such as text values. You can also draw all items in the control using only one of the two events, although this may be less convenient. To draw column headers in the details view, you must handle the event. > [!NOTE] -> Because of a bug in the underlying Win32 control, the event occurs without accompanying events once per row in the details view when the mouse pointer moves over the row, causing anything painted in a event handler to be painted over by a custom background drawn in a event handler. See the example in the reference topic for a workaround that invalidates each row when the extra event occurs. An alternative workaround is to put all your custom drawing code in a event handler and paint the background for the entire item (including subitems) only when the value is 0. +> Because of a bug in the underlying Win32 control, the event occurs without accompanying events once per row in the details view when the mouse pointer moves over the row, causing anything painted in a event handler to be painted over by a custom background drawn in a event handler. See the example in the reference topic for a workaround that invalidates each row when the extra event occurs. An alternative workaround is to put all your custom drawing code in a event handler and paint the background for the entire item (including subitems) only when the value is 0. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example provides an implementation of a event handler. For the complete example, see the reference topic. + The following code example provides an implementation of a event handler. For the complete example, see the reference topic. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.vb" id="Snippet3"::: @@ -1987,14 +1987,14 @@ The event can occur for each subitem. You can handle the event to draw elements common to all subitems, such as the background, and handle the event to draw elements for individual subitems, such as text values. You can also draw all items in the control using only one of the two events, although this may be less convenient. To draw column headers in the details view, you must handle the event. > [!NOTE] -> The event does not occur for any subitems for which no object has been added to the collection. Note also that the first subitem of each object represents the parent item itself, and is displayed in the first column. +> The event does not occur for any subitems for which no object has been added to the collection. Note also that the first subitem of each object represents the parent item itself, and is displayed in the first column. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example provides an implementation of a event handler. For the complete example, see the reference topic. + The following code example provides an implementation of a event handler. For the complete example, see the reference topic. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.vb" id="Snippet4"::: @@ -2042,14 +2042,14 @@ is to use the method of the (accessed through the property of the ). This enables you to add an array of items to the list in a single operation. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added. Once you have completed the task of adding items to the control, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the control. + The preferred way to add multiple items to a is to use the method of the (accessed through the property of the ). This enables you to add an array of items to the list in a single operation. However, if you want to add items one at a time using the method of the class, you can use the method to prevent the control from repainting the each time an item is added. Once you have completed the task of adding items to the control, call the method to enable the to repaint. This way of adding items can prevent flickered drawing of the when a large number of items are being added to the control. - If is called more than once, must be called an equivalent number of times. Until the last call to the will not repaint. Other than this, multiple calls to have no effect. + If is called more than once, must be called an equivalent number of times. Until the last call to the will not repaint. Other than this, multiple calls to have no effect. ## Examples - The following code example demonstrates initializing a control to contain check boxes. It also demonstrates using the and methods. To run this example, paste the following code into a form containing a named `ListView1`. Call the `InitializeListView` method from the form's constructor or `Load` method. + The following code example demonstrates initializing a control to contain check boxes. It also demonstrates using the and methods. To run this example, paste the following code into a form containing a named `ListView1`. Call the `InitializeListView` method from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -2096,7 +2096,7 @@ control. When performing validation on the items in a , you can call the method to ensure that an item that failed validation is displayed in the control to allow the user to perform changes on the item. If the item that you want to ensure is visible is located above the viewable region of the control, calling the method will scroll the contents of the control until it is the first item in the viewable area of the control. If the item is below the viewable region of the control, calling the method will scroll the contents of the control until the item is the last item in the viewable area of the control. + You can use this method to ensure that a specific item is visible within the control. When performing validation on the items in a , you can call the method to ensure that an item that failed validation is displayed in the control to allow the user to perform changes on the item. If the item that you want to ensure is visible is located above the viewable region of the control, calling the method will scroll the contents of the control until it is the first item in the viewable area of the control. If the item is below the viewable region of the control, calling the method will scroll the contents of the control until the item is the last item in the viewable area of the control. To determine if an item is located at the top of the display area of a control, use the property. @@ -2151,14 +2151,14 @@ ## Remarks The search is case-insensitive. - The `text` parameter can specify a substring of the desired matching text. In addition, this method will return the first item that starts with the specified text. For example, if a contains two list items - the first item's text set to "angle bracket" and the second item's text set to "bracket" - a call to passing `brack` as the parameter will return the item whose text is "bracket". + The `text` parameter can specify a substring of the desired matching text. In addition, this method will return the first item that starts with the specified text. For example, if a contains two list items - the first item's text set to "angle bracket" and the second item's text set to "bracket" - a call to passing `brack` as the parameter will return the item whose text is "bracket". - The method returns `null` if the list is empty or there is no matching item. + The method returns `null` if the list is empty or there is no matching item. ## Examples - The following code example demonstrates the method. To run this example, paste the following code into a Windows Form and call the `InitializeFindListView` method from the form's constructor or event handler. Click the button to see the results of the method call. + The following code example demonstrates the method. To run this example, paste the following code into a Windows Form and call the `InitializeFindListView` method from the form's constructor or event handler. Click the button to see the results of the method call. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/AutoResizeColumn/form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet3"::: @@ -2215,9 +2215,9 @@ ## Remarks The search is case-insensitive. - The `text` parameter can specify a substring of the desired matching text. In addition, this method will return the first item that starts with the specified text. For example, if a contains two list items - the first item's text set to "angle bracket" and the second item's text set to "bracket" - a call to passing "brack" as the parameter will return the item whose text is "bracket". + The `text` parameter can specify a substring of the desired matching text. In addition, this method will return the first item that starts with the specified text. For example, if a contains two list items - the first item's text set to "angle bracket" and the second item's text set to "bracket" - a call to passing "brack" as the parameter will return the item whose text is "bracket". - The method returns `null` if the list is empty or there is no matching item. + The method returns `null` if the list is empty or there is no matching item. ]]> @@ -2268,11 +2268,11 @@ method returns `null` if the list is empty or there is no matching item. + The method returns `null` if the list is empty or there is no matching item. The search is case-insensitive. - The `text` parameter can specify a substring of the desired matching text. This method will return the first item that starts with the specified text, unless `false` is passed in for `isPrefixSearch`. For example, if a contains two list items - the first item's text set to "angle bracket" and the second item's text set to "bracket" - a call to passing "brack" as the search text will return the item whose text is "bracket". If `isPrefixSearch` is set to `false`, this call will return `null`. + The `text` parameter can specify a substring of the desired matching text. This method will return the first item that starts with the specified text, unless `false` is passed in for `isPrefixSearch`. For example, if a contains two list items - the first item's text set to "angle bracket" and the second item's text set to "bracket" - a call to passing "brack" as the search text will return the item whose text is "bracket". If `isPrefixSearch` is set to `false`, this call will return `null`. ]]> @@ -2326,7 +2326,7 @@ method returns `null` if no item is found in the given direction. Identifying the nearest item can vary depending on the operating system the application is running on, and will affect the results of . + The method returns `null` if no item is found in the given direction. Identifying the nearest item can vary depending on the operating system the application is running on, and will affect the results of . ]]> @@ -2373,7 +2373,7 @@ method returns `null` if no item is found in the given direction. Identifying the nearest item can vary depending on the operating system the application is running on, and will affect the results of . + The method returns `null` if no item is found in the given direction. Identifying the nearest item can vary depending on the operating system the application is running on, and will affect the results of . ]]> @@ -2427,7 +2427,7 @@ property returns the that represents the item currently displaying the focus rectangle for the control. Because a control has no directly editable areas other than the items it displays, when the control has focus, an item within the displays the focus reticle around its item text. Typically, the last selected item in the control is the item with focus. Although an item may be the one displaying the focus reticle, it may not actually be a selected item in the . Use the or properties to obtain the selected items in the control, the property is not necessarily selected. You can use the property to determine which item was last clicked in the control, regardless of selection state. + The property returns the that represents the item currently displaying the focus rectangle for the control. Because a control has no directly editable areas other than the items it displays, when the control has focus, an item within the displays the focus reticle around its item text. Typically, the last selected item in the control is the item with focus. Although an item may be the one displaying the focus reticle, it may not actually be a selected item in the . Use the or properties to obtain the selected items in the control, the property is not necessarily selected. You can use the property to determine which item was last clicked in the control, regardless of selection state. ]]> @@ -2505,26 +2505,26 @@ The property has no effect unless the property of the control is set to . The property is typically used when a displays items with many subitems and it is important to be able to see selected items when the item text is not visible due to horizontal scrolling of the control's contents. > [!NOTE] -> When is set to `true`, ToolTips for a will not be shown; only the ToolTip for the parent is displayed. +> When is set to `true`, ToolTips for a will not be shown; only the ToolTip for the parent is displayed. ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -2576,20 +2576,20 @@ method lets you determine which item is located at a specific location within the client region of the control. You can use this method when the user clicks or right-clicks a subitem (when the property is set to `View.Details`) and you want to determine which item owns the subitem that was clicked based on the mouse coordinates at the time the user clicked the mouse. + The method lets you determine which item is located at a specific location within the client region of the control. You can use this method when the user clicks or right-clicks a subitem (when the property is set to `View.Details`) and you want to determine which item owns the subitem that was clicked based on the mouse coordinates at the time the user clicked the mouse. > [!NOTE] -> When the property value is `false`, this method returns an item only when the specified location is within the bounds of the parent item (which is displayed in the first column when the control is in details mode). You must set the property to `true` to retrieve an item with this method given a location within the bounds of a subitem. You can also use the method to retrieve detailed information about the item at a particular location. +> When the property value is `false`, this method returns an item only when the specified location is within the bounds of the parent item (which is displayed in the first column when the control is in details mode). You must set the property to `true` to retrieve an item with this method given a location within the bounds of a subitem. You can also use the method to retrieve detailed information about the item at a particular location. - To do drag-and-drop repositioning of items within a , you might want to use the method rather than the method. The method finds the closest item regardless of where the mouse pointer is located. The method, on the other hand, returns `null` if there is no item at the specified location. + To do drag-and-drop repositioning of items within a , you might want to use the method rather than the method. The method finds the closest item regardless of where the mouse pointer is located. The method, on the other hand, returns `null` if there is no item at the specified location. > [!NOTE] -> The class is supported only on Windows XP and Windows Server 2003 when your application calls the method. +> The class is supported only on Windows XP and Windows Server 2003 when your application calls the method. ## Examples - The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Samples directory. The method is used in when handling the control's event to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires the existence of JPG files located in the C:\documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run this example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or `Load` method. Ensure all events are associated with their event handlers. + The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Samples directory. The method is used in when handling the control's event to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires the existence of JPG files located in the C:\documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run this example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or `Load` method. Ensure all events are associated with their event handlers. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet2"::: @@ -2654,7 +2654,7 @@ method represents the entire item, including the icon, item text, and subitem text. To specify a specific portion of the item's bounding rectangle, use the other version of the method. + The bounding rectangle returned by this version of the method represents the entire item, including the icon, item text, and subitem text. To specify a specific portion of the item's bounding rectangle, use the other version of the method. ]]> @@ -2699,7 +2699,7 @@ method represents only the section of the item specified in the `portion` parameter. To return the bounding rectangle of the entire item, use the other version of the method. + The bounding rectangle returned by this version of the method represents only the section of the item specified in the `portion` parameter. To return the bounding rectangle of the entire item, use the other version of the method. ]]> @@ -2751,21 +2751,21 @@ ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -2918,21 +2918,21 @@ groups help your users find the items they are looking for by separating the items into useful categories. You can create whatever categories you need. One typical approach is to group the items based on the way the list is sorted. For example, you can group the items by the initial letter of the item name when the list is sorted alphabetically or by subitems such as type or date when the list is sorted by clicking a column header in the details view. Windows Explorer uses this type of grouping. - To use the grouping feature, add one or more objects to the collection of a control. Set the group header text and header alignment in the constructor, or set them using the and properties. + To use the grouping feature, add one or more objects to the collection of a control. Set the group header text and header alignment in the constructor, or set them using the and properties. To temporarily disable the grouping feature, set the property to `false`. - You can assign an item to a group by specifying the group in the constructor, by setting the property, or by directly adding the item to the collection of a group. All items should be assigned to groups before they are displayed. Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. + You can assign an item to a group by specifying the group in the constructor, by setting the property, or by directly adding the item to the collection of a group. All items should be assigned to groups before they are displayed. Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. - An item can only be in one group at a time. You can change the group to which an item belongs by setting the property at run time or by adding it to the collection of another group, which automatically removes it from the previous group. + An item can only be in one group at a time. You can change the group to which an item belongs by setting the property at run time or by adding it to the collection of another group, which automatically removes it from the previous group. The insertion mark feature is disabled when using groups. This is because the grouping feature orders items by group membership, while the insertion mark feature is used with drag-and-drop repositioning in a control that does not already order its items. - groups are available only on Windows XP and Windows Server 2003 when your application calls the method. On earlier operating systems, any code relating to groups has no effect and the groups will not appear. As a result, any code that depends on the grouping feature might not work correctly. + groups are available only on Windows XP and Windows Server 2003 when your application calls the method. On earlier operating systems, any code relating to groups has no effect and the groups will not appear. As a result, any code that depends on the grouping feature might not work correctly. You might want to include code that determines whether the grouping feature is available, and provide alternate functionality when it is unavailable. For example, you might want to provide alternate sorting when running on operating systems that do not support sorting by group. - The grouping feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. + The grouping feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. @@ -3033,7 +3033,7 @@ ## Examples - The following code example demonstrates a that allows multiple items to be selected. The example demonstrates setting the and properties. It also demonstrates the , and properties. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or event handler. + The following code example demonstrates a that allows multiple items to be selected. The example demonstrates setting the and properties. It also demonstrates the , and properties. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -3101,7 +3101,7 @@ When this property is set to `false`, selected items in the If you are concerned with the accessibility of your applications, it is recommended that you set the property to `false`. ## Examples - The following code example demonstrates a that allows multiple items to be selected. The example demonstrates setting the and properties. It also demonstrates the , , and properties. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or event handler. + The following code example demonstrates a that allows multiple items to be selected. The example demonstrates setting the and properties. It also demonstrates the , , and properties. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -3154,7 +3154,7 @@ When this property is set to `false`, selected items in the object has a property of "None"; and the and properties are set to `null`. + Use this method to determine whether a point is in an item or subitem and where in the item the point is located, such as on the label or image area. If the coordinates are located outside the control, the returned object has a property of "None"; and the and properties are set to `null`. ]]> @@ -3197,12 +3197,12 @@ When this property is set to `false`, selected items in the object has a property of "None"; and the and properties are set to `null`. + Use this method to determine whether a point is in an item or subitem, and where in the item the point is located, such as on the label or image area. If the coordinates are located outside the control, the returned object has a property of "None"; and the and properties are set to `null`. ## Examples - The following code example demonstrates using the method to determine the location of a mouse event in a . To run this example, paste it into a Windows Form that contains a named `listView1` that is populated with items. Associate the event for `listView1` with the `listView1_MouseDown` method in this example. + The following code example demonstrates using the method to determine the location of a mouse event in a . To run this example, paste it into a Windows Form that contains a named `listView1` that is populated with items. Associate the event for `listView1` with the `listView1_MouseDown` method in this example. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/AutoResizeColumn/form1.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet7"::: @@ -3356,9 +3356,9 @@ When this property is set to `false`, selected items in the class is typically used in a handler for the or event to update the position of the insertion mark as an item is dragged. It is also used in a handler for the or event to insert a dragged item at the correct location. For more information, see and [How to: Display an Insertion Mark in a Windows Forms ListView Control](/dotnet/desktop/winforms/controls/how-to-display-an-insertion-mark-in-a-windows-forms-listview-control). > [!NOTE] -> The insertion mark feature is available only on Windows XP and Windows Server 2003 when your application calls the method. On earlier operating systems, any code relating to the insertion mark has no effect and the insertion mark will not appear. As a result, any code that depends on the insertion mark feature might not work correctly. You might want to include code that determines whether this feature is available, and provide alternate functionality when it is unavailable. For example, you might want to bypass all code that implements drag-and-drop item repositioning when running on operating systems that do not support insertion marks. +> The insertion mark feature is available only on Windows XP and Windows Server 2003 when your application calls the method. On earlier operating systems, any code relating to the insertion mark has no effect and the insertion mark will not appear. As a result, any code that depends on the insertion mark feature might not work correctly. You might want to include code that determines whether this feature is available, and provide alternate functionality when it is unavailable. For example, you might want to bypass all code that implements drag-and-drop item repositioning when running on operating systems that do not support insertion marks. > -> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. +> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. @@ -3441,14 +3441,14 @@ When this property is set to `false`, selected items in the event occurs when the user activates one or more items in the control. The user can activate an item with either a single-click or double-click, depending on the value of the property, or with the keyboard. From within the event handler for the event, you can reference the or properties to access the collection of items selected in the to determine which items are being activated. + The event occurs when the user activates one or more items in the control. The user can activate an item with either a single-click or double-click, depending on the value of the property, or with the keyboard. From within the event handler for the event, you can reference the or properties to access the collection of items selected in the to determine which items are being activated. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -3505,7 +3505,7 @@ When this property is set to `false`, selected items in the control that handles the event. The method uses the and properties to retrieve and tally the price of the menu items selected. To run this example, paste the following code into a form containing a `ListView` named `ListView1` and a `TextBox` named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure that the event is associated with the event handler in this example. + The following code example demonstrates a checked control that handles the event. The method uses the and properties to retrieve and tally the price of the menu items selected. To run this example, paste the following code into a form containing a `ListView` named `ListView1` and a `TextBox` named `Textbox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. Ensure that the event is associated with the event handler in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ItemCheckEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -3557,7 +3557,7 @@ When this property is set to `false`, selected items in the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . For another example, see the event. The code there works equally well if the event handler is attached to the event. @@ -3601,14 +3601,14 @@ When this property is set to `false`, selected items in the event occurs when the user begins dragging an item. Typically the event handler for the event performs the task of dragging by calling the method. You can use this event to perform the tasks necessary to drag items into and out of your application's control. + The event occurs when the user begins dragging an item. Typically the event handler for the event performs the task of dragging by calling the method. You can use this event to perform the tasks necessary to drag items into and out of your application's control. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -3656,7 +3656,7 @@ When this property is set to `false`, selected items in the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -3733,21 +3733,21 @@ When this property is set to `false`, selected items in the control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -3799,7 +3799,7 @@ When this property is set to `false`, selected items in the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -3857,21 +3857,21 @@ When this property is set to `false`, selected items in the control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -3927,7 +3927,7 @@ When this property is set to `false`, selected items in the property is set to `true`, the item text is wrapped to the next line of text if needed. If the text is longer than two lines of text, the text is shortened. If the user selects the item, all the item text is displayed. If the property is set to `false`, all item text is displayed on a single line. The entire item text is displayed when the is set to `false`. This property is only used when the property is set to or . + When the property is set to `true`, the item text is wrapped to the next line of text if needed. If the text is longer than two lines of text, the text is shortened. If the user selects the item, all the item text is displayed. If the property is set to `false`, all item text is displayed on a single line. The entire item text is displayed when the is set to `false`. This property is only used when the property is set to or . ]]> @@ -3976,9 +3976,9 @@ When this property is set to `false`, selected items in the property allows you to specify an object that contains icons to use when displaying items with large icons (when the property is set to ). The control can accept any graphics format that the control supports when displaying icons. The control is not limited to .ico files. Once an is assigned to the property, you can set the property of each in the control to the index position of the appropriate image in the . The size of the icons for the is specified by the . + The property allows you to specify an object that contains icons to use when displaying items with large icons (when the property is set to ). The control can accept any graphics format that the control supports when displaying icons. The control is not limited to .ico files. Once an is assigned to the property, you can set the property of each in the control to the index position of the appropriate image in the . The size of the icons for the is specified by the . - Because only one index can be specified for the property, the objects specified in the and properties should have the same index positions for the images to display. For example, if the property of a is set to 0, the images to use for both small and large icons should be at the same index position in the objects specified in the and properties. + Because only one index can be specified for the property, the objects specified in the and properties should have the same index positions for the images to display. For example, if the property of a is set to 0, the images to use for both small and large icons should be at the same index position in the objects specified in the and properties. > [!NOTE] > When the images are specified with keys, you still need to place small and large versions of the image at the same index location in their respective image lists. When switching between views, the index location of the image in one list is used to locate the image in the other list, regardless of the key value specified. @@ -3988,21 +3988,21 @@ When this property is set to `false`, selected items in the control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -4063,19 +4063,19 @@ When this property is set to `false`, selected items in the property allows you to specify the object that performs the sorting of items in a control when the method is called or when items are added to the list. Note that items are not sorted automatically when their label text changes. + The property allows you to specify the object that performs the sorting of items in a control when the method is called or when items are added to the list. Note that items are not sorted automatically when their label text changes. - The specified object must be an instance of a class that implements the interface, which has a single method called . + The specified object must be an instance of a class that implements the interface, which has a single method called . - You can use this property to provide custom sorting, for example, when a column header is clicked in the details view. To do this, create a class that implements the interface and provides a constructor that accepts the index of a column to sort by. You can then implement a handler for the event that creates an instance of this class using the index of the clicked column. When you set the property to the new instance, the control is automatically sorted using the specified object. Subsequent calls to the method use the same object. + You can use this property to provide custom sorting, for example, when a column header is clicked in the details view. To do this, create a class that implements the interface and provides a constructor that accepts the index of a column to sort by. You can then implement a handler for the event that creates an instance of this class using the index of the clicked column. When you set the property to the new instance, the control is automatically sorted using the specified object. Subsequent calls to the method use the same object. > [!NOTE] -> When you set the value of the property, the method is called automatically. +> When you set the value of the property, the method is called automatically. ## Examples - The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. + The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.ColumnClick/CPP/listviewsort1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView+ColumnHeaderCollection/Overview/listviewsort1.cs" id="Snippet1"::: @@ -4134,7 +4134,7 @@ When this property is set to `false`, selected items in the that allows multiple items to be selected. The example demonstrates setting the and properties. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. + The following code example demonstrates a that allows multiple items to be selected. The example demonstrates setting the and properties. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -4185,7 +4185,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -4240,7 +4240,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4285,7 +4285,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4331,7 +4331,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4376,12 +4376,12 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. + The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.ColumnClick/CPP/listviewsort1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView+ColumnHeaderCollection/Overview/listviewsort1.cs" id="Snippet1"::: @@ -4431,7 +4431,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4475,7 +4475,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4521,7 +4521,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4565,7 +4565,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4609,7 +4609,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4655,7 +4655,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4914,7 +4914,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4961,7 +4961,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5007,7 +5007,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5052,7 +5052,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5098,7 +5098,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5142,7 +5142,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5213,11 +5213,11 @@ When this property is set to `false`, selected items in the method is called when the mouse is hovering over a , the method raises the event. + If the method is called when the mouse is hovering over a , the method raises the event. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5357,7 +5357,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5407,7 +5407,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5451,7 +5451,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5496,7 +5496,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5575,7 +5575,7 @@ When this property is set to `false`, selected items in the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5624,7 +5624,7 @@ When this property is set to `false`, selected items in the control is normally drawn by the operating system. In order to customize the appearance of items, subitems, and column headers, set the property to `true` and provide a handler for one or more of the following events: , , . This is called owner drawing. When the property is set to , all three events occur; otherwise, only the event occurs. > [!NOTE] -> Subitem information typically appears in the tile view as well as the details view, but in the tile view, it must be drawn in a handler for the event. The event does not occur for any subitems for which no object has been added to the collection. Note also that the first subitem of each object represents the parent item itself, and is displayed in the first column. +> Subitem information typically appears in the tile view as well as the details view, but in the tile view, it must be drawn in a handler for the event. The event does not occur for any subitems for which no object has been added to the collection. Note also that the first subitem of each object represents the parent item itself, and is displayed in the first column. In the details view, you can handle the event to draw elements common to all subitems, such as the background, and handle the event to draw elements for individual subitems, such as text values. You can also draw all items in the control using only one of the two events, although this may be less convenient. To draw column headers in the details view, you must handle the event. @@ -5873,9 +5873,9 @@ When this property is set to `false`, selected items in the method can be used whether the is in virtual mode or regular mode. + The method can be used whether the is in virtual mode or regular mode. - If the method has been called prior to the call to , the redraw will not occur. + If the method has been called prior to the call to , the redraw will not occur. ]]>
@@ -5917,7 +5917,7 @@ When this property is set to `false`, selected items in the object is in virtual mode, it creates objects dynamically instead of using the collection. This event is raised when the object must create a object. A handler for this event should create the appropriate or retrieve it from the cache, and pass it back by way of the property. + When a object is in virtual mode, it creates objects dynamically instead of using the collection. This event is raised when the object must create a object. A handler for this event should create the appropriate or retrieve it from the cache, and pass it back by way of the property. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -6020,7 +6020,7 @@ When this property is set to `false`, selected items in the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -6108,7 +6108,7 @@ When this property is set to `false`, selected items in the is in virtual mode and the or method is called. When handling this event, you should calculate which item from the list of items supplied by the property matches the search criteria and set the property to the index of the . If an item is not provided, and will return `null`. + This event occurs when a is in virtual mode and the or method is called. When handling this event, you should calculate which item from the list of items supplied by the property matches the search criteria and set the property to the index of the . If an item is not provided, and will return `null`. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -6155,7 +6155,7 @@ When this property is set to `false`, selected items in the collection changes whenever the property of a changes. The property change can occur programmatically or when the user selects an item or clears the selection of an item. When the user selects an item without pressing CTRL to perform a multiple selection, the control first clears the previous selection. In this case, this event occurs one time for each item that was previously selected and one time for the newly selected item. + The collection changes whenever the property of a changes. The property change can occur programmatically or when the user selects an item or clears the selection of an item. When the user selects an item without pressing CTRL to perform a multiple selection, the control first clears the previous selection. In this case, this event occurs one time for each item that was previously selected and one time for the newly selected item. To determine which items are selected in the control, use the property to access the . You can create an event handler for this event to perform tasks whenever there is a change to the selected items in the control. @@ -6164,7 +6164,7 @@ When this property is set to `false`, selected items in the property, event, members, and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. This example requires that the event handler is correctly associated with the event + The following code example demonstrates how to use the property, event, members, and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. This example requires that the event handler is correctly associated with the event :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -6234,7 +6234,7 @@ When this property is set to `false`, selected items in the , , and members and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. This example requires the event handler is correctly associated with the event. + The following code example demonstrates using the , , and members and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. This example requires the event handler is correctly associated with the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -6301,7 +6301,7 @@ When this property is set to `false`, selected items in the , event, and members and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. This example requires the event handler is correctly associated with the event + The following code example demonstrates using the , event, and members and the class. To run this example, paste the following code into a form that contains a object named `ListView1` and a named `TextBox1`. Call the `InitializeListView` method from the form's constructor or `Load` method. This example requires the event handler is correctly associated with the event :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeaderStyle/Overview/form1.cs" id="Snippet1"::: @@ -6353,7 +6353,7 @@ When this property is set to `false`, selected items in the control appear whenever the property is set to a value other than . The grouping feature lets you create visual groups of logically related items on Windows XP and Windows Server 2003. To enable this feature, your application must call the method. For more information, see the property. + Any groups assigned to a control appear whenever the property is set to a value other than . The grouping feature lets you create visual groups of logically related items on Windows XP and Windows Server 2003. To enable this feature, your application must call the method. For more information, see the property. ]]>
@@ -6405,7 +6405,7 @@ When this property is set to `false`, selected items in the and properties. To run this example, paste the code into a Windows Form and call `InitializeItemsWithToolTips` from the form's constructor or event handler. + The following code example demonstrates how to use the and properties. To run this example, paste the code into a Windows Form and call `InitializeItemsWithToolTips` from the form's constructor or event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/ShowItemToolTips/form1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/ShowItemToolTips/form1.vb" id="Snippet4"::: @@ -6456,9 +6456,9 @@ When this property is set to `false`, selected items in the property allows you to specify an object that contains icons to use when displaying items with small icons (when the property is set to any value other than ). The control can accept any graphics format that the control supports when displaying icons. The control is not limited to .ico files. Once an is assigned to the property, you can set the property of each in the control to the index position of the appropriate image in the . The size of the icons for the is specified by the property. + The property allows you to specify an object that contains icons to use when displaying items with small icons (when the property is set to any value other than ). The control can accept any graphics format that the control supports when displaying icons. The control is not limited to .ico files. Once an is assigned to the property, you can set the property of each in the control to the index position of the appropriate image in the . The size of the icons for the is specified by the property. - Because only one index can be specified for the property, the objects specified in the and properties should have the same index positions for the images to display. For example, if the property of a is set to 0, the images to use for both small and large icons should be at the same index position in the objects specified in the and properties. + Because only one index can be specified for the property, the objects specified in the and properties should have the same index positions for the images to display. For example, if the property of a is set to 0, the images to use for both small and large icons should be at the same index position in the objects specified in the and properties. > [!NOTE] > When the images are specified with keys, you still need to place small and large versions of the image at the same index location in their respective image lists. When switching between views, the index location of the image in one list is used to locate the image in the other list, regardless of the key value specified. @@ -6468,21 +6468,21 @@ When this property is set to `false`, selected items in the control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -6580,28 +6580,28 @@ When this property is set to `false`, selected items in the property allows you to specify whether or not items are sorted in the control. By default, no sorting is performed. When the property is set to or , the items in the are sorted automatically in ascending alphabetical order (when the property is set to ) or descending alphabetical order (when the property is set to ). You can use this property to automatically sort items that are displayed in your control to make it easier for users to find items when a large number of items are available. - If you want to perform your own item sorting instead of using the property, use the property in combination with the method. + If you want to perform your own item sorting instead of using the property, use the property in combination with the method. If the property is set to a value other than or if the property is set, the list is sorted automatically when items is added. Items are not sorted automatically when the label text changes. ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -6865,9 +6865,9 @@ When this property is set to `false`, selected items in the control. If the control contents are scrolled, a different item can be at the top of the control. You can use this property to indicate or determine which item is visible at the top of the control. The value of the property will not always persist, depending on where the desired top item is in the list view. - The number of items visible in a control at any time depends on the height of the list view and the size of the items it contains. If the items exceed the height of the list view, the items will continue onto multiple pages, which the user can scroll through. If you set the property to an item in the last page of the , the item will automatically be scrolled into view; however, will be set to the actual top item of the last page. + The number of items visible in a control at any time depends on the height of the list view and the size of the items it contains. If the items exceed the height of the list view, the items will continue onto multiple pages, which the user can scroll through. If you set the property to an item in the last page of the , the item will automatically be scrolled into view; however, will be set to the actual top item of the last page. - To ensure that a specific item is in the visible region of the control (but not necessarily in the top position), use the method. + To ensure that a specific item is in the visible region of the control (but not necessarily in the top position), use the method. > [!NOTE] > Setting this property has no effect when the property value is `false`. @@ -6877,7 +6877,7 @@ When this property is set to `false`, selected items in the object's subitems through the use of the property and the method. To run the example, paste the following code into a form containing a button named `Button1` and call the `InitializeListView` method in the form's constructor or event handler. + The following code example demonstrates resetting the style of a object's subitems through the use of the property and the method. To run the example, paste the following code into a form containing a button named `Button1` and call the `InitializeListView` method in the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewItemStyle/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/TopItem/form1.cs" id="Snippet2"::: @@ -6952,21 +6952,21 @@ When this property is set to `false`, selected items in the method in your derived class to override the extended styles used by the control. If you call this method, you should ensure that the extended styles set by properties on the control are utilized in your derived version of the control. + You can use the method in your derived class to override the extended styles used by the control. If you call this method, you should ensure that the extended styles set by properties on the control are utilized in your derived version of the control. The following are the properties that apply an extended style to the control. -- +- -- +- -- +- -- +- -- +- -- +- ]]>
@@ -7023,7 +7023,7 @@ When this property is set to `false`, selected items in the control in .NET Framework 2.0 enabled custom state images to be set to indicate whether an item is checked or unchecked or in an indeterminate state. If you created applications that depend on the behavior in .NET Framework 1.1, check that the property is set to `true`, which is the default value. To fully take advantage of custom state images, set to `false`. + Changes to the control in .NET Framework 2.0 enabled custom state images to be set to indicate whether an item is checked or unchecked or in an indeterminate state. If you created applications that depend on the behavior in .NET Framework 1.1, check that the property is set to `true`, which is the default value. To fully take advantage of custom state images, set to `false`. ]]>
@@ -7070,12 +7070,12 @@ When this property is set to `false`, selected items in the property allows you to specify the type of display the control uses to display items. You can set the property to display each item with large or small icons or display items in a vertical list. The richest option is the details view, which allows you to view not only the items but any subitems specified for each item. Each item is displayed in a grid, with each item listed vertically and the subitems for each item displayed in a column, with column headers. The details view is a perfect way to display database information to a user. With Windows XP and Windows Server 2003, you can also display items as tiles that balance graphical and textual information by showing a large icon along with subitem information of your choosing. To enable tile view, your application must call the method. The small-image view displays each item with an icon and textual information to the right of the icon. The large-image view displays each item with an icon and textual information below the icon. The size of the icons for the image list is specified by the property of the for the or properties. + The property allows you to specify the type of display the control uses to display items. You can set the property to display each item with large or small icons or display items in a vertical list. The richest option is the details view, which allows you to view not only the items but any subitems specified for each item. Each item is displayed in a grid, with each item listed vertically and the subitems for each item displayed in a column, with column headers. The details view is a perfect way to display database information to a user. With Windows XP and Windows Server 2003, you can also display items as tiles that balance graphical and textual information by showing a large icon along with subitem information of your choosing. To enable tile view, your application must call the method. The small-image view displays each item with an icon and textual information to the right of the icon. The large-image view displays each item with an icon and textual information below the icon. The size of the icons for the image list is specified by the property of the for the or properties. > [!NOTE] > If you are using multiple image lists, for small and large icon view, with a control, you should place small and large versions of the image at the same index location in their respective image lists. When switching between views, the index location of the image in one list is used to locate the image in the other list, regardless of the key value specified. - Most of the properties in the control affect how the different views behave or are displayed. Some properties that affect the views of the items are only useful when the property is set to a specific value, while others are useful in all views. For example, properties such as and are only useful when the property is set to , while the and properties are useful in all views. + Most of the properties in the control affect how the different views behave or are displayed. Some properties that affect the views of the items are only useful when the property is set to a specific value, while others are useful in all views. For example, properties such as and are only useful when the property is set to , while the and properties are useful in all views. The following table shows some of the members and the views they are valid in. @@ -7083,13 +7083,13 @@ When this property is set to `false`, selected items in the property| or | | property| or | -| method|| -||All views except | +| method|| +||All views except | | property| or | | event|| -| method|, , or | -| method| or | -| method| or | +| method|, , or | +| method| or | +| method| or | | property|All views except | | property|| | property|, , or | @@ -7099,7 +7099,7 @@ When this property is set to `false`, selected items in the [!NOTE] > If your control does not have any column headers specified and you set the property to , the control will not display any items. If your control does not have any column headers specified and you set the property to , the control will not display any subitems. - The tile view displays each item with a large icon on the left and textual information on the right. The textual information consists of the item label followed by subitems. By default, only the first subitem is displayed, which corresponds to the item label. To display additional subitems, you must add objects to the collection. Each subitem in the tile corresponds to a column header. To control which subitems are displayed and the order in which they are displayed, you must set the property for each item and the property for each header. You can then add, remove, and rearrange headers in the collection to achieve the desired result. + The tile view displays each item with a large icon on the left and textual information on the right. The textual information consists of the item label followed by subitems. By default, only the first subitem is displayed, which corresponds to the item label. To display additional subitems, you must add objects to the collection. Each subitem in the tile corresponds to a column header. To control which subitems are displayed and the order in which they are displayed, you must set the property for each item and the property for each header. You can then add, remove, and rearrange headers in the collection to achieve the desired result. To control the size of the tiles in the tile view, set the property. This is useful to prevent line-wrapping when subitem text is too long for a single line. @@ -7108,30 +7108,30 @@ When this property is set to `false`, selected items in the [!NOTE] > Although columns are only displayed in the details view, subitems without column headers will not display in either the details view or the tile view. - The tile view is available only on Windows XP and Windows Server 2003 when your application calls the method. On earlier operating systems, any code related to the tile view has no effect, and the control displays in the large icon view. As a result, any code that depends on the tile view might not work correctly. + The tile view is available only on Windows XP and Windows Server 2003 when your application calls the method. On earlier operating systems, any code related to the tile view has no effect, and the control displays in the large icon view. As a result, any code that depends on the tile view might not work correctly. You might want to include code that determines whether tile view is available, and provide alternate functionality when it is unavailable. For example, when you use owner drawing to customize the appearance of items in the tile view, you might want to use drawing code appropriate to the large icon view when running on operating systems that do not support the tile view. - The tile view feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. + The tile view feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -7184,7 +7184,7 @@ When this property is set to `false`, selected items in the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -7240,9 +7240,9 @@ When this property is set to `false`, selected items in the property when set to `false` will have no effect on the . + Getting or setting the property when set to `false` will have no effect on the . - If is set to `true`, and the property is greater than 0, you must handle the event, providing a valid . + If is set to `true`, and the property is greater than 0, you must handle the event, providing a valid . ]]>
@@ -7294,19 +7294,19 @@ When this property is set to `false`, selected items in the property to `true` puts the into virtual mode. In Virtual mode, the normal collection is unused. Instead, objects are created dynamically as the requires them. + Setting the property to `true` puts the into virtual mode. In Virtual mode, the normal collection is unused. Instead, objects are created dynamically as the requires them. Virtual mode can be useful under many circumstances. If a object must be populated from a very large collection already in memory, creating a object for each entry can be wasteful. In virtual mode, only the items required are created. In other cases, the values of the objects may need to be recalculated frequently, and doing this for the whole collection would produce unacceptable performance. In virtual mode, only the required items are calculated. In order to use virtual mode, you must handle the event, which is raised every time the requires an item. This event handler should create the object that belongs at the specified index. In addition, the property must be set to the size of the virtual list. - Handling the event enables searching in virtual mode. If this event is not handled, the and methods will return `null`. + Handling the event enables searching in virtual mode. If this event is not handled, the and methods will return `null`. You can handle the event in order to maintain a cache of objects. If the calculation or lookup to create a object is expensive, maintaining a cache can improve performance. - If the property is set to , the value will automatically be changed to when is set to `true`. + If the property is set to , the value will automatically be changed to when is set to `true`. - In virtual mode, the collection is disabled. Attempting to access it results in an . The same is true of the collection and the collection. If you want to retrieve the selected or checked items, use the and collections instead. + In virtual mode, the collection is disabled. Attempting to access it results in an . The same is true of the collection and the collection. If you want to retrieve the selected or checked items, use the and collections instead. diff --git a/xml/System.Windows.Forms/ListViewAlignment.xml b/xml/System.Windows.Forms/ListViewAlignment.xml index e213d994d38..c892926ab53 100644 --- a/xml/System.Windows.Forms/ListViewAlignment.xml +++ b/xml/System.Windows.Forms/ListViewAlignment.xml @@ -27,7 +27,7 @@ property and the method of the control. + Use the members of this enumeration to set the value of the property and the method of the control. ]]> diff --git a/xml/System.Windows.Forms/ListViewGroup.xml b/xml/System.Windows.Forms/ListViewGroup.xml index 7be2ae373b9..dd7c09ac280 100644 --- a/xml/System.Windows.Forms/ListViewGroup.xml +++ b/xml/System.Windows.Forms/ListViewGroup.xml @@ -61,19 +61,19 @@ groups help your users find the items they are looking for by separating the items into useful categories. You can create whatever categories you need. One typical way to group the items is by the way they are sorted. For example, you can group the items by the initial letter of the item name when they are sorted alphabetically, or by subitems such as type or date when the list is sorted by clicking a column header in the details view. Windows Explorer uses this type of grouping. - To use the grouping feature, add one or more objects to the collection of a control. Set the group header text and header alignment in the constructor, or set them using the and properties. + To use the grouping feature, add one or more objects to the collection of a control. Set the group header text and header alignment in the constructor, or set them using the and properties. - You can assign an item to a group by specifying the group in the constructor, by setting the property, or by directly adding the item to the collection of a group. All items should be assigned to groups before they are displayed. Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. + You can assign an item to a group by specifying the group in the constructor, by setting the property, or by directly adding the item to the collection of a group. All items should be assigned to groups before they are displayed. Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. - An item can only be in one group at a time. You can change the group to which an item belongs by setting the property at run time or by adding it to the collection of another group, which automatically removes it from the previous group. + An item can only be in one group at a time. You can change the group to which an item belongs by setting the property at run time or by adding it to the collection of another group, which automatically removes it from the previous group. > [!NOTE] > The insertion mark feature is disabled when using groups. This is because the grouping feature orders items by group membership, while the insertion mark feature is used with drag-and-drop repositioning in a control that does not already order its items. > [!NOTE] -> groups are available only on Windows XP and the Windows Server 2003 family when your application calls the method. On earlier operating systems, any code relating to groups will be ignored and the groups will not appear. As a result, any code that depends on the grouping feature might not work correctly. You might want to include a test that determines whether the grouping feature is available, and provide alternate functionality when it is unavailable. For example, you might want to provide alternate sorting when running on operating systems that do not support sorting by group. +> groups are available only on Windows XP and the Windows Server 2003 family when your application calls the method. On earlier operating systems, any code relating to groups will be ignored and the groups will not appear. As a result, any code that depends on the grouping feature might not work correctly. You might want to include a test that determines whether the grouping feature is available, and provide alternate functionality when it is unavailable. For example, you might want to provide alternate sorting when running on operating systems that do not support sorting by group. > -> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. +> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. @@ -383,7 +383,7 @@ constructor. + Use this property to retrieve the header text or to change the header value at run time. You can also set the header text in the constructor. ]]> @@ -429,7 +429,7 @@ constructor. + Use this property to retrieve the header alignment or to change the alignment at run time. You can also set the header alignment in the constructor. ]]> @@ -472,12 +472,12 @@ constructor, by setting the property, or by directly adding the item to the collection of a group. All items should be assigned to groups before they are displayed. Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. + You can assign an item to a group by specifying the group in the constructor, by setting the property, or by directly adding the item to the collection of a group. All items should be assigned to groups before they are displayed. Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. - An item can only be in one group at a time. You can change the group to which an item belongs by setting the property at run time or by adding it to the collection of another group, which automatically removes it from the previous group. + An item can only be in one group at a time. You can change the group to which an item belongs by setting the property at run time or by adding it to the collection of another group, which automatically removes it from the previous group. > [!NOTE] -> An item can be present within the collection of a group, but if it is not also present within the collection of the control itself, it will not appear in the control. +> An item can be present within the collection of a group, but if it is not also present within the collection of the control itself, it will not appear in the control. ]]> diff --git a/xml/System.Windows.Forms/ListViewGroupCollection.xml b/xml/System.Windows.Forms/ListViewGroupCollection.xml index e01f065cb7d..636e6c72aea 100644 --- a/xml/System.Windows.Forms/ListViewGroupCollection.xml +++ b/xml/System.Windows.Forms/ListViewGroupCollection.xml @@ -47,27 +47,27 @@ property to get the associated with a control. This collection contains the objects that represent the groups shown in the control when the property is set to a value other than . Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. If there are no groups in the collection, the grouping feature is disabled. + Use the property to get the associated with a control. This collection contains the objects that represent the groups shown in the control when the property is set to a value other than . Any items that are not assigned to a group will appear in the default group, which has the header label "DefaultGroup{0}". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. If there are no groups in the collection, the grouping feature is disabled. - Use the method to add a single group to the collection. Use the method to add a group at a particular index within the collection. To remove a group, use the method. Use the method to remove the group at a particular index. + Use the method to add a single group to the collection. Use the method to add a group at a particular index within the collection. To remove a group, use the method. Use the method to remove the group at a particular index. - You cannot add a to the collection more than once. To reposition a group within the collection, it must first be removed from the collection, and then inserted at the desired location. Use the method to determine whether a particular group is already in the collection. To retrieve the index of a group within the collection, use the method. You can get or set the group at a particular index with the indexer. + You cannot add a to the collection more than once. To reposition a group within the collection, it must first be removed from the collection, and then inserted at the desired location. Use the method to determine whether a particular group is already in the collection. To retrieve the index of a group within the collection, use the method. You can get or set the group at a particular index with the indexer. - Use the method to add multiple groups to the collection. You can add multiple groups either as an array of groups or as a that you retrieve through the property of another control. Use the method to remove all the groups from the collection. + Use the method to add multiple groups to the collection. You can add multiple groups either as an array of groups or as a that you retrieve through the property of another control. Use the method to remove all the groups from the collection. > [!NOTE] -> The , , and methods remove groups from the collection, but do not remove any items from the control. If there are no groups in the collection, the grouping feature is disabled and all items in the control are displayed normally. +> The , , and methods remove groups from the collection, but do not remove any items from the control. If there are no groups in the collection, the grouping feature is disabled and all items in the control are displayed normally. - The and methods are useful when you want to provide multiple ways to group the items in a control. To do this, create multiple group arrays. To change the grouping, first use the method to remove all the groups from the collection, then use the method to add the next array of groups to display. + The and methods are useful when you want to provide multiple ways to group the items in a control. To do this, create multiple group arrays. To change the grouping, first use the method to remove all the groups from the collection, then use the method to add the next array of groups to display. - Use the method to copy the groups in a collection to a compatible array starting at a specified index. This is useful, for example, when you want to sort the groups in the collection using the method. To do this, copy the groups into a compatible array, then sort the array. Next, use the method to remove all the groups from the collection, then use the method to add the sorted array back to the collection. + Use the method to copy the groups in a collection to a compatible array starting at a specified index. This is useful, for example, when you want to sort the groups in the collection using the method. To do this, copy the groups into a compatible array, then sort the array. Next, use the method to remove all the groups from the collection, then use the method to add the sorted array back to the collection. - Use the property to determine how many groups are in the collection. To iterate through the collection, use the returned from the method. + Use the property to determine how many groups are in the collection. To iterate through the collection, use the returned from the method. > [!NOTE] -> The grouping feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. On earlier operating systems, any code relating to groups will be ignored and the groups will not appear. As a result, any code that depends on the grouping feature might not work correctly. You might want to include a test that determines whether the grouping feature is available, and provide alternate functionality when it is unavailable. For example, you might want to provide alternate sorting when running on operating systems that do not support sorting by group. +> The grouping feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. On earlier operating systems, any code relating to groups will be ignored and the groups will not appear. As a result, any code that depends on the grouping feature might not work correctly. You might want to include a test that determines whether the grouping feature is available, and provide alternate functionality when it is unavailable. For example, you might want to provide alternate sorting when running on operating systems that do not support sorting by group. > -> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. +> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. @@ -127,9 +127,9 @@ to the collection. You cannot add a to the collection more than once. When you call the method using a that is already in the collection, the addition fails and -1 is returned. + Use this method to add an existing to the collection. You cannot add a to the collection more than once. When you call the method using a that is already in the collection, the addition fails and -1 is returned. - To add multiple groups to the collection, use the method. + To add multiple groups to the collection, use the method. ]]> @@ -228,14 +228,14 @@ method to add an array of groups to the group collection. This method is useful when you create multiple objects and want to add them to the collection with a single method call. To add individual groups to the collection, use the method. + Use this version of the method to add an array of groups to the group collection. This method is useful when you create multiple objects and want to add them to the collection with a single method call. To add individual groups to the collection, use the method. - This method is also useful when you want to provide multiple ways to group the items in a control. To do this, create multiple group arrays. To change the grouping, first use the method to remove all the groups from the collection, then use the method to add a different array of groups. + This method is also useful when you want to provide multiple ways to group the items in a control. To do this, create multiple group arrays. To change the grouping, first use the method to remove all the groups from the collection, then use the method to add a different array of groups. - Unlike the method, the method does not have a return value that can be used to determine whether a group being added is already in the collection. If you need this information, use the method before using the method. + Unlike the method, the method does not have a return value that can be used to determine whether a group being added is already in the collection. If you need this information, use the method before using the method. ## Examples - The following example demonstrates how the method can be used in an application that organizes items by subitem value in the details view. This form of grouping is similar to the grouping used in Windows Explorer. In the example, the groups are created dynamically. For each subitem column, one group is created for each unique subitem value. For the parent item column, one group is created for each unique initial letter. The groups created for each column are stored in a hash table along with the subitem text or initial letter. When a column header is clicked, the is cleared. The hash table corresponding to the clicked column is then retrieved and each item is assigned to the appropriate group. Finally, a sorted array of the groups in the hash table is added to the . + The following example demonstrates how the method can be used in an application that organizes items by subitem value in the details view. This form of grouping is similar to the grouping used in Windows Explorer. In the example, the groups are created dynamically. For each subitem column, one group is created for each unique subitem value. For the parent item column, one group is created for each unique initial letter. The groups created for each column are stored in a hash table along with the subitem text or initial letter. When a column header is clicked, the is cleared. The hash table corresponding to the clicked column is then retrieved and each item is assigned to the appropriate group. Finally, a sorted array of the groups in the hash table is added to the . For the complete example, see the overview reference topic. @@ -284,9 +284,9 @@ method to add the elements of a that you retrieve through the property of a different control. + Use this version of the method to add the elements of a that you retrieve through the property of a different control. - Unlike the method, the method does not have a return value that can be used to determine whether a group being added is already in the collection. If you need this information, use the method before using the method. + Unlike the method, the method does not have a return value that can be used to determine whether a group being added is already in the collection. If you need this information, use the method before using the method. ]]> @@ -328,16 +328,16 @@ collection does not remove items from the control. + Use this method to remove all the groups from the collection. Note that removing groups from the collection does not remove items from the control. - This method is useful to disable the grouping feature. When there are no groups in a control, the items appear normally. To remove individual groups from the collection, use the or method. + This method is useful to disable the grouping feature. When there are no groups in a control, the items appear normally. To remove individual groups from the collection, use the or method. - This method is also useful when you want to provide multiple ways to group the items. To change the grouping, first use the method to remove all the groups from the collection, then use the method to add a different array of groups. + This method is also useful when you want to provide multiple ways to group the items. To change the grouping, first use the method to remove all the groups from the collection, then use the method to add a different array of groups. ## Examples - The following example demonstrates how the method can be used in an application that organizes items by subitem value in the details view. This form of grouping is similar to the grouping used in Windows Explorer. In the example, the groups are created dynamically. For each subitem column, one group is created for each unique subitem value. For the parent item column, one group is created for each unique initial letter. The groups created for each column are stored in a hash table along with the subitem text or initial letter. When a column header is clicked, the is cleared. The hash table corresponding to the clicked column is then retrieved and each item is assigned to the appropriate group. Finally, a sorted array of the groups in the hash table is added to the . + The following example demonstrates how the method can be used in an application that organizes items by subitem value in the details view. This form of grouping is similar to the grouping used in Windows Explorer. In the example, the groups are created dynamically. For each subitem column, one group is created for each unique subitem value. For the parent item column, one group is created for each unique initial letter. The groups created for each column are stored in a hash table along with the subitem text or initial letter. When a column header is clicked, the is cleared. The hash table corresponding to the clicked column is then retrieved and each item is assigned to the appropriate group. Finally, a sorted array of the groups in the hash table is added to the . For the complete example, see the overview reference topic. @@ -384,7 +384,7 @@ to the collection more than once. However, attempting to add another copy will not throw an exception. Instead, the addition will simply fail. The method will return a value of -1 in this case. The and methods, however, do not have return values. When adding groups using one of these methods, use the method to determine whether a particular is already in the collection. + You cannot add a to the collection more than once. However, attempting to add another copy will not throw an exception. Instead, the addition will simply fail. The method will return a value of -1 in this case. The and methods, however, do not have return values. When adding groups using one of these methods, use the method to determine whether a particular is already in the collection. ]]> @@ -429,7 +429,7 @@ method to copy the groups in a collection (including the item references they contain) to a compatible array, starting at a specified index. This is useful, for example, when you want to sort the groups in the collection using the method. To do this, copy the groups into a compatible array, then sort the array. Next, use the method to remove all the groups from the collection, then use the method to add the sorted array back to the collection. + Use the method to copy the groups in a collection (including the item references they contain) to a compatible array, starting at a specified index. This is useful, for example, when you want to sort the groups in the collection using the method. To do this, copy the groups into a compatible array, then sort the array. Next, use the method to remove all the groups from the collection, then use the method to add the sorted array back to the collection. ]]> @@ -468,7 +468,7 @@ returned by the method to iterate through the collection. + Use this property to determine the number of groups in the collection. This is useful when you need to loop through the collection and perform the same operation on each group. You can also use the returned by the method to iterate through the collection. ]]> @@ -548,7 +548,7 @@ returned by the method. + Use this method to determine the index of a group within the collection. This is useful, for example, to determine the index of each group when you iterate through the collection using the returned by the method. ]]> @@ -592,7 +592,7 @@ ## Remarks Use this method to insert an existing at a particular index within the collection. - You cannot add a to the collection more than once. When you call the method using a group that is already in the collection, the insertion simply fails. Use the method before the insertion to determine whether a particular group is already in the collection. To reposition a group within the collection, you must first remove it, and then insert it at the desired index. + You cannot add a to the collection more than once. When you call the method using a group that is already in the collection, the insertion simply fails. Use the method before the insertion to determine whether a particular group is already in the collection. To reposition a group within the collection, you must first remove it, and then insert it at the desired index. ]]> @@ -643,7 +643,7 @@ method. + Use this property to retrieve the group at the specified index within the collection. When you have a reference to the group object and need the index, use the method. ]]> @@ -724,9 +724,9 @@ collection does not remove items from the control. + Use this method to remove a group from the collection when you have a reference to the group. Note that removing a group from the collection does not remove items from the control. - To remove a group at a particular index, use the method instead. To remove all the groups from the collection, use the method. + To remove a group at a particular index, use the method instead. To remove all the groups from the collection, use the method. ]]> @@ -769,9 +769,9 @@ collection does not remove items from the control. + Use this method to remove a group from the collection when you have the index of the group within the collection. Note that removing groups from the collection does not remove items from the control. - To remove a group using a reference to the object, use the method instead. To remove all the groups from the collection, use the method. When you remove an item from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted. + To remove a group using a reference to the object, use the method instead. To remove all the groups from the collection, use the method. When you remove an item from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted. ]]> diff --git a/xml/System.Windows.Forms/ListViewHitTestInfo.xml b/xml/System.Windows.Forms/ListViewHitTestInfo.xml index fa9bf8b6f8a..1db76d5c8ca 100644 --- a/xml/System.Windows.Forms/ListViewHitTestInfo.xml +++ b/xml/System.Windows.Forms/ListViewHitTestInfo.xml @@ -30,19 +30,19 @@ Contains information about an area of a control or a . - is returned by the class when the method is called. - - - -## Examples - The following code example demonstrates using the class and the method to determine the location of a event. To run this code, paste it into a Windows Form that contains a named `listView1` that is populated with items. Associate the event for the form and `listView1` with the `HandleMouseDown` method in this example. - + is returned by the class when the method is called. + + + +## Examples + The following code example demonstrates using the class and the method to determine the location of a event. To run this code, paste it into a Windows Form that contains a named `listView1` that is populated with items. Associate the event for the form and `listView1` with the `HandleMouseDown` method in this example. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/AutoResizeColumn/form1.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet7"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet7"::: + ]]> @@ -85,11 +85,11 @@ One of the values. Initializes a new instance of the class. - @@ -128,11 +128,11 @@ Gets the at the position indicated by a hit test on a . The at the position indicated by a hit test on a . - does not contain items or the position indicated is not on an item. - + does not contain items or the position indicated is not on an item. + ]]> @@ -170,11 +170,11 @@ Gets the location of a hit test on a control, in relation to the and the items it contains. One of the values. - if the hit test indicates a position that is within the client area of the but is not located on a . - + if the hit test indicates a position that is within the client area of the but is not located on a . + ]]> @@ -213,11 +213,11 @@ Gets the at the position indicated by a hit test on a . The at the position indicated by a hit test on a . - does not contain subitems or the position indicated is not on a subitem. - + does not contain subitems or the position indicated is not on a subitem. + ]]> diff --git a/xml/System.Windows.Forms/ListViewHitTestLocations.xml b/xml/System.Windows.Forms/ListViewHitTestLocations.xml index dca9f5a63a9..83fe38116f5 100644 --- a/xml/System.Windows.Forms/ListViewHitTestLocations.xml +++ b/xml/System.Windows.Forms/ListViewHitTestLocations.xml @@ -29,19 +29,19 @@ Defines constants that represent areas in a or . - enumeration is used by the class. - - - -## Examples - The following code example demonstrates using the method to determine the location of a event in a . To run this code, paste it into a Windows Form that contains a named `listView1` that is populated with items. Associate the event for `listview1` and the form with the `HandleMouseDown` method in this example. - + enumeration is used by the class. + + + +## Examples + The following code example demonstrates using the method to determine the location of a event in a . To run this code, paste it into a Windows Form that contains a named `listView1` that is populated with items. Associate the event for `listview1` and the form with the `HandleMouseDown` method in this example. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/AutoResizeColumn/form1.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet7"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/AutoResizeColumn/form1.vb" id="Snippet7"::: + ]]> diff --git a/xml/System.Windows.Forms/ListViewInsertionMark.xml b/xml/System.Windows.Forms/ListViewInsertionMark.xml index fc55eab9595..0f70dac8015 100644 --- a/xml/System.Windows.Forms/ListViewInsertionMark.xml +++ b/xml/System.Windows.Forms/ListViewInsertionMark.xml @@ -43,13 +43,13 @@ 1. In a handler for the or event, use the property to access the object associated with the control. -2. Use the method to retrieve the index of the item closest to the mouse pointer. +2. Use the method to retrieve the index of the item closest to the mouse pointer. -3. Pass the index value to the method to retrieve the bounding rectangle of the item. +3. Pass the index value to the method to retrieve the bounding rectangle of the item. 4. If the mouse pointer is located to the left of the midpoint of the bounding rectangle, set the property to `false`; otherwise, set it to `true`. -5. Set the property to the index value retrieved from the method. The insertion mark appears next to item with the specified index, either to the left or the right, depending on the property value. If an item is dragged over itself, the index is -1 and the insertion mark is hidden. +5. Set the property to the index value retrieved from the method. The insertion mark appears next to item with the specified index, either to the left or the right, depending on the property value. If an item is dragged over itself, the index is -1 and the insertion mark is hidden. To insert the dragged item at the correct location, follow these steps: @@ -57,20 +57,20 @@ 2. If the property is set to `true`, increment the stored insertion index value. -3. Use the method to insert a clone of the dragged item into the collection at the stored insertion index. +3. Use the method to insert a clone of the dragged item into the collection at the stored insertion index. -4. Use the method to remove the original copy of the dragged item. +4. Use the method to remove the original copy of the dragged item. - You must insert a clone of the dragged item before the original copy is removed so the index values in the collection are not altered before the insertion. + You must insert a clone of the dragged item before the original copy is removed so the index values in the collection are not altered before the insertion. To ensure that the items are displayed in the same order as their index values, you must set the property to an implementation of the interface that sorts items by index value. For more information, see the Example section. You can modify the color of the insertion mark by using the property. If you need the size or position of the insertion mark, you can get its bounding rectangle through the property. > [!NOTE] -> The insertion mark feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. On earlier operating systems, any code relating to the insertion mark will be ignored and the insertion mark will not appear. As a result, any code that depends on the insertion mark feature may not work correctly. You may want to include a test that determines whether the insertion mark feature is available, and provide alternate functionality when it is unavailable. For example, you may want to bypass all code that implements drag-and-drop item repositioning when running on operating systems that do not support insertion marks. +> The insertion mark feature is available only on Windows XP and the Windows Server 2003 family when your application calls the method. On earlier operating systems, any code relating to the insertion mark will be ignored and the insertion mark will not appear. As a result, any code that depends on the insertion mark feature may not work correctly. You may want to include a test that determines whether the insertion mark feature is available, and provide alternate functionality when it is unavailable. For example, you may want to bypass all code that implements drag-and-drop item repositioning when running on operating systems that do not support insertion marks. > -> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. +> The insertion mark feature is provided by the same library that provides the operating system themes feature. To check for the availability of this library, call the method overload and pass in the value. @@ -123,13 +123,13 @@ method lets you find the item closest to the mouse pointer, but you must do your own calculations to determine whether the insertion mark should appear before or after this item. + The method lets you find the item closest to the mouse pointer, but you must do your own calculations to determine whether the insertion mark should appear before or after this item. To calculate the value needed for the property, follow these steps: -1. Use the method to retrieve the index of the item closest to the mouse pointer. +1. Use the method to retrieve the index of the item closest to the mouse pointer. -2. Pass the index value to the method to retrieve the bounding rectangle of the item. +2. Pass the index value to the method to retrieve the bounding rectangle of the item. 3. If the mouse pointer is located to the left of the midpoint of the bounding rectangle, set the property to `false`; otherwise, set it to `true`. @@ -272,9 +272,9 @@ property is set to `false`; otherwise, it appears to the right of the item. The insertion mark disappears automatically when a dragged item is inserted into the collection. To remove the insertion mark manually, for example, when an item is dragged onto itself or dragged outside the control, set the value to -1. + The insertion mark appears to the left of the item with the specified index if the property is set to `false`; otherwise, it appears to the right of the item. The insertion mark disappears automatically when a dragged item is inserted into the collection. To remove the insertion mark manually, for example, when an item is dragged onto itself or dragged outside the control, set the value to -1. - Use the method to retrieve the index of the item closest to a specified location, such as the location of the mouse pointer when positioning an item in a drag-and-drop operation. + Use the method to retrieve the index of the item closest to a specified location, such as the location of the mouse pointer when positioning an item in a drag-and-drop operation. @@ -328,7 +328,7 @@ ## Remarks This method lets you locate the item closest to the mouse pointer when doing a drag-and-drop operation. Use the index value returned to set the property. When the item closest to the mouse pointer is the item being dragged, the return value of this method is -1. In this case, setting the property to this value hides the insertion mark. - This method finds the closest item regardless of where the mouse pointer is located, while the method returns the item at the specified location only, or `null` if there is no item at that location. The method returns `null`, for example, when the mouse pointer is located between two items. For this reason, you should always use the method when using a drag-and-drop operation to position items. + This method finds the closest item regardless of where the mouse pointer is located, while the method returns the item at the specified location only, or `null` if there is no item at that location. The method returns `null`, for example, when the mouse pointer is located between two items. For this reason, you should always use the method when using a drag-and-drop operation to position items. diff --git a/xml/System.Windows.Forms/ListViewItem+ListViewSubItem.xml b/xml/System.Windows.Forms/ListViewItem+ListViewSubItem.xml index 87a720a2a29..6f24fb8e8c9 100644 --- a/xml/System.Windows.Forms/ListViewItem+ListViewSubItem.xml +++ b/xml/System.Windows.Forms/ListViewItem+ListViewSubItem.xml @@ -56,26 +56,26 @@ ## Remarks A control displays a list of items that are defined by the class. Each can store subitem objects that are defined by the class. Subitems are displayed when the property of the control is set to . Typically, subitems contain information that is related to their parent item. For example, if a control displays items that represent orders, each item could display the order number. Subitems could be added to each item to display information such as the product ordered, the quantity of items ordered, and the total price of the items ordered. Unlike objects, objects cannot be edited directly by the user (the user can edit objects if the property of the control is set to `true`). - Because subitems cannot be directly edited by the user and do not display images, properties are limited to those that affect the style of the subitem text when it is displayed in the control. If the property of the that contains the subitems is set to `false`, you can use the , , and properties to change the styles applied to the text display. Typically, the styles of the item and the subitems are the same in a control, but if you want to change the style of a specific to highlight it, you can use these properties on the items you want to display differently. + Because subitems cannot be directly edited by the user and do not display images, properties are limited to those that affect the style of the subitem text when it is displayed in the control. If the property of the that contains the subitems is set to `false`, you can use the , , and properties to change the styles applied to the text display. Typically, the styles of the item and the subitems are the same in a control, but if you want to change the style of a specific to highlight it, you can use these properties on the items you want to display differently. ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control. -- +- -- +- -- +- -- +- -- +- -- +- -- +- You need to add the code to a and call the method created in the example from the constructor or another method on the form. The example requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -251,7 +251,7 @@ property to change the color displayed behind the subitem text. This property can be used if you want to use different background and foreground color combinations (using the property to set the foreground color) to differentiate one subitem from another. For example, you could set the property to to identify subitems that display a negative value. + You can use the property to change the color displayed behind the subitem text. This property can be used if you want to use different background and foreground color combinations (using the property to set the foreground color) to differentiate one subitem from another. For example, you could set the property to to identify subitems that display a negative value. If the property of the that owns the subitem is set to `true`, setting this property has no effect. @@ -363,7 +363,7 @@ ListViewItem1.SubItems[1].Font = New Font(ListViewItem1.SubItems[1].Font, _ ## Examples - The following code example demonstrates how to set the property to `false` to define a custom style for objects. The example demonstrates how to set the and properties. To run the example, paste the following code into a form, and call the `InitializeListView` method in form's constructor or event-handling method. + The following code example demonstrates how to set the property to `false` to define a custom style for objects. The example demonstrates how to set the and properties. To run the example, paste the following code into a form, and call the `InitializeListView` method in form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewItemStyle/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/TopItem/form1.cs" id="Snippet1"::: @@ -407,14 +407,14 @@ ListViewItem1.SubItems[1].Font = New Font(ListViewItem1.SubItems[1].Font, _ property to change the color of the subitem text. This property can be used if you want to use different background and foreground color combinations (using the property to set the background color) to differentiate one item from another. For example, you could set the property to to identify items that have a negative number associated with them. + You can use the property to change the color of the subitem text. This property can be used if you want to use different background and foreground color combinations (using the property to set the background color) to differentiate one item from another. For example, you could set the property to to identify items that have a negative number associated with them. If the property of the that owns the subitem is set to `true`, setting this property has no effect. ## Examples - The following code example demonstrates how to set the property to `false` to define a custom style for objects. The example demonstrates how to set the and properties. To run the example, paste the following code into a form, and call the `InitializeListView` method in form's constructor or event-handling method. + The following code example demonstrates how to set the property to `false` to define a custom style for objects. The example demonstrates how to set the and properties. To run the example, paste the following code into a form, and call the `InitializeListView` method in form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewItemStyle/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/TopItem/form1.cs" id="Snippet1"::: @@ -508,7 +508,7 @@ ListViewItem1.SubItems[1].Font = New Font(ListViewItem1.SubItems[1].Font, _ ## Examples - The following code example demonstrates how to reset the style of the subitems of a through the use of the property and the method. To run the example, paste the following code into a form containing a button named `Button1`, and call the `InitializeListView` method in the form's constructor or event-handling method. + The following code example demonstrates how to reset the style of the subitems of a through the use of the property and the method. To run the example, paste the following code into a form containing a button named `Button1`, and call the `InitializeListView` method in the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewItemStyle/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/TopItem/form1.cs" id="Snippet2"::: @@ -625,7 +625,7 @@ ListViewItem1.SubItems[1].Font = New Font(ListViewItem1.SubItems[1].Font, _ property allows you to determine the text displayed for the subitem. You can use the , , and properties to specify how the text is displayed. + The property allows you to determine the text displayed for the subitem. You can use the , , and properties to specify how the text is displayed. ]]> diff --git a/xml/System.Windows.Forms/ListViewItem+ListViewSubItemCollection.xml b/xml/System.Windows.Forms/ListViewItem+ListViewSubItemCollection.xml index 5f4770cf777..9432079137d 100644 --- a/xml/System.Windows.Forms/ListViewItem+ListViewSubItemCollection.xml +++ b/xml/System.Windows.Forms/ListViewItem+ListViewSubItemCollection.xml @@ -46,9 +46,9 @@ ## Remarks A stores objects that represent subitems of a parent in the control. Subitems are only displayed in a control when columns are specified in the property of the control and when the property of the control is set to . The order of subitems in the determines the columns the subitems are displayed in the control. - There are a number of ways to add subitems to the collection. The method adds a single to the collection. To add a number of subitems to the collection, you create an array of objects and pass it to the method. If you want to insert a subitem at a specific location in the collection, you can use the method. To remove subitems, you can use either the method or the method if you know where the subitem is located in the collection. The method enables you to remove all subitems from the collection instead of using the method to remove a single subitem at a time. + There are a number of ways to add subitems to the collection. The method adds a single to the collection. To add a number of subitems to the collection, you create an array of objects and pass it to the method. If you want to insert a subitem at a specific location in the collection, you can use the method. To remove subitems, you can use either the method or the method if you know where the subitem is located in the collection. The method enables you to remove all subitems from the collection instead of using the method to remove a single subitem at a time. - In addition to methods and properties for adding and removing subitems, the also provides methods to find subitems in the collection. The method enables you to determine whether a is a member of the collection. Once you know that the subitem is located in the collection, you can use the method to determine where the subitem is located in the collection. + In addition to methods and properties for adding and removing subitems, the also provides methods to find subitems in the collection. The method enables you to determine whether a is a member of the collection. Once you know that the subitem is located in the collection, you can use the method to determine where the subitem is located in the collection. ]]> @@ -147,26 +147,26 @@ method allows you to add a subitem to the collection by specifying the text of the subitem. When this method is called, a new is created with the specified text. You can then use the that is returned by this method to set properties and call methods to manipulate the subitem. If you already have an existing that you want to add to the collection, you can use the version of the method that accepts a as a parameter, or use the method if you want to add the subitem at a specific position within the collection. + This version of the method allows you to add a subitem to the collection by specifying the text of the subitem. When this method is called, a new is created with the specified text. You can then use the that is returned by this method to set properties and call methods to manipulate the subitem. If you already have an existing that you want to add to the collection, you can use the version of the method that accepts a as a parameter, or use the method if you want to add the subitem at a specific position within the collection. ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- This example requires that you have added the code to a and call the method created in the example from the constructor or another method on the form. The example also requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -214,7 +214,7 @@ method to add an existing to the collection. This method is typically used to reuse existing subitems from other objects. Items that are added to the collection are inserted at the end of the list. To insert an item into the collection at a specific position, use the method. If you want to add an array of existing objects, you can use the version of the method that accepts an array of objects as a parameter. + You can use this version of the method to add an existing to the collection. This method is typically used to reuse existing subitems from other objects. Items that are added to the collection are inserted at the end of the list. To insert an item into the collection at a specific position, use the method. If you want to add an array of existing objects, you can use the version of the method that accepts an array of objects as a parameter. ]]> @@ -271,7 +271,7 @@ method allows you to add a subitem to the collection by specifying the text of the subitem. In addition, this version of the method allows you to specify the initial foreground color, background color, and font of the subitem text. When this method is called, a new is created with the specified text. You can then use the that is returned by this method to set properties and call methods to manipulate the subitem. If you already have an existing that you want to add to the collection, you can use the version of the method that accepts a as a parameter, or use the method if you want to add the subitem at a specific position in the collection. + This version of the method allows you to add a subitem to the collection by specifying the text of the subitem. In addition, this version of the method allows you to specify the initial foreground color, background color, and font of the subitem text. When this method is called, a new is created with the specified text. You can then use the that is returned by this method to set properties and call methods to manipulate the subitem. If you already have an existing that you want to add to the collection, you can use the version of the method that accepts a as a parameter, or use the method if you want to add the subitem at a specific position in the collection. > [!NOTE] > By default, subitems use the foreground color, background color, and font specified for the parent item. Set the property to `false` to prevent the parent item styles from overriding the subitem styles. @@ -336,9 +336,9 @@ method to add an array of strings to the collection, where each string in the collection represents the text of a new subitem. You can use the other version of the method that accepts an array of strings as a parameter to specify the foreground color, background color, and font for each item being added. If you want to reuse existing objects and add them to the collection, you can use the version of the method that accepts an array of objects as a parameter. + You can use this version of the method to add an array of strings to the collection, where each string in the collection represents the text of a new subitem. You can use the other version of the method that accepts an array of strings as a parameter to specify the foreground color, background color, and font for each item being added. If you want to reuse existing objects and add them to the collection, you can use the version of the method that accepts an array of objects as a parameter. - If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. + If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. ]]> @@ -390,7 +390,7 @@ . If you want to add a single object, use the method. You can also use the method if you want to add a single at a specific position in the collection. + You can use this method to reuse the subitems stored in a different . If you want to add a single object, use the method. You can also use the method if you want to add a single at a specific position in the collection. ]]> @@ -439,9 +439,9 @@ method to add an array of strings to the collection, where each string in the collection represents the text of a new subitem. In addition, this version of the method allows you to specify the foreground color, background color, and font for each subitem. You can use the other version of the method that accepts an array of strings as a parameter if you do not want to specify foreground color, background color, and font settings for each subitem. If you want to reuse existing objects and add them to the collection, you can use the version of the method that accepts an array of objects as a parameter. + You can use this version of the method to add an array of strings to the collection, where each string in the collection represents the text of a new subitem. In addition, this version of the method allows you to specify the foreground color, background color, and font for each subitem. You can use the other version of the method that accepts an array of strings as a parameter if you do not want to specify foreground color, background color, and font settings for each subitem. If you want to reuse existing objects and add them to the collection, you can use the version of the method that accepts an array of objects as a parameter. - If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. + If you want to add a single , use the method. You can also use the method if you want to add a single at a specific position in the collection. > [!NOTE] > By default, subitems use the foreground color, background color, and font specified for the parent item. Set the property to `false` to prevent the parent item styles from overriding the subitem styles. @@ -488,7 +488,7 @@ or method. + When you remove subitems from the collection, all information about the deleted subitems is lost. To remove a single subitem from the collection use the or method. ]]> @@ -533,7 +533,7 @@ method enables you to determine whether a is a member of the collection. Once you know that the subitem is in the collection, you can use the method to determine the position of the subitem in the collection. + The method enables you to determine whether a is a member of the collection. Once you know that the subitem is in the collection, you can use the method to determine the position of the subitem in the collection. ]]> @@ -577,7 +577,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. ]]> @@ -699,7 +699,7 @@ method enables you to determine the position of a subitem in the collection. To determine whether a subitem is contained in the collection before calling this method, use the method. + The method enables you to determine the position of a subitem in the collection. To determine whether a subitem is contained in the collection before calling this method, use the method. ]]> @@ -741,11 +741,11 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. ]]> @@ -787,7 +787,7 @@ . To add a subitem without specifying a specific position, use the method. If you want to add an array of subitems to the collection, use the method. You can use this method if you want to insert a new subitem into an existing collection of subitems. + This method allows you to insert a subitem at a specific position in the . To add a subitem without specifying a specific position, use the method. If you want to add an array of subitems to the collection, use the method. You can use this method if you want to insert a new subitem into an existing collection of subitems. ]]> @@ -881,7 +881,7 @@ stored at a specific location in the collection. To determine the index of a specific item in the collection, use the method. + You can use this method to obtain the stored at a specific location in the collection. To determine the index of a specific item in the collection, use the method. ]]> @@ -931,7 +931,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. ]]> @@ -972,7 +972,7 @@ method or the method, respectively. + If you want to remove an item at a specified index or with a specified key, use the method or the method, respectively. ]]> @@ -1015,7 +1015,7 @@ method. To remove all subitems from the collection, use the method. + When you remove a subitem from the collection, the indexes change for subsequent subitems in the collection. All information about the removed subitem is deleted. You can use this method to remove a specific subitem from the collection by specifying the index of the subitem to remove from the collection. To specify the subitem to remove instead of the index to the subitem, use the method. To remove all subitems from the collection, use the method. ]]> diff --git a/xml/System.Windows.Forms/ListViewItem.xml b/xml/System.Windows.Forms/ListViewItem.xml index dc716830257..be6810040ff 100644 --- a/xml/System.Windows.Forms/ListViewItem.xml +++ b/xml/System.Windows.Forms/ListViewItem.xml @@ -67,30 +67,30 @@ ## Remarks The control is similar to a in that it displays a list of items. The main difference is that the control provides a number of different ways items can be viewed by the user. The class defines the appearance, behavior, and data associated with an item that is displayed in the control. objects can be displayed in the control in one of four different views. Items can be displayed as large or small icons or as small icons in a vertical list. Items can also have subitems that contain information that is related to the parent item. The fourth view style, details view, allows you to display the item and its subitems in a grid with column headers that can be used to identify the information being displayed in a subitem. - Most of the properties of the class provide ways to change the display of the item in the control it is associated with. The , , and properties allow you to change how the text of the item is displayed in the control. The property allows you to specify the image to load from the that is assigned to the control (by setting the or properties of the ). Items can display check boxes in order to obtain item choices from the user in a way similar to a control. You can use the property to determine if an item is checked, or to select or clear the check box at run time. Items can display any number of subitems when the property of the associated control is set to and columns are defined in the of the control. You can add subitems to an item by calling the method of the class. The property allows you to gain access to the class and its members. + Most of the properties of the class provide ways to change the display of the item in the control it is associated with. The , , and properties allow you to change how the text of the item is displayed in the control. The property allows you to specify the image to load from the that is assigned to the control (by setting the or properties of the ). Items can display check boxes in order to obtain item choices from the user in a way similar to a control. You can use the property to determine if an item is checked, or to select or clear the check box at run time. Items can display any number of subitems when the property of the associated control is set to and columns are defined in the of the control. You can add subitems to an item by calling the method of the class. The property allows you to gain access to the class and its members. - Some of the properties and methods of the class are item-specific versions of properties and methods in the control. For example, the method is similar to the version of the method, but the version affects only the current item. + Some of the properties and methods of the class are item-specific versions of properties and methods in the control. For example, the method is similar to the version of the method, but the version affects only the current item. - The class also provides methods that are not versions of methods. The method places the item's text into edit mode so the user can change the item's text (when the property of the control is set to `true`). The method allows you to create copies of existing objects to reuse in other controls. + The class also provides methods that are not versions of methods. The method places the item's text into edit mode so the user can change the item's text (when the property of the control is set to `true`). The method allows you to create copies of existing objects to reuse in other controls. ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- You need to add the code to a and call the method created in the example from the constructor or another method on the form. The example requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -141,21 +141,21 @@ control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- You need to add the code to a and call the method created in the example from the constructor or another method on the form. The example requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -403,7 +403,7 @@ associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. The text of the should not exceed 259 characters or unexpected behavior could occur. @@ -539,7 +539,7 @@ associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. ]]> @@ -678,7 +678,7 @@ associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. ]]> @@ -770,7 +770,7 @@ ## Remarks This version of the constructor allows you to specify the group to which an item belongs. - The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. > [!NOTE] > groups are only available on Windows XP and the Windows Server 2003 family (Windows XP Home Edition, Windows XP Professional, Windows Server 2003). For more information, see the overview topic. @@ -879,7 +879,7 @@ ## Remarks This version of the constructor allows you to specify the group to which an item belongs. - The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. > [!NOTE] > groups are only available on Windows XP and the Windows Server 2003 family (Windows XP Home Edition, Windows XP Professional, Windows Server 2003). For more information, see the overview topic. @@ -987,7 +987,7 @@ ## Remarks This version of the constructor is useful when you create objects before adding them to a (for example, to indicate special formatting or to use the subitems in multiple items). It also allows you to specify the group to which an item belongs. - The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. > [!NOTE] > groups are only available on Windows XP and the Windows Server 2003 family (Windows XP Home Edition, Windows XP Professional, Windows Server 2003). For more information, see the overview topic. @@ -1043,7 +1043,7 @@ control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. + The following code example creates a form that contains a control that manually sorts items when a column in the control is clicked. The example defines a class called `ListViewItemComparer` that implements the interface that performs the comparison. The example creates an instance of `ListViewItemComparer` and uses it to set the property of the control. The method call in the event handler uses the methods defined in `ListViewItemComparer` to perform the sort of items, based on the column that is clicked. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListView.ColumnClick/CPP/listviewsort1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView+ColumnHeaderCollection/Overview/listviewsort1.cs" id="Snippet1"::: @@ -1103,7 +1103,7 @@ associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. ]]> @@ -1221,7 +1221,7 @@ ## Remarks This version of the constructor allows you to specify the group to which an item belongs. - The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. + The `imageKey` parameter specifies an image in the associated with the owning control, which can be accessed with the property. > [!NOTE] > groups are only available on Windows XP and the Windows Server 2003 family (Windows XP Home Edition, Windows XP Professional, Windows Server 2003). For more information, see the overview topic. @@ -1267,7 +1267,7 @@ property to change the color displayed behind the item text. This property can be used if you want to use different background and foreground color combinations (using the property to set the foreground color) to differentiate one item from another. For example, you could set the property to to identify items that have failed validation or are missing subitem information. + You can use the property to change the color displayed behind the item text. This property can be used if you want to use different background and foreground color combinations (using the property to set the foreground color) to differentiate one item from another. For example, you could set the property to to identify items that have failed validation or are missing subitem information. If you want to use the same background color for all subitems of an item, set the property to `true`. This will cause the colors and fonts specified for the item to be used for all subitem text. @@ -1308,7 +1308,7 @@ property of the control that contains the item is set to `true`. You can use this method at run time to force the item's text to display in edit mode. For example, if you are validating the item text edited by the user, and an item fails validation, you could select the item in the control and call the method to force the user to change the text that failed validation. + This property is effective only if the property of the control that contains the item is set to `true`. You can use this method at run time to force the item's text to display in edit mode. For example, if you are validating the item text edited by the user, and an item fails validation, you could select the item in the control and call the method to force the user to change the text that failed validation. ]]> @@ -1352,11 +1352,11 @@ method. The class provides a method that allows you to get the bounding rectangle of any item located within the control. + You can use this method to obtain the bounding rectangle of an entire item. If you want to obtain the bounding rectangle for a portion of the entire item, use the method. The class provides a method that allows you to get the bounding rectangle of any item located within the control. The returned bounding rectangle uses client control coordinates that are relative to the top-left corner of the currently visible area of the containing . If the is scrollable and positioned so that the is not visible, the coordinates returned may be negative. - When the property has a value of , the width of the bounding rectangle is the width of the column containing the item, not the width of the text in the item. If the collection does not contain any columns, the default column width of 60 pixels is used. + When the property has a value of , the width of the bounding rectangle is the width of the column containing the item, not the width of the text in the item. If the collection does not contain any columns, the default column width of 60 pixels is used. ]]> @@ -1411,21 +1411,21 @@ ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- You need to add the code to a and call the method created in the example from the constructor or another method on the form. The example requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -1553,9 +1553,9 @@ control. This method can be used when performing validation on the item. You can call the method to ensure that the item is displayed in the control if it failed validation, to allow the user to perform changes on the item. + You can use this method to ensure that the item is visible within the control. This method can be used when performing validation on the item. You can call the method to ensure that the item is displayed in the control if it failed validation, to allow the user to perform changes on the item. - This method is similar to the method of the control. + This method is similar to the method of the control. ]]> @@ -1597,14 +1597,14 @@ method returns `null` if no item is found in the given direction. + The method returns `null` if no item is found in the given direction. - Identifying the nearest item can vary depending on the operating system the application is running on and will affect the results of . + Identifying the nearest item can vary depending on the operating system the application is running on and will affect the results of . ## Examples - The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `findListView`. Ensure that the property is set to an icon view and that the is populated with items. Associate the event of `findListView` with the `findListView_MouseDown` method in this example. + The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `findListView`. Ensure that the property is set to an icon view and that the is populated with items. Associate the event of `findListView` with the `findListView_MouseDown` method in this example. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/ShowItemToolTips/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/ShowItemToolTips/form1.vb" id="Snippet1"::: @@ -1764,7 +1764,7 @@ ListViewItem1.Font = New Font(ListViewItem1.Font, _ property to change the color of the item text. This property can be used if you want to use different background and foreground color combinations (using the property to set the background color) to differentiate one item from another. For example, you could set the property to to identify items that have a negative number associated with them or have failed item validation. + You can use the property to change the color of the item text. This property can be used if you want to use different background and foreground color combinations (using the property to set the background color) to differentiate one item from another. For example, you could set the property to to identify items that have a negative number associated with them or have failed item validation. If you want to use the same foreground color for all subitems of an item, set the property to `true`. This will cause the colors and fonts specified for the item to be used for all subitem text. @@ -1809,7 +1809,7 @@ ListViewItem1.Font = New Font(ListViewItem1.Font, _ method represents only the section of the item specified in the `portion` parameter. You can also call the methods of the class to obtain the bounding rectangle of any item in a control. + The bounding rectangle returned by the method represents only the section of the item specified in the `portion` parameter. You can also call the methods of the class to obtain the bounding rectangle of any item in a control. ]]> @@ -1853,12 +1853,12 @@ ListViewItem1.Font = New Font(ListViewItem1.Font, _ method will return `null` if the is not in view, or there is not a located at the specified point. + The method will return `null` if the is not in view, or there is not a located at the specified point. ## Examples - The following code example demonstrates how to use the method. To run this code, paste it into a Windows Form and call `InitializeListView1` from the form's constructor or event-handling method. + The following code example demonstrates how to use the method. To run this code, paste it into a Windows Form and call `InitializeListView1` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/ShowItemToolTips/form1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/ShowItemToolTips/form1.vb" id="Snippet5"::: @@ -1916,7 +1916,7 @@ ListViewItem1.Font = New Font(ListViewItem1.Font, _ constructor, or you can use this property to modify the group membership at run time. If you set this property to `null` and there are groups in the collection, the item will appear in the default group, which has the header label "DefaultGroupSystem.Windows.Forms". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. + Use this property to set the group to which an item belongs. You can also set the group in the constructor, or you can use this property to modify the group membership at run time. If you set this property to `null` and there are groups in the collection, the item will appear in the default group, which has the header label "DefaultGroupSystem.Windows.Forms". The default group is not contained in the collection, and cannot be altered. It is primarily useful in debugging to ensure that all items have been properly added to groups. > [!NOTE] > groups are only available on Windows XP and the Windows Server 2003 family (Windows XP Home Edition, Windows XP Professional, Windows Server 2003). For more information, see the overview topic. @@ -2008,11 +2008,11 @@ ListViewItem1.Font = New Font(ListViewItem1.Font, _ ## Remarks The value of this property depends on the value of the property. Depending on the current value of the property of the control associated with the item, the used by the item could be one specified in the property or the property of the control. If the property is set to , the specified in the property is used; otherwise, the specified in the property is used. The images defined in the specified in the property should have the same index positions as the images in the specified in the property. If the index positions are the same for both controls, you can set a single index value for the property and the appropriate image will be displayed regardless of the value of the property of the control. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). -If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. ]]> @@ -2083,8 +2083,8 @@ For example, consider a button control whose and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). > [!NOTE] > If you are using multiple image lists, for small and large icon view, with a control, you should place small and large versions of the image at the same index location in their respective image lists. When switching between views, the index location of the image in one list is used to locate the image in the other list, regardless of the key value specified. @@ -2432,7 +2432,7 @@ If you set the property, the < method of the in the control that contains the item. You can use the method to remove an item from its control. This feature can be useful if you want to move the item to a different control or need to remove the item based on a request from the user to remove the item from within your application. + This method is similar in function to the method of the in the control that contains the item. You can use the method to remove an item from its control. This feature can be useful if you want to move the item to a different control or need to remove the item based on a request from the user to remove the item from within your application. ]]> @@ -2485,12 +2485,12 @@ If you set the property, the < If the property of the control the item is contained in is set to `true`, setting the value of this property adds or removes the item from the set of selected items. If the property is set to `false`, setting the value of this property to select an item automatically cancels the selection for any other items in the control. You can use this property to determine if an item is selected or to select an item at run time. You can access all items that are selected in a control by using the property. > [!NOTE] -> Items appear selected only when the control has focus. To select items in response to a user action such as a button click, be sure to call the method in addition to setting this property. +> Items appear selected only when the control has focus. To select items in response to a user action such as a button click, be sure to call the method in addition to setting this property. ## Examples - The following code example demonstrates how to use the and members. To run the example, place the following code in a form containing a named `ListView1` and a , located toward the bottom of the form, named `Button1`. Call the `InitializeListView` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the and members. To run the example, place the following code in a form containing a named `ListView1` and a , located toward the bottom of the form, named `Button1`. Call the `InitializeListView` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListView4/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/Clear/form1.cs" id="Snippet1"::: @@ -2680,21 +2680,21 @@ If you set the property, the < ## Examples - The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: + The following code example creates a control with three objects specified and three objects specified for each item. The example also creates objects to display the subitems in details view. Two objects are also created in the code example to provide images for the objects. These objects are added to the and properties. The example uses the following properties in creating the control: -- +- -- +- -- +- -- +- -- +- -- +- -- +- You need to add the code to a and call the method created in the example from the constructor or another method on the form. The example requires that images named `MySmallImage1`, `MySmallImage2`, `MyLargeImage1`, and `MyLargeImage2` are located in the root directory of drive C. @@ -2818,7 +2818,7 @@ If you set the property, the < ## Examples - The following code example demonstrates how to initialize a and set the and properties. To run this example, place the following code in a form that contains a named `ListView1`, and call `InitializeListViewItems` from the form's constructor or event-handling method. + The following code example demonstrates how to initialize a and set the and properties. To run this example, place the following code in a form that contains a named `ListView1`, and call `InitializeListViewItems` from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewItemExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListViewItem/Tag/form1.cs" id="Snippet1"::: @@ -2871,12 +2871,12 @@ If you set the property, the < ## Remarks The property allows you to change the text displayed for the item. The text of the should not exceed 259 characters or unexpected behavior could occur. - You can use the , , and properties to specify how the text is displayed. The class provides the property that determines whether text wraps to the next line or is displayed on a single line. + You can use the , , and properties to specify how the text is displayed. The class provides the property that determines whether text wraps to the next line or is displayed on a single line. ## Examples - The following code example demonstrates how to initialize a and set the and properties. To run this example, place the following code in a form containing a named `ListView1`, and call `InitializeListViewItems` from the form's constructor or event-handling method. + The following code example demonstrates how to initialize a and set the and properties. To run this example, place the following code in a form containing a named `ListView1`, and call `InitializeListViewItems` from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewItemExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListViewItem/Tag/form1.cs" id="Snippet1"::: @@ -2935,7 +2935,7 @@ If you set the property, the < ## Examples - The following code example demonstrates how to use the and properties. To run this example, paste the code into a Windows Form and call `InitializeItemsWithToolTips` from the form's constructor or event-handling method. + The following code example demonstrates how to use the and properties. To run this example, paste the code into a Windows Form and call `InitializeItemsWithToolTips` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/ShowItemToolTips/form1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ListView/ShowItemToolTips/form1.vb" id="Snippet4"::: @@ -3014,12 +3014,12 @@ If you set the property, the < control, you can set this property to `false`. When this property is set to `true`, any changes made to the subitem's , , and properties are ignored, and the values of the item are used instead. You can use this property if you need to specify a different text color, background color, or font to be used for a subitem to highlight the item when subitems are displayed in the control. + If you do not want to have a uniform background color, foreground color, and font used for all items and subitems in your control, you can set this property to `false`. When this property is set to `true`, any changes made to the subitem's , , and properties are ignored, and the values of the item are used instead. You can use this property if you need to specify a different text color, background color, or font to be used for a subitem to highlight the item when subitems are displayed in the control. ## Examples - The following code example demonstrates how to set the property to `false` to define a custom style for objects. The example also demonstrates how to set the and properties. To run the example, paste the following code into a form and call the `InitializeListView` method in form's constructor or event-handling method. + The following code example demonstrates how to set the property to `false` to define a custom style for objects. The example also demonstrates how to set the and properties. To run the example, paste the following code into a form and call the `InitializeListView` method in form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewItemStyle/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListView/TopItem/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ListViewItemConverter.xml b/xml/System.Windows.Forms/ListViewItemConverter.xml index 84a33edb876..002202a38a4 100644 --- a/xml/System.Windows.Forms/ListViewItemConverter.xml +++ b/xml/System.Windows.Forms/ListViewItemConverter.xml @@ -31,14 +31,14 @@ Provides a type converter to convert objects to and from various other representations. - base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> You should never create an instance of a . Instead, call the method of . For more information, see the examples in the base class. - +> You should never create an instance of a . Instead, call the method of . For more information, see the examples in the base class. + ]]> @@ -113,11 +113,11 @@ if this converter can perform the conversion; otherwise, . - @@ -172,11 +172,11 @@ Converts the given object to another type. The converted object. - on the object if the object is valid and if the destination type is string. If this cannot convert to the destination type, this will throw a . - + on the object if the object is valid and if the destination type is string. If this cannot convert to the destination type, this will throw a . + ]]> diff --git a/xml/System.Windows.Forms/ListViewItemMouseHoverEventArgs.xml b/xml/System.Windows.Forms/ListViewItemMouseHoverEventArgs.xml index 83ae938b1e5..836f39f0b7b 100644 --- a/xml/System.Windows.Forms/ListViewItemMouseHoverEventArgs.xml +++ b/xml/System.Windows.Forms/ListViewItemMouseHoverEventArgs.xml @@ -34,21 +34,21 @@ Provides data for the event. - event occurs when the mouse pointer hovers over a . - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event occurs when the mouse pointer hovers over a . + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet477"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet477"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet477"::: + ]]> @@ -123,16 +123,16 @@ Gets the item the mouse pointer is currently hovering over. The that the mouse pointer is currently hovering over. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet477"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet477"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet477"::: + ]]> diff --git a/xml/System.Windows.Forms/ListViewItemSelectionChangedEventArgs.xml b/xml/System.Windows.Forms/ListViewItemSelectionChangedEventArgs.xml index 8a92a31c902..c8007249e2d 100644 --- a/xml/System.Windows.Forms/ListViewItemSelectionChangedEventArgs.xml +++ b/xml/System.Windows.Forms/ListViewItemSelectionChangedEventArgs.xml @@ -30,21 +30,21 @@ Provides data for the event. - event occurs when the selection state of a changes from selected to deselected or deselected to selected. The will not occur if the is in virtual mode. - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event occurs when the selection state of a changes from selected to deselected or deselected to selected. The will not occur if the is in virtual mode. + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet478"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: + ]]> @@ -124,16 +124,16 @@ if the item's state has changed to selected; if the item's state has changed to deselected. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet478"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: + ]]> @@ -172,16 +172,16 @@ Gets the item whose selection state has changed. The whose selection state has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet478"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: + ]]> @@ -219,16 +219,16 @@ Gets the index of the item whose selection state has changed. The index of the whose selection state has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet478"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet478"::: + ]]> diff --git a/xml/System.Windows.Forms/ListViewItemStates.xml b/xml/System.Windows.Forms/ListViewItemStates.xml index 5200e4fd968..ca79d0df268 100644 --- a/xml/System.Windows.Forms/ListViewItemStates.xml +++ b/xml/System.Windows.Forms/ListViewItemStates.xml @@ -29,25 +29,25 @@ Defines constants that represent the possible states of a . - and properties. For more information, see the and events. - - - -## Examples - The following example demonstrates how to provide custom drawing for a control. The control in the example has a gradient background. Subitems with negative values have a red foreground and a black background. - - A handler for the event draws the background for entire items and for the column headers row. A handler for the event draws the text values and both the text and background for subitems that have negative values. - - A component provides a way to switch between the details view and the list. In the list view, only the event is fired. In this case, the text and background are both drawn in the event handler. - - For the complete example, see the reference topic. - + and properties. For more information, see the and events. + + + +## Examples + The following example demonstrates how to provide custom drawing for a control. The control in the example has a gradient background. Subitems with negative values have a red foreground and a black background. + + A handler for the event draws the background for entire items and for the column headers row. A handler for the event draws the text values and both the text and background for subitems that have negative values. + + A component provides a way to switch between the details view and the list. In the list view, only the event is fired. In this case, the text and background are both drawn in the event handler. + + For the complete example, see the reference topic. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawListViewColumnHeaderEventArgs/Overview/listviewownerdraw.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Windows.Forms/ListViewVirtualItemsSelectionRangeChangedEventArgs.xml b/xml/System.Windows.Forms/ListViewVirtualItemsSelectionRangeChangedEventArgs.xml index 1a595997cbe..b74f0e14a20 100644 --- a/xml/System.Windows.Forms/ListViewVirtualItemsSelectionRangeChangedEventArgs.xml +++ b/xml/System.Windows.Forms/ListViewVirtualItemsSelectionRangeChangedEventArgs.xml @@ -24,21 +24,21 @@ Provides data for the event. - event occurs when the is in virtual mode, and the selection state of a range of items is changed. - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event occurs when the is in virtual mode, and the selection state of a range of items is changed. + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet482"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: + ]]> @@ -75,11 +75,11 @@ to indicate the items are selected; to indicate the items are deselected. Initializes a new instance of the class. - occurs when items are changed from selected to deselected, and deselected to selected. The `isSelected` parameter indicates the current state of the range of items. - + occurs when items are changed from selected to deselected, and deselected to selected. The `isSelected` parameter indicates the current state of the range of items. + ]]> @@ -119,16 +119,16 @@ Gets the index for the last item in the range of items whose selection state has changed. The index of the last item in the range of items whose selection state has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet482"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: + ]]> @@ -167,21 +167,21 @@ if the range of items is selected; if the range of items is deselected. - occurs when items are changed from selected to deselected, and deselected to selected. The `isSelected` parameter indicates the current state of the range of items. - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + occurs when items are changed from selected to deselected, and deselected to selected. The `isSelected` parameter indicates the current state of the range of items. + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet482"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: + ]]> @@ -219,16 +219,16 @@ Gets the index for the first item in the range of items whose selection state has changed. The index of the first item in the range of items whose selection state has changed. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet482"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet482"::: + ]]> diff --git a/xml/System.Windows.Forms/MainMenu.xml b/xml/System.Windows.Forms/MainMenu.xml index 0aeee9d4c07..f8ae71cfe75 100644 --- a/xml/System.Windows.Forms/MainMenu.xml +++ b/xml/System.Windows.Forms/MainMenu.xml @@ -50,7 +50,7 @@ This class is not available in .NET Core 3.1 and later versions. Use property to display the text of the menu from right to left to support languages such as Arabic. - You can create different objects to represent different menu structures for your form. If you want to reuse the menu structure contained in a specific , you can use its method to create a copy. Once you have a copy of the menu structure, you can make the appropriate modifications for your new menu structure. + You can create different objects to represent different menu structures for your form. If you want to reuse the menu structure contained in a specific , you can use its method to create a copy. Once you have a copy of the menu structure, you can make the appropriate modifications for your new menu structure. > [!NOTE] > Cutting and pasting menu items from one form to another in the designer might not work as expected if the form you are pasting into has no menu items defined. @@ -104,7 +104,7 @@ This class is not available in .NET Core 3.1 and later versions. Use without any specified objects. To add menu items to the control use the other version of this constructor that accepts an array of objects as its parameter or use the method of the property. + This version of the constructor creates a without any specified objects. To add menu items to the control use the other version of this constructor that accepts an array of objects as its parameter or use the method of the property. @@ -173,7 +173,7 @@ This class is not available in .NET Core 3.1 and later versions. Use objects to the at the time of its creation. After the has been created you can add additional objects to the using the method of the property. + You can use this constructor to assign an array of objects to the at the time of its creation. After the has been created you can add additional objects to the using the method of the property. @@ -216,12 +216,12 @@ This class is not available in .NET Core 3.1 and later versions. Use . You can use this method to reuse the menu structure stored in a as the foundation for a new . For example, if you want to create a menu structure that has the same menu items as an existing but will also have additional objects added to it, you can use the method to create a copy of the original and then add the new objects to the cloned . + You can use this method to create a copy of the menu structure stored in a . You can use this method to reuse the menu structure stored in a as the foundation for a new . For example, if you want to create a menu structure that has the same menu items as an existing but will also have additional objects added to it, you can use the method to create a copy of the original and then add the new objects to the cloned . ## Examples - The following code example uses the method to determine if a is currently parented to the form. If the call in the example code to does not return `null`, the code then clones the menu structure of the using the method. The code then sets the property to true on the new copy of the to create a that can be used for languages that support right to left text. This example requires that you have a created that is named `mainMenu1`. + The following code example uses the method to determine if a is currently parented to the form. If the call in the example code to does not return `null`, the code then clones the menu structure of the using the method. The code then sets the property to true on the new copy of the to create a that can be used for languages that support right to left text. This example requires that you have a created that is named `mainMenu1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MainMenu.GetForm Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MainMenu/CloneMenu/source.cs" id="Snippet1"::: @@ -260,7 +260,7 @@ This class is not available in .NET Core 3.1 and later versions. Use event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MainMenu1`. Then ensure that the event handler is associated with the event. @@ -324,10 +324,10 @@ This class is not available in .NET Core 3.1 and later versions. Use when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. +> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. ]]> @@ -365,7 +365,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method to determine if a is currently parented to the form. If the call in the example code to does not return `null`, the code then clones the menu structure of the using the method. The code then sets the property to true on the new copy of the to create a that can be used for languages that support right to left text. This example requires that you have a created that is named `mainMenu1`. + The following code example uses the method to determine if a is currently parented to the form. If the call in the example code to does not return `null`, the code then clones the menu structure of the using the method. The code then sets the property to true on the new copy of the to create a that can be used for languages that support right to left text. This example requires that you have a created that is named `mainMenu1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MainMenu.GetForm Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MainMenu/CloneMenu/source.cs" id="Snippet1"::: @@ -406,7 +406,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -459,7 +459,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method to determine if a is currently parented to the form. If the call in the example code to does not return `null`, the code then clones the menu structure of the using the method. The example code then sets the property to `RightToLeft.Yes` on the new copy of the to create a that can be used for languages that support right to left text. This example requires that you have a created that is named `mainMenu1`. + The following code example uses the method to determine if a is currently parented to the form. If the call in the example code to does not return `null`, the code then clones the menu structure of the using the method. The example code then sets the property to `RightToLeft.Yes` on the new copy of the to create a that can be used for languages that support right to left text. This example requires that you have a created that is named `mainMenu1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MainMenu.RightToLeft Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MainMenu/RightToLeft/source.cs" id="Snippet1"::: @@ -496,7 +496,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method if the is assigned to a form. + The return string includes the type and the string returned by the method if the is assigned to a form. ]]> diff --git a/xml/System.Windows.Forms/MaskFormat.xml b/xml/System.Windows.Forms/MaskFormat.xml index 7cdd2406181..54a2c91124c 100644 --- a/xml/System.Windows.Forms/MaskFormat.xml +++ b/xml/System.Windows.Forms/MaskFormat.xml @@ -26,7 +26,7 @@ and to control how text is returned - in the first case, by performing a cut and copy operation, and in the second place, by using the property. + This enumeration is used by and to control how text is returned - in the first case, by performing a cut and copy operation, and in the second place, by using the property. ]]> diff --git a/xml/System.Windows.Forms/MaskInputRejectedEventArgs.xml b/xml/System.Windows.Forms/MaskInputRejectedEventArgs.xml index 0ea2fdaa1b1..d6b5499f5bf 100644 --- a/xml/System.Windows.Forms/MaskInputRejectedEventArgs.xml +++ b/xml/System.Windows.Forms/MaskInputRejectedEventArgs.xml @@ -32,7 +32,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -83,7 +83,7 @@ constructor sets the values of the and properties. + The constructor sets the values of the and properties. ]]> @@ -127,12 +127,12 @@ property is set in the constructor. + The property is set in the constructor. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -180,12 +180,12 @@ property is set in the constructor. + The property is set in the constructor. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/MaskedTextBox.xml b/xml/System.Windows.Forms/MaskedTextBox.xml index 4ca762bb424..55bdb42f570 100644 --- a/xml/System.Windows.Forms/MaskedTextBox.xml +++ b/xml/System.Windows.Forms/MaskedTextBox.xml @@ -98,15 +98,15 @@ |Masked Edit control (Visual Basic 6.0) property|Equivalent MaskedTextBox (.NET Framework) property| |-------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| -|`AllowPrompt` property|| +|`AllowPrompt` property|| |`AutoTab` property|None| -|`ClipMode` property|| -|`ClipText` property| (when is set to )| +|`ClipMode` property|| +|`ClipText` property| (when is set to )| |`Format` property|None| -|`FormattedText` property| (when is set to )| -|`Mask` property|| -|`PromptChar` property|| -|`PromptInclude` property|| +|`FormattedText` property| (when is set to )| +|`Mask` property|| +|`PromptChar` property|| +|`PromptInclude` property|| |`ValidationError` event|| > [!CAUTION] @@ -200,9 +200,9 @@ . It is responsible for parsing the mask and determining whether user input conforms to the current mask position. You can derive a new class from to define your own custom masking language, and use the constructor to replace the standard . + The `maskedTextProvider` parameter defines the masking language used by . It is responsible for parsing the mask and determining whether user input conforms to the current mask position. You can derive a new class from to define your own custom masking language, and use the constructor to replace the standard . - If you want to use the default masking language and supply your own input mask, you do not need to use this constructor. Instead, you can either use the constructor, or use the parameterless constructor then set the property. + If you want to use the default masking language and supply your own input mask, you do not need to use this constructor. Instead, you can either use the constructor, or use the parameterless constructor then set the property. ]]> @@ -243,7 +243,7 @@ constructor uses the standard with the input `mask` to parse user input into the . + The constructor uses the standard with the input `mask` to parse user input into the . If you assign a new mask to the property, it will override the value set by this constructor. @@ -403,9 +403,9 @@ is `true`, the prompt character must be valid for the current location in the mask in order to be accepted. For example, if is "*", and the current location in the mask demands the user enter a digit, entering an asterisk (\*) will fail and cause the event to occur. + Even when is `true`, the prompt character must be valid for the current location in the mask in order to be accepted. For example, if is "*", and the current location in the mask demands the user enter a digit, entering an asterisk (\*) will fail and cause the event to occur. - The property takes precedence over . + The property takes precedence over . ]]> @@ -455,7 +455,7 @@ restricts user input to the characters a-z and A-Z. ASCII control characters are not allowed. + If `true`, restricts user input to the characters a-z and A-Z. ASCII control characters are not allowed. ]]> @@ -597,7 +597,7 @@ method is inherited from the base class. However, does not support undo functionality. + The method is inherited from the base class. However, does not support undo functionality. ]]> @@ -841,7 +841,7 @@ determines which symbols are used for the currency, date, and other culture-specific mask placeholders when type validation occurs and the control has a non-null property. + determines which symbols are used for the currency, date, and other culture-specific mask placeholders when type validation occurs and the control has a non-null property. ]]> @@ -957,7 +957,7 @@ method is inherited from the base class. However, because the control does not support multiline configuration, this method is not supported. + The method is inherited from the base class. However, because the control does not support multiline configuration, this method is not supported. ]]> @@ -1003,7 +1003,7 @@ method is inherited from the base class. However, because the control does not support multiline configuration, this method is not supported. + The method is inherited from the base class. However, because the control does not support multiline configuration, this method is not supported. ]]> @@ -1052,7 +1052,7 @@ method is inherited from the base class. However, because the control does not support multiline configuration, this method is not supported. + The method is inherited from the base class. However, because the control does not support multiline configuration, this method is not supported. ]]> @@ -1179,9 +1179,9 @@ property controls the character insertion behavior of the control. The state of this property is defined by the enumeration, which can be always on, always off or set to respect the setting of the user's keyboard. This property supersedes the insertion mode of the keyboard. For example, if the keyboard is set to overwrite, but is set to `Insert`, the will operate in insert mode. The property will access the true insertion mode of the . + The property controls the character insertion behavior of the control. The state of this property is defined by the enumeration, which can be always on, always off or set to respect the setting of the user's keyboard. This property supersedes the insertion mode of the keyboard. For example, if the keyboard is set to overwrite, but is set to `Insert`, the will operate in insert mode. The property will access the true insertion mode of the . - If changing changes the value of , will raise the event. + If changing changes the value of , will raise the event. This property has no effect if no mask has been set. @@ -1263,9 +1263,9 @@ takes into account both the value of the property and the state of the user's keyboard. If is set to either or , will return `false` or `true`, respectively. If is set to , it will return the state of the INSERT key. + takes into account both the value of the property and the state of the user's keyboard. If is set to either or , will return `false` or `true`, respectively. If is set to , it will return the state of the INSERT key. - When is `false`, will reject as invalid any character entry that would result in a violation anywhere in the mask. In explanation, if inserting a character would cause a character to be shifted over into a mask position where it would not be valid, the character insertion will be rejected. + When is `false`, will reject as invalid any character entry that would result in a violation anywhere in the mask. In explanation, if inserting a character would cause a character to be shifted over into a mask position where it would not be valid, the character insertion will be rejected. ]]> @@ -1316,7 +1316,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -1438,9 +1438,9 @@ is the default property for the class. + is the default property for the class. - must be a string composed of one or more of the masking elements, as shown in the following table. The masking language used by is defined by its associated . The standard provider specifies a masking language based upon the one used by the Masked Edit control in Visual Basic 6.0, and should be very familiar to users migrating from that platform. + must be a string composed of one or more of the masking elements, as shown in the following table. The masking language used by is defined by its associated . The standard provider specifies a masking language based upon the one used by the Masked Edit control in Visual Basic 6.0, and should be very familiar to users migrating from that platform. |Masking element|Description| |---------------------|-----------------| @@ -1528,12 +1528,12 @@ event is raised after the value of the property is changed. This event is also raised if the is indirectly altered by a member such as , , , and . + The event is raised after the value of the property is changed. This event is also raised if the is indirectly altered by a member such as , , , and . ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -1584,7 +1584,7 @@ checks only required input elements. To determine whether all required and optional input elements have been filled in, use the property instead. + checks only required input elements. To determine whether all required and optional input elements have been filled in, use the property instead. ]]> @@ -1639,9 +1639,9 @@ property defines the mask-parsing engine and the masking language used by the control. The default provider is the class; however, a custom provider can be specified using the constructor. + The property defines the mask-parsing engine and the masking language used by the control. The default provider is the class; however, a custom provider can be specified using the constructor. - cannot be set directly. However, setting some of the properties of - such as , , , and - may internally cause the creation of a new . + cannot be set directly. However, setting some of the properties of - such as , , , and - may internally cause the creation of a new . ]]> @@ -1762,7 +1762,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -2072,7 +2072,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2223,7 +2223,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2300,7 +2300,7 @@ method is inherited from the base class. However, because the control does not support multiline configuration, this method is overridden to perform no actions. + The method is inherited from the base class. However, because the control does not support multiline configuration, this method is overridden to perform no actions. ]]> @@ -2343,7 +2343,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2389,7 +2389,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2439,14 +2439,14 @@ method causes the input string to be validated against the property, if a has been specified for this property. It will then also raise the event. + The method causes the input string to be validated against the property, if a has been specified for this property. It will then also raise the event. > [!NOTE] > To ensure consistency with text-based controls, validation will occur even if the is read-only (its property is set to `true`). Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2501,7 +2501,7 @@ ## Remarks For sensitive user input, it is common practice to conceal the actual information entered by the user. If the property is set to a non-null character, will display this character for all input into the control. Setting this property to `null` will disable this functionality. - If you want to use the operating system supplied password character, which is defined in COMCTL32.dll, use the property instead. If both the and properties are activated, the latter takes precedence. + If you want to use the operating system supplied password character, which is defined in COMCTL32.dll, use the property instead. If both the and properties are activated, the latter takes precedence. > [!IMPORTANT] > As a security consideration, the control disables cut and copy operations on password-protected strings. @@ -2587,7 +2587,7 @@ overrides its base control's implementation of to properly handle character events when the user is entering characters using an Input Method Editor (IME), such as is used for entering Japanese, Chinese, and other complex non-Latin scripts. detects any WM_CHAR messages that occur after it receives a WM_IME_CHAR message and suppresses them in order to prevent these characters from showing up in the control. If you derive from this control and override this message, you should duplicate this behavior if you wish your new control to work with IMEs. + overrides its base control's implementation of to properly handle character events when the user is entering characters using an Input Method Editor (IME), such as is used for entering Japanese, Chinese, and other complex non-Latin scripts. detects any WM_CHAR messages that occur after it receives a WM_IME_CHAR message and suppresses them in order to prevent these characters from showing up in the control. If you derive from this control and override this message, you should duplicate this behavior if you wish your new control to work with IMEs. ]]> @@ -2637,7 +2637,7 @@ will be displayed in for any mask position that the user has not yet filled in. + will be displayed in for any mask position that the user has not yet filled in. Use the property to specify whether the prompt is displayed when does not have focus. @@ -2719,13 +2719,13 @@ in a single input operation, typically by copying and pasting a string. If the entire string only contains valid characters, according to their paste position in the input mask, then the entire operation will succeed. However, when a parsing error occurs, the behavior of depends on the value of , as follows: + Sometimes the user will enter several characters into a in a single input operation, typically by copying and pasting a string. If the entire string only contains valid characters, according to their paste position in the input mask, then the entire operation will succeed. However, when a parsing error occurs, the behavior of depends on the value of , as follows: - If this property is `true`, then processing of the input string stops at the invalid character. All subsequent characters are ignored. A single event is raised. - If this property is `false`, then the invalid character is rejected, but parsing continues with the next character in the input string. A event is raised for every invalid character in the input string. - The , and properties can also influence the interpretation of the user input. + The , and properties can also influence the interpretation of the user input. If the property is `false`, then any characters already in the input mask to the right of the insertion point will be displaced by the accepted number of characters. This shifting may cause additional parsing errors. @@ -2780,7 +2780,7 @@ ## Remarks The can treat two categories of characters - spaces and prompt characters - specially. Typically, each input character will be tested against the mask and either accepted or rejected. Assuming that the property is set to non-`null`, then setting the property to `true` will result in special processing for the prompt character. When the user enters the prompt character into the mask, it causes the current mask character position to be cleared and the current position to be advanced to the next editable character. - takes precedence over the property, as shown in the following table. + takes precedence over the property, as shown in the following table. |ResetOnPrompt value|AllowPromptAsInput value|Resulting behavior| |-------------------------|------------------------------|------------------------| @@ -2879,7 +2879,7 @@ method is inherited from the base class. However, because the control does not support multiline configuration, this method is overridden to perform no actions. + The method is inherited from the base class. However, because the control does not support multiline configuration, this method is overridden to perform no actions. ]]> @@ -2916,7 +2916,7 @@ , , and . Selections set using this property behave like a Paste operation: each character is matched against the mask, and the event is raised for invalid characters. If is `true`, literals and prompt characters are allowed when setting , and will be removed silently unless they violate the mask. + Selections retrieved using this property are formatted according to the control's formatting properties, such as , , and . Selections set using this property behave like a Paste operation: each character is matched against the mask, and the event is raised for invalid characters. If is `true`, literals and prompt characters are allowed when setting , and will be removed silently unless they violate the mask. ]]> @@ -2970,13 +2970,13 @@ - If this property is `false`, the user can only enter the next editable character. If the next position in the mask will not accept the literal character (for example, the user types "/" and the next position only accepts digits), the control will raise the event. - As an example, in the "90/90/0000" date entry mask, the forward slash characters are literals. Assume that the user has entered two initial digits, "11", so the current position in the mask is at the first forward slash (/) literal. If is `true`, then the user has the following valid choices: + As an example, in the "90/90/0000" date entry mask, the forward slash characters are literals. Assume that the user has entered two initial digits, "11", so the current position in the mask is at the first forward slash (/) literal. If is `true`, then the user has the following valid choices: - The user can enter a "/" character. This results in the position being moved to the next character, which in this example is the fourth position, a 9 masking element. - The user can enter the next editable character, which in this example is a digit. The digit would be validated and the current position would automatically be moved to the fifth position, which is a 0 masking element. - If is `false`, then only a valid data input is allowed, which in this example would be a digit. + If is `false`, then only a valid data input is allowed, which in this example would be a digit. ]]> @@ -3039,13 +3039,13 @@ is the default binding property for the class. + is the default binding property for the class. - Strings retrieved using this property are formatted according to the control's formatting properties, such as and . + Strings retrieved using this property are formatted according to the control's formatting properties, such as and . - You can assign a string with or without literal characters to depending on the values of , , and . + You can assign a string with or without literal characters to depending on the values of , , and . - is the default binding property for . + is the default binding property for . will raise the event whenever the formatted text value changes. Different properties may or may not cause this value to change. For example, changing the property will not raise the event, but changing the property will. @@ -3163,7 +3163,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -3297,11 +3297,11 @@ method calls the base class implementation of this method, , then appends the input string after processing by the mask. This method honors properties that alter the appearance of the formatted string, with the following exceptions: + This version of the method calls the base class implementation of this method, , then appends the input string after processing by the mask. This method honors properties that alter the appearance of the formatted string, with the following exceptions: - The returned string always includes prompt and literal characters, regardless of the values of the property. -- Password characters are ignored, so that the actual user-typed characters are returned. In other words, the values of the and properties are ignored. +- Password characters are ignored, so that the actual user-typed characters are returned. In other words, the values of the and properties are ignored. ]]> @@ -3355,11 +3355,11 @@ - The property is retrieved. - - The method is called. + - The method is called. 2. Any of these events result in a call to the `Parse` method of the type specified with the property. `Parse` is responsible for the conversion of the formatted input string to the target type. A successful conversion equates to a successful validation. -3. After `Parse` returns, the event is raised. The event handler for this event is most commonly implemented to perform type or mask validation processing. It receives a parameter containing information about the conversion; for example, the member indicates whether the conversion was successful. +3. After `Parse` returns, the event is raised. The event handler for this event is most commonly implemented to perform type or mask validation processing. It receives a parameter containing information about the conversion; for example, the member indicates whether the conversion was successful. 4. After the event handler for the event returns, the standard validation event, , is raised. A handler can be implemented to perform standard validation, perhaps including canceling the event. @@ -3419,7 +3419,7 @@ method is inherited from the base class. However, does not support undo functionality. + The method is inherited from the base class. However, does not support undo functionality. ]]> @@ -3468,7 +3468,7 @@ property determines whether user-supplied input should be displayed in the as multiple occurrences of a password character defined by the operating system. functions similarly to the property, but instead of using a programmer-supplied character for the prompt, uses a prompt defined by the operating system. This property has precedence over . + The property determines whether user-supplied input should be displayed in the as multiple occurrences of a password character defined by the operating system. functions similarly to the property, but instead of using a programmer-supplied character for the prompt, uses a prompt defined by the operating system. This property has precedence over . > [!IMPORTANT] > As a security consideration, the control disables cut and copy operations on password-protected strings. @@ -3519,9 +3519,9 @@ method attempts to convert the formatted string contained in the property to an instance of the type that is specified by the property. Prompt characters are ignored in the formatted string, but literals are handled in accordance with the current value of the property. + The method attempts to convert the formatted string contained in the property to an instance of the type that is specified by the property. Prompt characters are ignored in the formatted string, but literals are handled in accordance with the current value of the property. - raises the event after the conversion is attempted, regardless of its success. + raises the event after the conversion is attempted, regardless of its success. ]]> @@ -3593,9 +3593,9 @@ maskedTextBox1.Mask = "99/99/9999"; This mask can demand that the user enter eight digits, but cannot verify that the user enters month, date, and year values in the correct range; "12/20/2003" and "70/90/0000" are equally valid as far as the mask is concerned. - You can use to verify whether the data entered by the user falls within the correct range - in the previously mentioned case, by assigning it an instance of the type. The current text in the control will be validated either when the user leaves the control. You can determine whether or not the data fails validation by monitoring for the event. will only perform the check against if is `true`. + You can use to verify whether the data entered by the user falls within the correct range - in the previously mentioned case, by assigning it an instance of the type. The current text in the control will be validated either when the user leaves the control. You can determine whether or not the data fails validation by monitoring for the event. will only perform the check against if is `true`. - If you want to use your own custom data types with , you must implement a static `Parse` method that takes a string as a parameter. This method must be implemented with one or both of the following signatures: + If you want to use your own custom data types with , you must implement a static `Parse` method that takes a string as a parameter. This method must be implemented with one or both of the following signatures: `public static Object Parse(string)` diff --git a/xml/System.Windows.Forms/MdiClient.xml b/xml/System.Windows.Forms/MdiClient.xml index 333b1ed2df4..5c188466229 100644 --- a/xml/System.Windows.Forms/MdiClient.xml +++ b/xml/System.Windows.Forms/MdiClient.xml @@ -266,7 +266,7 @@ method to arrange MDI child forms on a parent form. + Use the method to arrange MDI child forms on a parent form. ]]> diff --git a/xml/System.Windows.Forms/MdiLayout.xml b/xml/System.Windows.Forms/MdiLayout.xml index 03600d6e520..0df571e9ed9 100644 --- a/xml/System.Windows.Forms/MdiLayout.xml +++ b/xml/System.Windows.Forms/MdiLayout.xml @@ -24,11 +24,11 @@ Specifies the layout of multiple document interface (MDI) child windows in an MDI parent window. - method of the class. - + method of the class. + ]]> diff --git a/xml/System.Windows.Forms/MeasureItemEventArgs.xml b/xml/System.Windows.Forms/MeasureItemEventArgs.xml index 5aaadd5c3c4..dd8590b56a7 100644 --- a/xml/System.Windows.Forms/MeasureItemEventArgs.xml +++ b/xml/System.Windows.Forms/MeasureItemEventArgs.xml @@ -31,22 +31,22 @@ Provides data for the event of the , , , and controls. - , , , or is set to `true`. It is used to tell the drawing function how to size an item. - - For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates how to use the property to perform custom drawing of the items in a . - + , , , or is set to `true`. It is used to tell the drawing function how to size an item. + + For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates how to use the property to perform custom drawing of the items in a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MeasureItemEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawItemState/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: + ]]> @@ -165,20 +165,20 @@ Gets the object to measure against. The object to use to determine the scale of the item you are drawing. - object to determine the scale to use when setting the and . Different types of graphics objects can have different scales, such as the difference in measurement scale between a monitor screen and a printer. - - - -## Examples - The following code example demonstrates how to use the property to perform custom drawing of the items in a . - + object to determine the scale to use when setting the and . Different types of graphics objects can have different scales, such as the difference in measurement scale between a monitor screen and a printer. + + + +## Examples + The following code example demonstrates how to use the property to perform custom drawing of the items in a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MeasureItemEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawItemState/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: + ]]> @@ -217,13 +217,13 @@ Gets the index of the item for which the height and width is needed. The index of the item to be measured. - @@ -268,15 +268,15 @@ Gets or sets the height of the item specified by the . The height of the item measured. - property to perform custom drawing of the items in a . - + property to perform custom drawing of the items in a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MeasureItemEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawItemState/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: + ]]> @@ -321,20 +321,20 @@ Gets or sets the width of the item specified by the . The width of the item measured. - . You use this property to ensure the menu is at least as wide as the widest menu item in the menu list. - - - -## Examples - The following code example demonstrates how to use the property to perform custom drawing of the items in a . - + . You use this property to ensure the menu is at least as wide as the widest menu item in the menu list. + + + +## Examples + The following code example demonstrates how to use the property to perform custom drawing of the items in a . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MeasureItemEventArgs/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DrawItemState/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DrawItemState/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/Menu+MenuItemCollection.xml b/xml/System.Windows.Forms/Menu+MenuItemCollection.xml index f0beaaff33d..2539d62bd1e 100644 --- a/xml/System.Windows.Forms/Menu+MenuItemCollection.xml +++ b/xml/System.Windows.Forms/Menu+MenuItemCollection.xml @@ -53,7 +53,7 @@ ## Remarks This class represents the collection of objects stored in a , , or . For the and classes, this collection represents the entire menu structure for the control. For the class, this collection represents the list of submenu items associated with the . - The and methods enable you to add and remove individual menu items from the collection. You can also use the method to remove all the menu items from the collection. + The and methods enable you to add and remove individual menu items from the collection. You can also use the method to remove all the menu items from the collection. ]]> @@ -133,12 +133,12 @@ can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. + A can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. ## Examples - The following code example uses the derived class to create a main menu, `mainMenu1`, that has two objects added to its collection. The code then assigns `mainMenu1` to the property of the . This example requires that the code defined in this example is located with in a form. + The following code example uses the derived class to create a main menu, `mainMenu1`, that has two objects added to its collection. The code then assigns `mainMenu1` to the property of the . This example requires that the code defined in this example is located with in a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Menu.MenuItemCollection.Add Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Menu+MenuItemCollection/Add/source.cs" id="Snippet1"::: @@ -179,9 +179,9 @@ can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. + A can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. - This version of the method allows you to add previously created objects to the end of the menu item collection. + This version of the method allows you to add previously created objects to the end of the menu item collection. @@ -229,9 +229,9 @@ can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. + A can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. - This version of the method allows you to add previously created objects to a specific index location within the collection. Any currently located at that index, and all objects after that index, are moved to the next lowest index in the collection. + This version of the method allows you to add previously created objects to a specific index location within the collection. Any currently located at that index, and all objects after that index, are moved to the next lowest index in the collection. @@ -281,9 +281,9 @@ can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. + A can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. - This version of the method allows you to specify a caption for the menu item and a delegate to handle the event. You can use this version of the method if your application already has an event handler to handle the event. + This version of the method allows you to specify a caption for the menu item and a delegate to handle the event. You can use this version of the method if your application already has an event handler to handle the event. > [!NOTE] > The event is not raised for a that contains submenu items. @@ -291,7 +291,7 @@ ## Examples - The following code example uses the derived class to create a main menu, `mainMenu1`, that has two objects added to its collection. The code uses this version of the method to define an event handler for the event of the second menu item added to the collection. The code then assigns `mainMenu1` to the property of the . This example requires that the code defined in this example is located within a form. + The following code example uses the derived class to create a main menu, `mainMenu1`, that has two objects added to its collection. The code uses this version of the method to define an event handler for the event of the second menu item added to the collection. The code then assigns `mainMenu1` to the property of the . This example requires that the code defined in this example is located within a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Menu.MenuItemCollection.Add1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Menu+MenuItemCollection/Add/source1.cs" id="Snippet1"::: @@ -334,9 +334,9 @@ can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. + A can only be contained in one menu at a time, and cannot be added more than once to the same menu. To reuse a in more than one menu, use the method of the class. To remove a that you have previously added, use the method. - This version of the method allows you to specify a caption for the menu item and a delegate that will handle its event. You can use this version of the method if your application already has an event handler to handle the event. This version of the method also allows you to specify an array of previously created objects that you want to add to the collection. You can use this feature to reuse existing objects that have been cloned using the method. If the `items` parameter is not empty or `null`, the being added to the collection will contain submenu items. + This version of the method allows you to specify a caption for the menu item and a delegate that will handle its event. You can use this version of the method if your application already has an event handler to handle the event. This version of the method also allows you to specify an array of previously created objects that you want to add to the collection. You can use this feature to reuse existing objects that have been cloned using the method. If the `items` parameter is not empty or `null`, the being added to the collection will contain submenu items. > [!NOTE] > The event is not raised for a that contains submenu items. @@ -375,7 +375,7 @@ objects to the collection instead of manually adding each to the collection using the method. If the collection already contains objects, calling this method will add the new objects to the end of the collection. + You can use method to quickly add a group of previously created objects to the collection instead of manually adding each to the collection using the method. If the collection already contains objects, calling this method will add the new objects to the end of the collection. @@ -421,7 +421,7 @@ method. To add new objects to the collection, use the method. + You can use this method to clear the entire collection of menu items from a menu. To remove an individual menu item from the collection, use the method. To add new objects to the collection, use the method. @@ -473,7 +473,7 @@ ## Examples - In this example, you create a main menu, `myMainMenu`, with two objects, `File` and `Edit`. The `File` menu has three submenu items, `New`, `Open`, and `Exit`. By using the method, you check to see if the `File` menu collection contains the item `Open`. If the item exists, you display the result in a text box. This program requires that you have already created a named `Form1`. + In this example, you create a main menu, `myMainMenu`, with two objects, `File` and `Edit`. The `File` menu has three submenu items, `New`, `Open`, and `Exit`. By using the method, you check to see if the `File` menu collection contains the item `Open`. If the item exists, you display the result in a text box. This program requires that you have already created a named `Form1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ContainsItems/CPP/containsitems.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Menu+MenuItemCollection/Contains/containsitems.cs" id="Snippet1"::: @@ -515,7 +515,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. ]]> @@ -647,7 +647,7 @@ returns an empty array. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, or there are no matches, returns an empty array. The property corresponds to the key for a in the . @@ -716,7 +716,7 @@ objects, `File` and `Edit`. The `File` menu has three submenu items: `New`, `Open`, and `Exit`. By using the method, you retrieve the index of the `Exit` item in the `File` menu collection, and then display its value in a message box. This example requires that you have already created a named `Form1`. + The following code example shows how to create a main menu, `myMainMenu`, with two objects, `File` and `Edit`. The `File` menu has three submenu items: `New`, `Open`, and `Exit`. By using the method, you retrieve the index of the `Exit` item in the `File` menu collection, and then display its value in a message box. This example requires that you have already created a named `Form1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/IndexOf/CPP/indexof.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Menu+MenuItemCollection/IndexOf/indexof.cs" id="Snippet1"::: @@ -755,11 +755,11 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, or there are no matches, returns -1. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, or there are no matches, returns -1. ]]> @@ -880,7 +880,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. ]]> diff --git a/xml/System.Windows.Forms/Menu.xml b/xml/System.Windows.Forms/Menu.xml index 6acfb4afaf7..17c058d9f81 100644 --- a/xml/System.Windows.Forms/Menu.xml +++ b/xml/System.Windows.Forms/Menu.xml @@ -58,7 +58,7 @@ This class is the base class for the , class uses its derived classes to define many of its properties. If you are using your menu in a multiple-document interface (MDI) application, you can use the property to specify a that displays a list of open MDI child forms in your application. The property contains a list of objects stored in the menu class. For a or , this property contains all the objects that are displayed. For a , the property represents the submenu items associated with it. - In addition to the properties that are provided for all the derived menu classes, the class also provides methods, such as and , that enable you to create new menus from existing menus, and also merge two menu structures together. + In addition to the properties that are provided for all the derived menu classes, the class also provides methods, such as and , that enable you to create new menus from existing menus, and also merge two menu structures together. The class also defines the nested class . This class defines the collection of objects used by the property. You can use the methods of the class to add and remove menu items from a , , or . @@ -144,7 +144,7 @@ This class is the base class for the , objects (stored in the passed in to `menuSrc`) into the current menu. You can use this method in your derived class to clone objects. They can then be reused by other classes that derive from , such as , , and . ## Examples - This example creates a main menu, `mainMenu1`, with three menu items: `File`, `Edit`, and `View`. It then uses the method to copy `mainMenu1` into `mainMenu2`. The cloned menu is then assigned to the form and displayed. This program requires that you have already created a named `Form1`. + This example creates a main menu, `mainMenu1`, with three menu items: `File`, `Edit`, and `View`. It then uses the method to copy `mainMenu1` into `mainMenu2`. The cloned menu is then assigned to the form and displayed. This program requires that you have already created a named `Form1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/CloneMenu/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Menu/CloneMenu/form1.cs" id="Snippet1"::: @@ -210,10 +210,10 @@ This class is the base class for the , when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. +> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. ]]> @@ -375,7 +375,7 @@ This class is the base class for the , that this menu is contained in. This property returns `null` if the menu is not contained in a . This can occur if the menu is contained in a or , or if the menu is not contained in any menu. You can use this property to determine whether a menu is currently being used, and also to determine where. ## Examples - In this example, you use the method to obtain a reference to the shortcut menu that contains `menuItem1` or `menuItem2`, and display the shortcut menu information in a message box. You programmatically create a shortcut menu with two items, `New` and `Open`. You then add functionality to these items by creating the appropriate event handlers. When you run the example, you get a message box that tells you to right-click the form in order to display the shortcut menu. Then, when you click a menu item, you get another message that tells which item has been clicked and displays the information on the containing shortcut menu. This example requires that you have already created a named `Form1`. + In this example, you use the method to obtain a reference to the shortcut menu that contains `menuItem1` or `menuItem2`, and display the shortcut menu information in a message box. You programmatically create a shortcut menu with two items, `New` and `Open`. You then add functionality to these items by creating the appropriate event handlers. When you run the example, you get a message box that tells you to right-click the form in order to display the shortcut menu. Then, when you click a menu item, you get another message that tells which item has been clicked and displays the information on the containing shortcut menu. This example requires that you have already created a named `Form1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/GetContextMenu2/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Menu/GetContextMenu/form1.cs" id="Snippet1"::: @@ -654,16 +654,16 @@ This class is the base class for the , objects from one menu with the current menu. objects are merged according to the values of the and properties. + This method merges objects from one menu with the current menu. objects are merged according to the values of the and properties. Menu merging is typically done to merge the menus of a Multiple Document Interface (MDI) parent form with those of its active MDI child form. This is performed automatically by the .NET Framework common language runtime. For example, if an MDI parent form contains a set of menus for handling files and your MDI child form also has file-related menu items, the menu sets will automatically merge into a single file menu set when the child form is displayed in the MDI parent form. - You can use the method if you are merging two menu structures that are not part of an MDI application. This implementation can be called by the or classes to merge two or more objects that derive from . + You can use the method if you are merging two menu structures that are not part of an MDI application. This implementation can be called by the or classes to merge two or more objects that derive from . - To merge two objects use the method. + To merge two objects use the method. ## Examples - This example creates two menus, `mainMenu1` and `mainMenu2`. The first menu contains one , `File`, and the second contains one , `Edit`. Using the method, `mainMenu2` is merged with `mainMenu1`. When displayed, `mainMenu1` will contain the two menu items, `File` and `Edit`. This example requires that you have created a named `Form1`. + This example creates two menus, `mainMenu1` and `mainMenu2`. The first menu contains one , `File`, and the second contains one , `Edit`. Using the method, `mainMenu2` is merged with `mainMenu1`. When displayed, `mainMenu1` will contain the two menu items, `File` and `Edit`. This example requires that you have created a named `Form1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MergeMenu/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Menu/MergeMenu/form1.cs" id="Snippet1"::: @@ -824,7 +824,7 @@ This class is the base class for the , method returns a that includes the type and the number of items in the property of the control. + The method returns a that includes the type and the number of items in the property of the control. ]]> diff --git a/xml/System.Windows.Forms/MenuGlyph.xml b/xml/System.Windows.Forms/MenuGlyph.xml index 815c2359ce5..38be3861ca7 100644 --- a/xml/System.Windows.Forms/MenuGlyph.xml +++ b/xml/System.Windows.Forms/MenuGlyph.xml @@ -24,11 +24,11 @@ Specifies the image to draw when drawing a menu with the method. - method of the class. These values represent the different types of symbols that can be drawn on a menu item. - + method of the class. These values represent the different types of symbols that can be drawn on a menu item. + ]]> diff --git a/xml/System.Windows.Forms/MenuItem.xml b/xml/System.Windows.Forms/MenuItem.xml index d0d6793ea19..e4012cb402d 100644 --- a/xml/System.Windows.Forms/MenuItem.xml +++ b/xml/System.Windows.Forms/MenuItem.xml @@ -62,7 +62,7 @@ This class is not available in .NET Core 3.1 and later versions. Use class provides properties that enable you to configure the appearance and functionality of a menu item. To display a check mark next to a menu item, use the property. You can use this feature to identify a menu item that is selected in a list of mutually exclusive menu items. For example, if you have a set of menu items for setting the color of text in a control, you can use the property to identify which color is currently selected. The property can be used to define a keyboard combination that can be pressed to select the menu item. - For objects displayed in a Multiple Document Interface (MDI) application, you can use the method to merge the menus of an MDI parent for with that of its child forms to create a consolidated menu structure. Because a cannot be reused in multiple locations at the same time, such as in a and a , you can use the method to create a copy of a for use in another location. + For objects displayed in a Multiple Document Interface (MDI) application, you can use the method to merge the menus of an MDI parent for with that of its child forms to create a consolidated menu structure. Because a cannot be reused in multiple locations at the same time, such as in a and a , you can use the method to create a copy of a for use in another location. The event enables you to perform tasks before a menu is displayed. For example, you can create an event handler for this event to display or hide menu items based on the state of your code. The event enables you to perform tasks such as providing detailed help for your application's menu items when the user places the mouse pointer over a menu item. @@ -674,7 +674,7 @@ This class is not available in .NET Core 3.1 and later versions. Use allows you to specify a specific to copy instead of the menu item that is calling the method. You can use this method to initialize a new object with a copy of another . When a menu item is cloned, any event handlers specified in the original menu item will continue to function in the cloned version of the menu item. For example, if you created a and connected its event to an event handler. When the menu item is cloned, the cloned menu item will call the same event handler. + Call this method to create copies of menu items that you have already created for use in a shortcut menu or another menu structure within your application. This version of allows you to specify a specific to copy instead of the menu item that is calling the method. You can use this method to initialize a new object with a copy of another . When a menu item is cloned, any event handlers specified in the original menu item will continue to function in the cloned version of the menu item. For example, if you created a and connected its event to an event handler. When the menu item is cloned, the cloned menu item will call the same event handler. ## Examples The following code example initializes a new with a copy of an existing that is used in a on a form. The code then adds the cloned to a on the form. This example requires that a is already created and named `menuItem1` and that a control has been created and named `contextMenu1`. @@ -761,10 +761,10 @@ This class is not available in .NET Core 3.1 and later versions. Use when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. +> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the object's destructor. ]]> @@ -1102,7 +1102,7 @@ This class is not available in .NET Core 3.1 and later versions. Use , the returned is a copy of the current menu item that can be merged with another menu item without affecting the functionality of the current item. This version of the method is similar to calling the method that contains no parameters. + When you call this version of , the returned is a copy of the current menu item that can be merged with another menu item without affecting the functionality of the current item. This version of the method is similar to calling the method that contains no parameters. ]]> @@ -1137,10 +1137,10 @@ This class is not available in .NET Core 3.1 and later versions. Use and properties. This version of the method enables you to merge two objects (and their submenus) into a single menu. Menu merging is handled automatically when a Multiple Document Interface (MDI) parent form and a child both have menus. You can use this version of the method to merge two objects (and their submenu items) located in a control into a single menu within a . For example, you can call this version of the method to merge the menu items of a File and Edit menu into a single that can then be added to and displayed by a . + Menu items are merged according to the value of the menu item's and properties. This version of the method enables you to merge two objects (and their submenus) into a single menu. Menu merging is handled automatically when a Multiple Document Interface (MDI) parent form and a child both have menus. You can use this version of the method to merge two objects (and their submenu items) located in a control into a single menu within a . For example, you can call this version of the method to merge the menu items of a File and Edit menu into a single that can then be added to and displayed by a . ## Examples - The following code example uses this version of the method to create a copy of a and merge it with another. The merged is then added to a control. This example requires that there are two menu items called `menuItem1` and `menuItem2` that contain submenu items within them and a named `contextMenu1` to display the menu items. `menuItem1` and `menuItem2` have different menu items contained within them. After the call to is made, a consolidated menu is created. + The following code example uses this version of the method to create a copy of a and merge it with another. The merged is then added to a control. This example requires that there are two menu items called `menuItem1` and `menuItem2` that contain submenu items within them and a named `contextMenu1` to display the menu items. `menuItem1` and `menuItem2` have different menu items contained within them. After the call to is made, a consolidated menu is created. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MenuItem.MergeMenu1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MenuItem/MergeMenu/source.cs" id="Snippet1"::: @@ -1232,7 +1232,7 @@ This class is not available in .NET Core 3.1 and later versions. Use with the and specified so that the menu item is added to the merged menu at first position. + The following code example creates a with the and specified so that the menu item is added to the merged menu at first position. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MenuItem.MergeType Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MenuItem/MergeType/source.cs" id="Snippet1"::: @@ -1658,7 +1658,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method for that . + You can use this menu to activate a menu item through code without passing any event information. For example, if you want to activate a menu item based on an action that occurs in your application, you can call the method for that . ## Examples In this example you programmatically click a menu item by using the `PerformClick` method. First, you create a main menu (`mainMenu1`) and add to it two menu items, `menuItem1` (`File`) and `menuItem2` (`Edit`). You also use the event to send data to the event handler when a menu item is clicked. Then you use the `PerformClick` method to click the `File` menu item. When you start the application, the `File` menu item is activated, and a message box that contains the text "The File menu is clicked." appears on the screen. The example requires that you have created a named `Form1`. diff --git a/xml/System.Windows.Forms/MenuMerge.xml b/xml/System.Windows.Forms/MenuMerge.xml index 5476b994231..01554479872 100644 --- a/xml/System.Windows.Forms/MenuMerge.xml +++ b/xml/System.Windows.Forms/MenuMerge.xml @@ -41,7 +41,7 @@ ## Examples - The following example uses this version of the method to create a copy of a and merge it with another. The merged is then added to a control. This example assumes that there are two menu items called `menuItem1` and `menuItem2` that contain submenu items within them and a named `contextMenu1` to display the menu items. `menuItem1` and `menuItem2` have different menu items contained within them. After the call to is made, a consolidated menu is created. + The following example uses this version of the method to create a copy of a and merge it with another. The merged is then added to a control. This example assumes that there are two menu items called `menuItem1` and `menuItem2` that contain submenu items within them and a named `contextMenu1` to display the menu items. `menuItem1` and `menuItem2` have different menu items contained within them. After the call to is made, a consolidated menu is created. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MenuItem.MergeMenu1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MenuItem/MergeMenu/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/MenuStrip.xml b/xml/System.Windows.Forms/MenuStrip.xml index 05277a9b002..6a443939a29 100644 --- a/xml/System.Windows.Forms/MenuStrip.xml +++ b/xml/System.Windows.Forms/MenuStrip.xml @@ -99,7 +99,7 @@ The replaces and extends the to which you can add objects. ## Examples - The following code example demonstrates the constructor. This example is part of a larger example provided for the class. + The following code example demonstrates the constructor. This example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet12"::: @@ -186,12 +186,12 @@ The replaces and extends the method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. - For a code example of using , see . + For a code example of using , see . ]]> @@ -236,7 +236,7 @@ The replaces and extends the method to add a with commonly used characteristics to a . + Use the method to add a with commonly used characteristics to a . ]]> @@ -464,7 +464,7 @@ The replaces and extends the property to designate or discover which displays MDI children. - Use the and events on child menus to reflect changes to the value of . + Use the and events on child menus to reflect changes to the value of . ## Examples The following code example demonstrates the property. This example is part of a larger example provided for the class. @@ -511,7 +511,7 @@ The replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MenuStrip1`. Then ensure that the event handler is associated with the event. @@ -557,7 +557,7 @@ The replaces and extends the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MenuStrip1`. Then ensure that the event handler is associated with the event. @@ -603,7 +603,7 @@ The replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -647,7 +647,7 @@ The replaces and extends the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -804,14 +804,14 @@ The replaces and extends the method after getting filtered through the method. + All messages are sent to the method after getting filtered through the method. - The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see [WindowProc callback function](https://msdn.microsoft.com/library/windows/desktop/ms633573). + The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see [WindowProc callback function](https://msdn.microsoft.com/library/windows/desktop/ms633573). ## Examples - The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the windows.h header file included in the Platform SDK (Core SDK section) download, which is also available on Docs. + The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. Refer to the Platform SDK documentation reference located at to understand the available , , and values. Actual constant values can be found in the windows.h header file included in the Platform SDK (Core SDK section) download, which is also available on Docs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/Message.xml b/xml/System.Windows.Forms/Message.xml index 11ff5697a07..cf600996f73 100644 --- a/xml/System.Windows.Forms/Message.xml +++ b/xml/System.Windows.Forms/Message.xml @@ -45,22 +45,22 @@ Implements a Windows message. - structure wraps messages that Windows sends. You can use this structure to wrap a message and assign it to the window procedure to be dispatched. You can also use this structure to get information about a message the system sends to your application or controls. For more information about Windows messages, see [Messages and Message Queues](https://go.microsoft.com/fwlink/?LinkId=198815). - - You cannot create the directly. Instead, use the method. For the sake of efficiency, the uses its pool of existing s instead of instantiating a new one, if possible. However, if a is not available in the pool, a new one is instantiated. - - - -## Examples - The following code example demonstrates overriding the method to handle operating system messages identified in the . The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817). - + structure wraps messages that Windows sends. You can use this structure to wrap a message and assign it to the window procedure to be dispatched. You can also use this structure to get information about a message the system sends to your application or controls. For more information about Windows messages, see [Messages and Message Queues](https://go.microsoft.com/fwlink/?LinkId=198815). + + You cannot create the directly. Instead, use the method. For the sake of efficiency, the uses its pool of existing s instead of instantiating a new one, if possible. However, if a is not available in the pool, a new one is instantiated. + + + +## Examples + The following code example demonstrates overriding the method to handle operating system messages identified in the . The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817). + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/CheckedListBox/WndProc/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/CheckedListBox/WndProc/form1.vb" id="Snippet1"::: + ]]> Messages and Message Queues @@ -109,11 +109,11 @@ Creates a new . A that represents the message that was created. - method to create a to wrap a message sent by Windows. - + method to create a to wrap a message sent by Windows. + ]]> @@ -299,11 +299,11 @@ Gets the value and converts the value to an object. An that represents an instance of the class specified by the parameter, with the data from the field of the message. - method to retrieve information from the field of a message and convert it to an object. You can use this method to access objects passed in a message. - + method to retrieve information from the field of a message and convert it to an object. You can use this method to access objects passed in a message. + ]]> @@ -353,11 +353,11 @@ Gets or sets the window handle of the message. The window handle of the message. - Window Handle @@ -408,11 +408,11 @@ Specifies the field of the message. The field of the message. - field to get information that is important for handling the message. is typically used to store an object if it is needed by the message. Use the method to retrieve and convert information from the field into an object. - + field to get information that is important for handling the message. is typically used to store an object if it is needed by the message. Use the method to retrieve and convert information from the field into an object. + ]]> Messages and Message Queues @@ -465,15 +465,15 @@ Gets or sets the ID number for the message. The ID number for the message. - method to handle operating system messages identified in the . The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817). - + method to handle operating system messages identified in the . The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817). + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/CheckedListBox/WndProc/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/CheckedListBox/WndProc/form1.vb" id="Snippet1"::: + ]]> Messages and Message Queues @@ -518,7 +518,7 @@ if and represent the same ; otherwise, . - ]]> + ]]> @@ -559,7 +559,7 @@ if and do not represent the same ; otherwise, . - ]]> + ]]> @@ -696,20 +696,20 @@ Gets or sets the field of the message. The field of the message. - field to get information that is important to handling the message. This field is typically used to store small pieces of information, such as flags. - - - -## Examples - The following code example demonstrates overriding the method to handle operating system messages identified in the . The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817). - + field to get information that is important to handling the message. This field is typically used to store small pieces of information, such as flags. + + + +## Examples + The following code example demonstrates overriding the method to handle operating system messages identified in the . The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817). + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/CheckedListBox/WndProc/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/CheckedListBox/WndProc/form1.vb" id="Snippet1"::: + ]]> Messages and Message Queues diff --git a/xml/System.Windows.Forms/MessageBox.xml b/xml/System.Windows.Forms/MessageBox.xml index 2cd9aec8814..edb82f9601a 100644 --- a/xml/System.Windows.Forms/MessageBox.xml +++ b/xml/System.Windows.Forms/MessageBox.xml @@ -31,26 +31,26 @@ Displays a message window, also known as a dialog box, which presents a message to the user. It is a modal window, blocking other actions in the application until the user closes it. A can contain text, buttons, and symbols that inform and instruct the user. - class. To display a message box, call the `static` method . The title, message, buttons, and icons displayed in the message box are determined by parameters that you pass to this method. - - - -## Examples - The following code example shows how to use a to inform the user of a missing entry in a . This example requires that the method is called from an existing form with a named **ServerName** on it. - + class. To display a message box, call the `static` method . The title, message, buttons, and icons displayed in the message box are determined by parameters that you pass to this method. + + + +## Examples + The following code example shows how to use a to inform the user of a missing entry in a . This example requires that the method is called from an existing form with a named **ServerName** on it. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet1"::: - - The following code example shows how to ask the user a yes or no question and make a decision based on the response. - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet1"::: + + The following code example shows how to ask the user a yes or no question and make a decision based on the response. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic MessageBox Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Overview/source.vb" id="Snippet1"::: + ]]> @@ -98,19 +98,19 @@ Displays a message box with specified text. One of the values. - @@ -156,11 +156,11 @@ Displays a message box with specified text and caption. One of the values. - @@ -200,13 +200,13 @@ Displays a message box in front of the specified object and with the specified text. One of the values. - interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. - - By default, the message box displays an **OK** button. The message box does not contain a caption in the title. - + interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. + + By default, the message box displays an **OK** button. The message box does not contain a caption in the title. + ]]> @@ -254,20 +254,20 @@ Displays a message box with specified text, caption, and buttons. One of the values. - with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. - + with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet1"::: + ]]> The parameter specified is not a member of . @@ -318,13 +318,13 @@ Displays a message box in front of the specified object and with the specified text and caption. One of the values. - interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. - - By default, the message box displays an **OK** button. - + interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. + + By default, the message box displays an **OK** button. + ]]> @@ -374,26 +374,26 @@ Displays a message box with specified text, caption, buttons, and icon. One of the values. - methods when handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method from the form's constructor or `Load` method. - + methods when handling the event. To run the example, paste the following code in a form and call the `InitializeComboBox` method from the form's constructor or `Load` method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ComboBoxDropDown/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ComboBox+ObjectCollection/AddRange/form1.vb" id="Snippet2"::: + ]]> - The parameter specified is not a member of . - - -or- - + The parameter specified is not a member of . + + -or- + The parameter specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. @@ -445,22 +445,22 @@ Displays a message box in front of the specified object and with the specified text, caption, and buttons. One of the values. - interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. - - You can have a maximum of three buttons on the message box. - - - -## Examples - The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. - + interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. + + You can have a maximum of three buttons on the message box. + + + +## Examples + The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet5"::: + ]]> @@ -516,31 +516,31 @@ Displays a message box with the specified text, caption, buttons, icon, and default button. One of the values. - with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. - + with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet3"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. @@ -595,29 +595,29 @@ Displays a message box in front of the specified object and with the specified text, caption, buttons, and icon. One of the values. - interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. - - You can have a maximum of three buttons on the message box. - - - -## Examples - The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. - + interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. + + You can have a maximum of three buttons on the message box. + + + +## Examples + The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet4"::: + ]]> - is not a member of . - - -or- - + is not a member of . + + -or- + is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. @@ -673,38 +673,38 @@ Displays a message box with the specified text, caption, buttons, icon, default button, and options. One of the values. - with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. The example uses the member of the enumeration to align the text to the right edge of the dialog box. If the method's return value evaluates to , the form that displayed the is closed. - + with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. The example uses the member of the enumeration to align the text to the right edge of the dialog box. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -761,33 +761,33 @@ Displays a message box in front of the specified object and with the specified text, caption, buttons, icon, and default button. One of the values. - interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. - - You can have a maximum of three buttons on the message box. - - - -## Examples - The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. - + interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. + + You can have a maximum of three buttons on the message box. + + + +## Examples + The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. @@ -846,43 +846,43 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button. One of the values. - event. Handle the event to perform custom Help actions. - - - -## Examples - The following code example demonstrates how to show a message box with a Help button, handle the event, and show a custom help window in response to the event. - + event. Handle the event to perform custom Help actions. + + + +## Examples + The following code example demonstrates how to show a message box with a Help button, handle the event, and show a custom help window in response to the event. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet2"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet2"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet2"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -941,45 +941,45 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file. One of the values. - event. - - The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. - - - -## Examples - The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened. The example requires that the `Mspaint.chm` Help file is installed. - + event. + + The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. + + + +## Examples + The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet3"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet3"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet3"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -1038,44 +1038,44 @@ Displays a message box in front of the specified object and with the specified text, caption, buttons, icon, default button, and options. One of the values. - interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. - - You can have a maximum of three buttons on the message box. - - - -## Examples - The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. - + interface, that will serve as the dialog box's top-level window and owner. A message box is a modal dialog box, which means no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (typically in response to some user action) before input to another form can occur. + + You can have a maximum of three buttons on the message box. + + + +## Examples + The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a , offering the user the option to cancel the operation. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - - specified or and specified a value in the parameter. These two options should be used only if you invoke the version of this method that does not take an parameter. - - -or- - + specified both and . + + -or- + + specified or and specified a value in the parameter. These two options should be used only if you invoke the version of this method that does not take an parameter. + + -or- + specified an invalid combination of . @@ -1143,43 +1143,43 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file and Help keyword. One of the values. - event. - - - -## Examples - The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the topic identified by the `mspaint.chm::/paint_brush.htm` keyword is displayed. The example requires that the `Mspaint.chm` Help file is installed. - + event. + + + +## Examples + The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the topic identified by the `mspaint.chm::/paint_brush.htm` keyword is displayed. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet9"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet9"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet9"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet9"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -1240,47 +1240,47 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file and . One of the values. - event. - - Compiled Help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . - - The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. - - - -## Examples - The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab is displayed. The example requires that the `Mspaint.chm` Help file is installed. - + event. + + Compiled Help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . + + The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. + + + +## Examples + The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab is displayed. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet5"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet5"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet5"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -1341,45 +1341,45 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file. One of the values. - interface, that will serve as the dialog box's top-level window and owner. - - When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened. The form that owns the message box (or the active form) also receives the event. - - The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. - - - -## Examples - The following code example demonstrates how to show a message box that parented to the main form. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened. The example requires that the `Mspaint.chm` Help file is installed. - + interface, that will serve as the dialog box's top-level window and owner. + + When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened. The form that owns the message box (or the active form) also receives the event. + + The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. + + + +## Examples + The following code example demonstrates how to show a message box that parented to the main form. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet4"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet4"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet4"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -1442,49 +1442,49 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file, , and Help topic. One of the values. - event. - - Compiled help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . - - You can use `param` to provide further refinement of the command. If the value specified in the `navigator` parameter is , , or , this value should be `null`. If the `navigator` parameter references , this value should reference an object that contains the numeric value of the topic to display. - - The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. - - - -## Examples - The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab and the topic identified by the `ovals` keyword are displayed. The example requires that the `Mspaint.chm` Help file is installed. - + event. + + Compiled help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . + + You can use `param` to provide further refinement of the command. If the value specified in the `navigator` parameter is , , or , this value should be `null`. If the `navigator` parameter references , this value should reference an object that contains the numeric value of the topic to display. + + The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. + + + +## Examples + The following code example demonstrates how to show a message box with a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab and the topic identified by the `ovals` keyword are displayed. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet7"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet7"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet7"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet7"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -1554,43 +1554,43 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file and Help keyword. One of the values. - interface, that will serve as the dialog box's top-level owner. - - When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened and the Help keyword topic identified by the `keyword` parameter is displayed. The form that owns the message box (or the active form) also receives the event. - - - -## Examples - The following code example demonstrates how to show a message box parented to the main window. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the topic identified by the `mspaint.chm::/paint_brush.htm` keyword is displayed. The example requires that the `Mspaint.chm` Help file is installed. - + interface, that will serve as the dialog box's top-level owner. + + When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened and the Help keyword topic identified by the `keyword` parameter is displayed. The form that owns the message box (or the active form) also receives the event. + + + +## Examples + The following code example demonstrates how to show a message box parented to the main window. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the topic identified by the `mspaint.chm::/paint_brush.htm` keyword is displayed. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet10"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet10"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet10"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -1653,47 +1653,47 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file and . One of the values. - interface, that will serve as the dialog box's top-level window and owner. - - When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened and the Help content identified by the `navigator` parameter is displayed. The form that owns the message box (or the active form) also receives the event. - - Compiled Help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . - - The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. - - - -## Examples - The following code example demonstrates how to show a message box parented to the main window. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab is displayed. The example requires that the `Mspaint.chm` Help file is installed. - + interface, that will serve as the dialog box's top-level window and owner. + + When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened and the Help content identified by the `navigator` parameter is displayed. The form that owns the message box (or the active form) also receives the event. + + Compiled Help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . + + The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. + + + +## Examples + The following code example demonstrates how to show a message box parented to the main window. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab is displayed. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet6"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet6"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet6"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . @@ -1758,49 +1758,49 @@ Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file, , and Help topic. One of the values. - interface, that will serve as the dialog box's top-level window and owner. - - When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened and the Help content identified by the `navigator` parameter is displayed. The form that owns the message box (or the active form) also receives the event. - - Compiled help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . - - You can use `param` to provide further refinement of the command. If the value specified in the `navigator` parameter is , , or , this value should be `null`. If the `navigator` parameter references , this value should reference an object that contains the numeric value of the topic to display. - - The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. - - - -## Examples - The following code example demonstrates how to show a message box parented to the main window. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab and the topic identified by the `ovals` keyword are displayed. The example requires that the `Mspaint.chm` Help file is installed. - + interface, that will serve as the dialog box's top-level window and owner. + + When the user clicks the Help button, the Help file specified in the `helpFilePath` parameter is opened and the Help content identified by the `navigator` parameter is displayed. The form that owns the message box (or the active form) also receives the event. + + Compiled help files provide table of contents, index, search, and keyword links in pages. You can use the following values for `navigator`: , , , or . + + You can use `param` to provide further refinement of the command. If the value specified in the `navigator` parameter is , , or , this value should be `null`. If the `navigator` parameter references , this value should reference an object that contains the numeric value of the topic to display. + + The `helpFilePath` parameter can be of the form C:\path\sample.chm or /folder/file.htm. + + + +## Examples + The following code example demonstrates how to show a message box parented to the main window. The message box displays a Help button. When the user clicks the Help button, the `Mspaint.chm` Help file is opened and the Help index tab and the topic identified by the `ovals` keyword are displayed. The example requires that the `Mspaint.chm` Help file is installed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet1"::: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MessageBox with Help/CPP/form1.cpp" id="Snippet8"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MessageBox/Show/form1.cs" id="Snippet8"::: -:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet8"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MessageBox/Show/form1.vb" id="Snippet8"::: + ]]> - is not a member of . - - -or- - - is not a member of . - - -or- - + is not a member of . + + -or- + + is not a member of . + + -or- + The specified is not a member of . An attempt was made to display the in a process that is not running in User Interactive mode. This is specified by the property. - specified both and . - - -or- - + specified both and . + + -or- + specified an invalid combination of . diff --git a/xml/System.Windows.Forms/MessageBoxDefaultButton.xml b/xml/System.Windows.Forms/MessageBoxDefaultButton.xml index ece3a0d8188..b946a10d6ae 100644 --- a/xml/System.Windows.Forms/MessageBoxDefaultButton.xml +++ b/xml/System.Windows.Forms/MessageBoxDefaultButton.xml @@ -24,20 +24,20 @@ Specifies constants defining the default button on a . - class. - - - -## Examples - The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. The example uses the member of the enumeration to align the text to the right edge of the dialog box. If the method's return value evaluates to , the form that displayed the is closed. - + class. + + + +## Examples + The following code example demonstrates how to display a with the options supported by this overload of . After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. The example uses the member of the enumeration to align the text to the right edge of the dialog box. If the method's return value evaluates to , the form that displayed the is closed. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/DialogResult/Overview/form1.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Windows.Forms/MessageBoxOptions.xml b/xml/System.Windows.Forms/MessageBoxOptions.xml index ca0a339af3c..20ff4ad6f4a 100644 --- a/xml/System.Windows.Forms/MessageBoxOptions.xml +++ b/xml/System.Windows.Forms/MessageBoxOptions.xml @@ -40,7 +40,7 @@ If you do not want to specify an argument when calling methods on with the options supported by the overloads of that include an `options` parameter. After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. The example uses the `MessageBoxOptions.RightAlign` enumeration member to align the text to the right edge of the dialog box. If the method's return value evaluates to , the form that displayed the is closed. +The following example demonstrates how to display a with the options supported by the overloads of that include an `options` parameter. After verifying that a string variable, `ServerName`, is empty, the example displays a with a question box icon, offering the user the option to cancel the operation. The example uses the `MessageBoxOptions.RightAlign` enumeration member to align the text to the right edge of the dialog box. If the method's return value evaluates to , the form that displayed the is closed. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MessageBox.Show Variations/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DialogResult/Overview/form1.cs" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/MethodInvoker.xml b/xml/System.Windows.Forms/MethodInvoker.xml index cde8a00a427..c233667cf56 100644 --- a/xml/System.Windows.Forms/MethodInvoker.xml +++ b/xml/System.Windows.Forms/MethodInvoker.xml @@ -28,19 +28,19 @@ Represents a delegate that can execute any method in managed code that is declared void and takes no parameters. - provides a simple delegate that is used to invoke a method with a void parameter list. This delegate can be used when making calls to a control's method, or when you need a simple delegate but do not want to define one yourself. - - - -## Examples - The following code example demonstrates how to use a to call a method that updates the title bar of the application form. - + provides a simple delegate that is used to invoke a method with a void parameter list. This delegate can be used when making calls to a control's method, or when you need a simple delegate but do not want to define one yourself. + + + +## Examples + The following code example demonstrates how to use a to call a method that updates the title bar of the application form. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MethodInvoker/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MethodInvoker/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MethodInvoker/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/MonthCalendar+HitArea.xml b/xml/System.Windows.Forms/MonthCalendar+HitArea.xml index d75f2e15141..f26e02c96ca 100644 --- a/xml/System.Windows.Forms/MonthCalendar+HitArea.xml +++ b/xml/System.Windows.Forms/MonthCalendar+HitArea.xml @@ -24,11 +24,11 @@ Defines constants that represent areas in a control. - control as its enumerated values. The member of is one of these enumerated values, and indicates which portion of a month calendar is under a specified point. - + control as its enumerated values. The member of is one of these enumerated values, and indicates which portion of a month calendar is under a specified point. + ]]> diff --git a/xml/System.Windows.Forms/MonthCalendar+HitTestInfo.xml b/xml/System.Windows.Forms/MonthCalendar+HitTestInfo.xml index 296a28b8f92..818c444d506 100644 --- a/xml/System.Windows.Forms/MonthCalendar+HitTestInfo.xml +++ b/xml/System.Windows.Forms/MonthCalendar+HitTestInfo.xml @@ -28,7 +28,7 @@ objects are returned by controls in response to the method. + objects are returned by controls in response to the method. > [!CAUTION] > is for informational purposes only; you should not construct these objects and cannot modify any of the members. diff --git a/xml/System.Windows.Forms/MonthCalendar.xml b/xml/System.Windows.Forms/MonthCalendar.xml index 7e73994e663..06f7b922252 100644 --- a/xml/System.Windows.Forms/MonthCalendar.xml +++ b/xml/System.Windows.Forms/MonthCalendar.xml @@ -66,14 +66,14 @@ and properties. + The `MonthCalendar` control allows the user to select a date using a visual display. You can limit the date and times that can be selected by setting the and properties. - You can change the look of the calendar portion of the control by setting the , , , , , and properties. + You can change the look of the calendar portion of the control by setting the , , , , , and properties. > [!NOTE] > The `MonthCalendar` control only supports Gregorian calendars. - The `MonthCalendar` control is drawn by the operating system, so the event is never raised. If you need to provide a customized look to the control, you should override the method, call the base implementation of , and then perform custom painting. + The `MonthCalendar` control is drawn by the operating system, so the event is never raised. If you need to provide a customized look to the control, you should override the method, call the base implementation of , and then perform custom painting. If you need custom date formatting and a selection limited to just one date, you might consider using a control instead of a . Using the eliminates much of the need for validating date/time values. @@ -82,7 +82,7 @@ ## Examples - The following code example displays a form containing a `MonthCalendar` control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a `MonthCalendar` control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -124,19 +124,19 @@ constructor creates a new . + The constructor creates a new . The following table shows initial property values for an instance of the class. |Item|Description| |----------|-----------------| -||Today's date.| -||Today's date.| +||Today's date.| +||Today's date.| ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -180,7 +180,7 @@ method afterward to update the display. + You must call the method afterward to update the display. To add multiple dates in a single assignment, you can assign an array of objects to the property. @@ -224,14 +224,14 @@ method afterward to update the display. + You must call the method afterward to update the display. To add multiple dates in a single assignment, you can assign an array of objects to the property. ## Examples - The following code example uses the and methods to mark and display in a bold font dates read from a file. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. + The following code example uses the and methods to mark and display in a bold font dates read from a file. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MonthCalendar/CPP/mc.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/AddBoldedDate/mc.cs" id="Snippet2"::: @@ -277,7 +277,7 @@ method afterward to update the display. + You must call the method afterward to update the display. To add multiple dates in a single assignment, you can assign an array of objects to the property. @@ -329,7 +329,7 @@ ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -374,14 +374,14 @@ ## Remarks The property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. ## Examples - The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. + The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet1"::: @@ -623,7 +623,7 @@ ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -679,7 +679,7 @@ ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -891,13 +891,13 @@ The is only available in applicatio ## Examples - The following code example creates a , sets its and properties, and assigns the to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example requires that you have a with two controls, a , and a control. + The following code example creates a , sets its and properties, and assigns the to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example requires that you have a with two controls, a , and a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/CPP/selectionrangeobj.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/DateChanged/selectionrangeobj.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MonthCalendar/DateChanged/selectionrangeobj.vb" id="Snippet1"::: - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -952,7 +952,7 @@ The is only available in applicatio ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -1279,7 +1279,7 @@ The is only available in applicatio control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -1322,14 +1322,14 @@ The is only available in applicatio property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. ## Examples - The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. + The following code example sets the and of the controls to the default system colors. The code recursively calls itself if the control has any child controls. This code example requires that you have a with at least one child control; however, a child container control, like a or , with its own child control(s) would better demonstrate the recursion. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.Control Properties/CPP/controlproperties.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AnchorStyles/Overview/controlproperties.cs" id="Snippet1"::: @@ -1381,7 +1381,7 @@ The is only available in applicatio method returns a that contains the begin and end dates displayed in the current view of the control. You can modify the returned range based on the value you specify for the `visible` parameter. By specifying `false`, you can retrieve all dates displayed on the control; specifying `true` retrieves only those dates that are part of fully displayed months. + The method returns a that contains the begin and end dates displayed in the current view of the control. You can modify the returned range based on the value you specify for the `visible` parameter. By specifying `false`, you can retrieve all dates displayed on the control; specifying `true` retrieves only those dates that are part of fully displayed months. ]]> @@ -1629,7 +1629,7 @@ The is only available in applicatio control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -1684,12 +1684,12 @@ The is only available in applicatio ## Remarks Setting this property does not effect the current selection range. - It is important to remember that the property represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), and can be no more than six days apart. + It is important to remember that the property represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), and can be no more than six days apart. ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -1735,7 +1735,7 @@ The is only available in applicatio control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -1792,7 +1792,7 @@ The is only available in applicatio ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -1958,7 +1958,7 @@ The is only available in applicatio ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2004,7 +2004,7 @@ The is only available in applicatio ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2048,11 +2048,11 @@ The is only available in applicatio method resizes the control based on the new font size. This can cause the calendar to overlap other controls on the form if the potential sizing issues have not been taken into account. + The method resizes the control based on the new font size. This can cause the calendar to overlap other controls on the form if the potential sizing issues have not been taken into account. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2195,7 +2195,7 @@ The is only available in applicatio ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2275,7 +2275,7 @@ The is only available in applicatio ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2432,7 +2432,7 @@ The is only available in applicatio control sets the bit flag to `false`, so the will not raise the event. To provide a custom look to the control, you should override the method, call the base implementation of , and then perform custom painting. + The control sets the bit flag to `false`, so the will not raise the event. To provide a custom look to the control, you should override the method, call the base implementation of , and then perform custom painting. ]]> @@ -2469,9 +2469,9 @@ The is only available in applicatio array. To remove a single date from the bold dates, use the method. + This method clears all dates from the array. To remove a single date from the bold dates, use the method. - You must call the method to ensure that the display is updated to reflect the removal. + You must call the method to ensure that the display is updated to reflect the removal. ]]> @@ -2508,14 +2508,14 @@ The is only available in applicatio array. To remove a single date from the bold dates, use the method. + This method clears the array. To remove a single date from the bold dates, use the method. - You must call the method to ensure that the display is updated to reflect the removal. + You must call the method to ensure that the display is updated to reflect the removal. ## Examples - The following code example demonstrates how to use the method. + The following code example demonstrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MonthCalendar/CPP/mc.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/AddBoldedDate/mc.cs" id="Snippet4"::: @@ -2556,9 +2556,9 @@ The is only available in applicatio array. To remove a single date from the bold dates, use the method. + This method clears the array. To remove a single date from the bold dates, use the method. - You must call the method to ensure that the display is updated to reflect the removal. + You must call the method to ensure that the display is updated to reflect the removal. ]]> @@ -2598,7 +2598,7 @@ The is only available in applicatio method to ensure that the display is updated to reflect the removal. + If the specified date occurs more than once in the date list, only the first date is removed. When comparing dates, only the day and month are used. You must call the method to ensure that the display is updated to reflect the removal. ]]> @@ -2639,12 +2639,12 @@ The is only available in applicatio method to ensure that the display is updated to reflect the removal. + If the specified date occurs more than once in the date list, only the first date is removed. You must call the method to ensure that the display is updated to reflect the removal. ## Examples - The following code example uses the method to remove a specified date from the list of bold dates. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. + The following code example uses the method to remove a specified date from the list of bold dates. This example requires that a control, named `monthCalendar1`, has been added to a and that this method is placed within the form and called from it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/MonthCalendar/CPP/mc.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/AddBoldedDate/mc.cs" id="Snippet3"::: @@ -2689,7 +2689,7 @@ The is only available in applicatio to ensure that the display is updated to reflect the removal. + If the specified date occurs more than once in the date list, only the first date is removed. When comparing dates, only the day and month are used. You must call to ensure that the display is updated to reflect the removal. ]]> @@ -2774,7 +2774,7 @@ The is only available in applicatio property is useful for international applications where the language is written from right to left. When the and properties are both `true`, + The property is useful for international applications where the language is written from right to left. When the and properties are both `true`, Mirroring will be turned on for the form, and control placement and text will be from right to left. @@ -2823,7 +2823,7 @@ The is only available in applicatio ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MonthCalendar1`. Then ensure that the event handler is associated with the event. @@ -2880,7 +2880,7 @@ The is only available in applicatio ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -2940,20 +2940,20 @@ The is only available in applicatio property to a date that is earlier than the current value of the property, is automatically set equal to . + If you set the value of the property to a date that is earlier than the current value of the property, is automatically set equal to . - If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . + If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . > [!NOTE] -> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. +> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. ## Examples - The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/SelectionEnd/form1.cs" id="Snippet1"::: @@ -3008,7 +3008,7 @@ The is only available in applicatio method. You can set the start and end dates separately by setting either the or properties. You cannot change the start and end dates by setting the or property values of the property. You should use , , or . + Setting this property is functionally equivalent to using the method. You can set the start and end dates separately by setting either the or properties. You cannot change the start and end dates by setting the or property values of the property. You should use , , or . If the property value of the is greater than its property value, the dates are swapped; the property value becomes the starting date, and property value becomes the end date. @@ -3016,7 +3016,7 @@ The is only available in applicatio > Scrolling through the calendar display with the navigation buttons when a range is selected can cause unexpected results (for example, the date range is not preserved). If you have a single month displayed with a range of 04/01/2001 to 04/10/2001, scrolling the calendar to March changes the selected range as follows: 03/01/2001 to 03/10/2001. If you have multiple months displayed, such as March and April with a selected range of 04/01/2001 to 04/10/2001, scrolling the calendar back to January and February changes the selected range as follows: 01/01/2001 to 01/10/2001. > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. ]]> @@ -3084,20 +3084,20 @@ The is only available in applicatio property to a date that is later than the current value of the property, is automatically set equal to . + If you set the value of the property to a date that is later than the current value of the property, is automatically set equal to . - If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . + If you set a date in that causes the selection to exceed the number of days specified by the property, the value of is adjusted; is automatically set so that the number of days selected is equal to . > [!NOTE] -> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. +> represents the number of days in the selection, not the difference between and . For example, if is 7 (the default), then and can be no more than six days apart. > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. ## Examples - The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/SelectionEnd/form1.cs" id="Snippet1"::: @@ -3235,7 +3235,7 @@ The is only available in applicatio and the properties to the specified date. This method is the functional equivalent of setting the selection range to a single day through the method or the property. + This method sets the and the properties to the specified date. This method is the functional equivalent of setting the selection range to a single day through the method or the property. ]]> @@ -3284,7 +3284,7 @@ The is only available in applicatio property. You can set the start and end dates separately by setting either the or property. + Using this method is functionally equivalent to setting the property. You can set the start and end dates separately by setting either the or property. If you set the `date1` parameter greater than the `date2` parameter, both dates are set to the `date1` value. @@ -3292,7 +3292,7 @@ The is only available in applicatio > Scrolling through the calendar display with the navigation buttons when a range is selected can cause unexpected results (for example, the date range is not preserved). If you have a single month displayed with a range of 04/01/2001 to 04/10/2001, scrolling the calendar back changes the selected range as follows: 03/01/2001 to 03/10/2001. If you have multiple months displayed, such as March and April with a selected range of 04/01/2001 to 04/10/2001, scrolling the calendar back to January and February changes the selected range as follows: 01/01/2001 to 01/10/2001. > [!NOTE] -> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. +> Setting the for a control that has visual styles enabled will result in the selection range not painting correctly on the control. ]]> @@ -3364,7 +3364,7 @@ The is only available in applicatio ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -3417,12 +3417,12 @@ The is only available in applicatio is `true`, and visual styles are enabled and supported on the computer running the application, today's date will be enclosed in a square, otherwise today's date will be circled. + If is `true`, and visual styles are enabled and supported on the computer running the application, today's date will be enclosed in a square, otherwise today's date will be circled. ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -3479,7 +3479,7 @@ The is only available in applicatio control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -3530,7 +3530,7 @@ The is only available in applicatio and members, representing the minimum width and height required to display one month in the control. The minimum required window size for a month calendar control depends on the currently selected font. + The size information is presented in the form of the and members, representing the minimum width and height required to display one month in the control. The minimum required window size for a month calendar control depends on the currently selected font. ]]> @@ -3715,14 +3715,14 @@ The is only available in applicatio property. Setting the equal to the for the main display area of the calendar causes the days-of-the-week text to become unreadable. + The font color of the days-of-the-week text depends on the property. Setting the equal to the for the main display area of the calendar causes the days-of-the-week text to become unreadable. Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the **Enable XP visual styles** check box. To disable visual styles in C#, open Program.cs and comment out `Application.EnableVisualStyles();`. ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -3775,7 +3775,7 @@ The is only available in applicatio ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -3822,7 +3822,7 @@ The is only available in applicatio ## Examples - The following code example demonstrates how to use the , and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the , and properties. To run the example, paste the following code into a form containing a control named `MonthCalendar1`, and call the `ShowAWeeksVacationOneMonthFromToday` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendarSelection/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/SelectionEnd/form1.cs" id="Snippet1"::: @@ -3917,7 +3917,7 @@ The is only available in applicatio method of the property. + The string includes the type and the string returned by the method of the property. ]]> @@ -3967,7 +3967,7 @@ The is only available in applicatio ## Examples - The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. + The following code example displays a form containing a control that displays one calendar year. The example demonstrates setting the , , , , , and properties to customize the look of the calendar control. Other properties such as , , and are set to customize which dates are bold. The example also sets the , , , and properties to change the calendar format. The and events are also handled and their status is displayed on the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MonthCalendar/CPP/monthcalendar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/DateRangeEventArgs/Overview/monthcalendar.cs" id="Snippet1"::: @@ -4009,7 +4009,7 @@ The is only available in applicatio method to reflect changes made to , , or properties, either directly by modifying elements of the array or by using the add or remove methods provided to modify the date lists. + Use the method to reflect changes made to , , or properties, either directly by modifying elements of the array or by using the add or remove methods provided to modify the date lists. ]]> diff --git a/xml/System.Windows.Forms/MouseButtons.xml b/xml/System.Windows.Forms/MouseButtons.xml index ecb52a6f47f..2f93c16dd3e 100644 --- a/xml/System.Windows.Forms/MouseButtons.xml +++ b/xml/System.Windows.Forms/MouseButtons.xml @@ -34,26 +34,26 @@ Specifies constants that define which mouse button was pressed. - , , , , , , , and . - - - -## Examples - The following example demonstrates how to use the method to obtain a character from the contents of a given its control coordinates. The example code uses coordinates located in the object passed as a parameter to the event handler to determine the location in the control to obtain the character. The character is then displayed in a if it is not a space character. This example assumes that a control named `richTextBox1` has been created and that the example code is connected to the event of the . - + , , , , , , , and . + + + +## Examples + The following example demonstrates how to use the method to obtain a character from the contents of a given its control coordinates. The example code uses coordinates located in the object passed as a parameter to the event handler to determine the location in the control to obtain the character. The character is then displayed in a if it is not a space character. This example assumes that a control named `richTextBox1` has been created and that the example code is connected to the event of the . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.GetCharAtIndex/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MouseButtons/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MouseButtons/Overview/form1.vb" id="Snippet1"::: - - The following example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MouseButtons/Overview/form1.vb" id="Snippet1"::: + + The following example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/MouseDown/mouseeventexample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/MouseDown/mouseeventexample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/MouseEventArgs.xml b/xml/System.Windows.Forms/MouseEventArgs.xml index 0cb3480cf17..3017a1ea420 100644 --- a/xml/System.Windows.Forms/MouseEventArgs.xml +++ b/xml/System.Windows.Forms/MouseEventArgs.xml @@ -55,7 +55,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MouseEventArgs/Overview/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MouseEventArgs/Overview/Form1.vb" id="Snippet2"::: - The following code example uses the and properties to display the current position of the mouse pointer in a window. + The following code example uses the and properties to display the current position of the mouse pointer in a window. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MouseEventArgs/Overview/Form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MouseEventArgs/Overview/Form1.vb" id="Snippet3"::: @@ -211,7 +211,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -268,7 +268,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -367,7 +367,7 @@ ## Examples - The following code example uses the and properties to display the current position of the mouse pointer in a window. + The following code example uses the and properties to display the current position of the mouse pointer in a window. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MouseEventArgs/Overview/Form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MouseEventArgs/Overview/Form1.vb" id="Snippet3"::: @@ -421,7 +421,7 @@ ## Examples - The following code example uses the and properties to display the current position of the mouse pointer in a window. To use this code, call `TrackCoordinates` from the form constructor. + The following code example uses the and properties to display the current position of the mouse pointer in a window. To use this code, call `TrackCoordinates` from the form constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MouseEventArgs/Overview/Form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/MouseEventArgs/Overview/Form1.vb" id="Snippet3"::: diff --git a/xml/System.Windows.Forms/MouseEventHandler.xml b/xml/System.Windows.Forms/MouseEventHandler.xml index 73dea6ad2ef..db0749c43cd 100644 --- a/xml/System.Windows.Forms/MouseEventHandler.xml +++ b/xml/System.Windows.Forms/MouseEventHandler.xml @@ -41,20 +41,20 @@ A that contains the event data. Represents the method that will handle the , , or event of a form, control, or other component. - 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. - + 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates using different mouse events to draw the path of the mouse on a . A line segment is added to the for each and events that occur. To update the graphics, the method is called for the on each `MouseDown` and `MouseUp` event. In addition, the graphic path is scrolled up or down when the event occurs. Additional mouse events, like , are identified on screen as well. Also displayed on the screen is additional information about the mouse from the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.MouseEvent/CPP/mouseeventexample.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/MouseDown/mouseeventexample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/MouseDown/mouseeventexample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/MouseDown/mouseeventexample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/NativeWindow.xml b/xml/System.Windows.Forms/NativeWindow.xml index 690a49d5e6f..a1f280da4cf 100644 --- a/xml/System.Windows.Forms/NativeWindow.xml +++ b/xml/System.Windows.Forms/NativeWindow.xml @@ -45,21 +45,21 @@ ## Remarks This class automatically manages window class creation and registration. - A window is not eligible for garbage collection when it is associated with a window handle. To ensure proper garbage collection, handles must either be destroyed manually using or released using . + A window is not eligible for garbage collection when it is associated with a window handle. To ensure proper garbage collection, handles must either be destroyed manually using or released using . > [!NOTE] -> The method is called when the WM_NCDESTROY message is processed. This means there are cases in which when you do not need to manually call , but it is good practice to do so. +> The method is called when the WM_NCDESTROY message is processed. This means there are cases in which when you do not need to manually call , but it is good practice to do so. - The class provides the following properties and methods to manage handles: , , , , and . + The class provides the following properties and methods to manage handles: , , , , and . ## Examples The following code example demonstrates intercepting operating system window messages in a window procedure, and creating a window with a specific operating system window class name. The example creates two classes that inherit from that accomplish this. - The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercept the `WM_ACTIVATEAPP` window message. The class demonstrates the usage of the and methods to identify the window handle the will use. The handle is assign based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. + The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercept the `WM_ACTIVATEAPP` window message. The class demonstrates the usage of the and methods to identify the window handle the will use. The handle is assign based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. - The `MyNativeWindow` class creates a new window with the set to `BUTTON`. The class demonstrates using the method and overriding the method to intercept window messages that are received. + The `MyNativeWindow` class creates a new window with the set to `BUTTON`. The class demonstrates using the method and overriding the method to intercept window messages that are received. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/NativeWindow/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NativeWindow/Overview/form1.cs" id="Snippet1"::: @@ -103,7 +103,7 @@ constructor provided by the compiler. The class also has a static constructor that initializes application domain-wide message handlers and hash tables. + This is the default constructor provided by the compiler. The class also has a static constructor that initializes application domain-wide message handlers and hash tables. ]]> @@ -151,9 +151,9 @@ intercepts window messages sent to the `handle` parameter. Use to reset the handle's window procedure to the default window procedure. + intercepts window messages sent to the `handle` parameter. Use to reset the handle's window procedure to the default window procedure. - The method calls the method to indicate that the value of the property has changed. + The method calls the method to indicate that the value of the property has changed. > [!NOTE] > The handle to assign cannot be in a different application process. @@ -163,7 +163,7 @@ ## Examples The following code example demonstrates intercepting operating system window messages in a window procedure. The example creates a class that inherits from to accomplish this. - The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercepts the `WM_ACTIVATEAPP` window message. The class demonstrates the use of the and methods to identify which window handle the will use. The handle is assigned based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. + The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercepts the `WM_ACTIVATEAPP` window message. The class demonstrates the use of the and methods to identify which window handle the will use. The handle is assigned based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. @@ -219,7 +219,7 @@ ## Remarks The `cp` parameter specifies the values that are passed to the native Win32 `CreateWindowEx` method to create a window and its handle. - When the field is not `null`, the newly created window handle inherits from the specified class. For example, if is set to `BUTTON`, the newly created window is based on the Win32 `BUTTON` window class. The property of the object must either be `null` or reference an instance of a class that was declared as a structure. + When the field is not `null`, the newly created window handle inherits from the specified class. For example, if is set to `BUTTON`, the newly created window is based on the Win32 `BUTTON` window class. The property of the object must either be `null` or reference an instance of a class that was declared as a structure. This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. @@ -231,7 +231,7 @@ ## Examples The following code example demonstrates creating a window with a specific operating system window class name. The example creates a class that inherits from to accomplish this. - The `MyNativeWindow` class creates a new window with the set to `BUTTON`. This creates a Win32 button window. The location and size of the button is set, along with specifying additional window styles. The class demonstrates how to use the method and override the method to intercept window messages that are received. Although the example looks for the WM_ACTIVATEAPP message, this can be replaced in a real program with window messages specific to the type created. + The `MyNativeWindow` class creates a new window with the set to `BUTTON`. This creates a Win32 button window. The location and size of the button is set, along with specifying additional window styles. The class demonstrates how to use the method and override the method to intercept window messages that are received. Although the example looks for the WM_ACTIVATEAPP message, this can be replaced in a real program with window messages specific to the type created. > [!NOTE] > Some control types send their window messages to the window parent instead of the window. See the Windows Platform SDK for more information. @@ -287,9 +287,9 @@ method when you are intercepting window messages and would like the default window procedure to handle the message. should not be called to send a window message to the window; call the Win32 `SendMessage` function instead. + Typically, you only call the method when you are intercepting window messages and would like the default window procedure to handle the message. should not be called to send a window message to the window; call the Win32 `SendMessage` function instead. - It is an error to call when the property is 0. + It is an error to call when the property is 0. ]]> @@ -334,7 +334,7 @@ , sets the property to 0, and calls the method to reflect the change. Typically, you only call when you are done with the native window. + This method destroys the window associated with the , sets the property to 0, and calls the method to reflect the change. Typically, you only call when you are done with the native window. > [!NOTE] > The class automatically will destroy the associated window and release its resources in response to a WM_DESTROY message. @@ -380,7 +380,7 @@ method removes the Win32 derived class associated with the current instance, releases the handle, and posts a WM_CLOSE message to the associated window. + The method removes the Win32 derived class associated with the current instance, releases the handle, and posts a WM_CLOSE message to the associated window. ]]> @@ -481,9 +481,9 @@ ## Examples - The following code example demonstrates creating a window with a specific operating system window class name. The example creates a class that inherits from to accomplish this. The example also demonstrates overriding the method to be notified when the changes. + The following code example demonstrates creating a window with a specific operating system window class name. The example creates a class that inherits from to accomplish this. The example also demonstrates overriding the method to be notified when the changes. - The `MyNativeWindow` class creates a new window with the set to BUTTON. This creates a Win32 button window. The location and size of the button is set, along with specifying additional window styles. The class demonstrates how to use the method and override the method to intercept window messages that are received. Although the example looks for the WM_ACTIVATEAPP message, this could be replaced in a real program with window messages specific to the type created. + The `MyNativeWindow` class creates a new window with the set to BUTTON. This creates a Win32 button window. The location and size of the button is set, along with specifying additional window styles. The class demonstrates how to use the method and override the method to intercept window messages that are received. Although the example looks for the WM_ACTIVATEAPP message, this could be replaced in a real program with window messages specific to the type created. > [!NOTE] > Some control types send their window messages to the window parent instead of the window. See the Windows Platform SDK for more information. @@ -537,9 +537,9 @@ ## Examples - The following code example demonstrates creating a window with a specific operating system window class name. The example creates a class that inherits from to accomplish this. The example also demonstrates overriding the method to be notified when the changes. + The following code example demonstrates creating a window with a specific operating system window class name. The example creates a class that inherits from to accomplish this. The example also demonstrates overriding the method to be notified when the changes. - The `MyNativeWindow` class creates a new window with the set to `BUTTON`. This creates a Win32 button window. The location and size of the button is set, along with specifying additional window styles. The class demonstrates how to use the method and override the method to intercept window messages that are received. Although the example looks for the WM_ACTIVATEAPP message, this can be replaced in a real program with window messages specific to the type created. + The `MyNativeWindow` class creates a new window with the set to `BUTTON`. This creates a Win32 button window. The location and size of the button is set, along with specifying additional window styles. The class demonstrates how to use the method and override the method to intercept window messages that are received. Although the example looks for the WM_ACTIVATEAPP message, this can be replaced in a real program with window messages specific to the type created. This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. @@ -597,7 +597,7 @@ handles thread exceptions. + Typically, handles thread exceptions. ]]> @@ -647,7 +647,7 @@ property to 0 and calls to reflect the change. + This method does not destroy the window handle. Instead, it sets the handle's window procedure to the default window procedure. It sets the property to 0 and calls to reflect the change. A window automatically calls this method if it receives a native Win32 WM_NCDESTROY message, indicating that Windows has destroyed the handle. @@ -656,7 +656,7 @@ ## Examples The following code example demonstrates intercepting operating system window messages in a window procedure. The example creates a class that inherits from to accomplish this. - The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercepts the `WM_ACTIVATEAPP` window message. The class demonstrates the use of the and methods to identify the window handle the will use. The handle is assign based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. + The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercepts the `WM_ACTIVATEAPP` window message. The class demonstrates the use of the and methods to identify the window handle the will use. The handle is assign based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. @@ -776,7 +776,7 @@ ## Examples The following code example demonstrates intercepting operating system window messages in a window procedure. The example creates a class that inherits from to accomplish this. - The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercept the `WM_ACTIVATEAPP` window message. The class demonstrates the use of the and methods to identify the window handle the will use. The handle is assigned based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. + The `MyNativeWindowListener` class hooks into the window procedure of the form passed into the constructor, and overrides the method to intercept the `WM_ACTIVATEAPP` window message. The class demonstrates the use of the and methods to identify the window handle the will use. The handle is assigned based upon the and events. When the `WM_ACTIVATEAPP` window message is received, the class calls the `form1.ApplicationActivated` method. This code is an excerpt from the example shown in the class overview. Some code is not shown for the purpose of brevity. See for the whole code listing. diff --git a/xml/System.Windows.Forms/NavigateEventArgs.xml b/xml/System.Windows.Forms/NavigateEventArgs.xml index 29cbfc8fc85..f3eac70155a 100644 --- a/xml/System.Windows.Forms/NavigateEventArgs.xml +++ b/xml/System.Windows.Forms/NavigateEventArgs.xml @@ -39,7 +39,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGrid1`. Then ensure that the event handler is associated with the event. @@ -129,7 +129,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGrid1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/NotifyIcon.xml b/xml/System.Windows.Forms/NotifyIcon.xml index 3d2d5a1033a..43f02ea6882 100644 --- a/xml/System.Windows.Forms/NotifyIcon.xml +++ b/xml/System.Windows.Forms/NotifyIcon.xml @@ -67,7 +67,7 @@ ## Examples - The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. + The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.NotifyIcon/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/Overview/source.cs" id="Snippet1"::: @@ -155,7 +155,7 @@ ## Examples - The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. + The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.NotifyIcon/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/Overview/source.cs" id="Snippet1"::: @@ -200,7 +200,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NotifyIcon1`. Then ensure that the event handler is associated with the event. @@ -295,7 +295,7 @@ , , and properties. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and properties. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.vb" id="Snippet2"::: @@ -340,7 +340,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NotifyIcon1`. Then ensure that the event handler is associated with the event. @@ -407,7 +407,7 @@ , , and properties. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and properties. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.vb" id="Snippet2"::: @@ -469,7 +469,7 @@ ## Examples - The following code example demonstrates how to use the , , and properties. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and properties. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.vb" id="Snippet2"::: @@ -578,7 +578,7 @@ ## Examples - The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. + The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.NotifyIcon/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/Overview/source.cs" id="Snippet1"::: @@ -709,7 +709,7 @@ ## Examples - The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. + The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.NotifyIcon/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/Overview/source.cs" id="Snippet1"::: @@ -766,7 +766,7 @@ class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. + The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.NotifyIcon/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/Overview/source.cs" id="Snippet1"::: @@ -812,7 +812,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NotifyIcon1`. Then ensure that the event handler is associated with the event. @@ -858,7 +858,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NotifyIcon1`. Then ensure that the event handler is associated with the event. @@ -905,7 +905,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NotifyIcon1`. Then ensure that the event handler is associated with the event. @@ -954,7 +954,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NotifyIcon1`. Then ensure that the event handler is associated with the event. @@ -1003,7 +1003,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NotifyIcon1`. Then ensure that the event handler is associated with the event. @@ -1060,12 +1060,12 @@ ## Remarks Minimum and maximum timeout values are enforced by the operating system and are typically 10 and 30 seconds, respectively, however this can vary depending on the operating system. Timeout values that are too large or too small are adjusted to the appropriate minimum or maximum value. In addition, if the user does not appear to be using the computer (no keyboard or mouse events are occurring) then the system does not count this time towards the timeout. - Only one balloon tip can display on the taskbar at a time. Attempting to display a balloon tip when one is currently displayed on the taskbar causes the `timeout` value to be ignored. The behavior is slightly different depending on the operating system and whether the balloon tip is from another, or the same, application. When the second balloon tip is from another application, the first balloon tip will display for the minimum timeout value before the second appears, regardless of the value of `timeout`. In most cases, if the balloon tips are from the same application, the first balloon tip immediately closes when another call to the method is made. In some cases the second balloon will open on top of the first balloon. + Only one balloon tip can display on the taskbar at a time. Attempting to display a balloon tip when one is currently displayed on the taskbar causes the `timeout` value to be ignored. The behavior is slightly different depending on the operating system and whether the balloon tip is from another, or the same, application. When the second balloon tip is from another application, the first balloon tip will display for the minimum timeout value before the second appears, regardless of the value of `timeout`. In most cases, if the balloon tips are from the same application, the first balloon tip immediately closes when another call to the method is made. In some cases the second balloon will open on top of the first balloon. The title text will display in a bold font near the top of the balloon. ## Examples - The following code example demonstrates how to use the method. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. + The following code example demonstrates how to use the method. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Call `SetBalloonTip` from the form's constructor or event-handling method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.vb" id="Snippet2"::: @@ -1117,12 +1117,12 @@ ## Remarks Minimum and maximum timeout values are enforced by the operating system and are typically 10 and 30 seconds, respectively, however this can vary depending on the operating system. Timeout values that are too large or too small are adjusted to the appropriate minimum or maximum value. In addition, if the user does not appear to be using the computer (no keyboard or mouse events are occurring) then the system does not count this time towards the timeout. - Only one balloon tip can display on the taskbar at a time. Attempting to display a balloon tip when one is currently displayed on the taskbar causes the `timeout` value to be ignored. The behavior is slightly different depending on the operating system and whether the balloon tip is from another, or the same, application. When the second balloon tip is from another application, the first balloon tip will display for the minimum timeout value before the second appears, regardless of the value of `timeout`. In most cases, if the balloon tips are from the same application, the first balloon tip immediately closes when another call to the method is made. In some cases the second balloon will open on top of the first balloon. + Only one balloon tip can display on the taskbar at a time. Attempting to display a balloon tip when one is currently displayed on the taskbar causes the `timeout` value to be ignored. The behavior is slightly different depending on the operating system and whether the balloon tip is from another, or the same, application. When the second balloon tip is from another application, the first balloon tip will display for the minimum timeout value before the second appears, regardless of the value of `timeout`. In most cases, if the balloon tips are from the same application, the first balloon tip immediately closes when another call to the method is made. In some cases the second balloon will open on top of the first balloon. The title text will display in a bold font near the top of the balloon. ## Examples - The following code example demonstrates how to use the method. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Associate the `Form1_DoubleClick` method in this example with the form's event. + The following code example demonstrates how to use the method. To run this example, paste the example code into a Windows Form that contains a named `notifyIcon1`. Associate the `Form1_DoubleClick` method in this example with the form's event. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/NotifyIcon/BalloonTipClosed/Form1.vb" id="Snippet1"::: @@ -1255,7 +1255,7 @@ ## Examples - The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. + The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.NotifyIcon/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/Overview/source.cs" id="Snippet1"::: @@ -1319,7 +1319,7 @@ ## Examples - The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. + The following code example demonstrates using the class to display an icon for an application in the notification area. The example demonstrates setting the , , , and properties and handling the event. A with an **Exit** item on it is assigned to the property, which allows the user to close the application. When the event occurs, the application form is activated by calling the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.NotifyIcon/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NotifyIcon/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/NumericUpDown.xml b/xml/System.Windows.Forms/NumericUpDown.xml index 89d46d561ae..d821840e4c4 100644 --- a/xml/System.Windows.Forms/NumericUpDown.xml +++ b/xml/System.Windows.Forms/NumericUpDown.xml @@ -60,11 +60,11 @@ ## Remarks A control contains a single numeric value that can be incremented or decremented by clicking the up or down buttons of the control. The user can also enter in a value, unless the property is set to `true`. - The numeric display can be formatted by setting the , , or properties. To display hexadecimal values in the control, set the property to `true`. To display a thousands separator in decimal numbers when appropriate, set the property to `true`. To specify the number of digits displayed after the decimal symbol, set the property to the number of decimal places to display. + The numeric display can be formatted by setting the , , or properties. To display hexadecimal values in the control, set the property to `true`. To display a thousands separator in decimal numbers when appropriate, set the property to `true`. To specify the number of digits displayed after the decimal symbol, set the property to the number of decimal places to display. - To specify the allowable range of values for the control, set the and properties. Set the value to specify the value to be incremented or decremented to the property when the user clicks the up or down arrow buttons. You can increase the speed that the control moves through numbers when the user continuously presses the up or down arrow by setting the property. + To specify the allowable range of values for the control, set the and properties. Set the value to specify the value to be incremented or decremented to the property when the user clicks the up or down arrow buttons. You can increase the speed that the control moves through numbers when the user continuously presses the up or down arrow by setting the property. - When the or methods are called, either in code or by the click of the up or down buttons, the new value is validated and the control is updated with the new value in the appropriate format. Specifically, if the property is set to `true`, the method is called prior to validating or updating the value. The value is then verified to be between the and values, and the method is called. + When the or methods are called, either in code or by the click of the up or down buttons, the new value is validated and the control is updated with the new value in the appropriate format. Specifically, if the property is set to `true`, the method is called prior to validating or updating the value. The value is then verified to be between the and values, and the method is called. Starting with the .NET Framework 4.6, the control will be resized based on the system DPI setting when the app.config file contains the following entry: @@ -78,7 +78,7 @@ ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -118,7 +118,7 @@ control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -169,7 +169,7 @@ property can be used to increase the speed with which the moves through a large set of numbers when the user holds the up or down arrow, either with the keyboard or with the mouse. Setting this property will decrease the number of events that occur depending on the and property values specified for each object in the collection. The objects contained in the collection are sorted by their property. + The property can be used to increase the speed with which the moves through a large set of numbers when the user holds the up or down arrow, either with the keyboard or with the mouse. Setting this property will decrease the number of events that occur depending on the and property values specified for each object in the collection. The objects contained in the collection are sorted by their property. @@ -285,14 +285,14 @@ property is set, the method is called to update the spin box's display to the new format. + When the property is set, the method is called to update the spin box's display to the new format. The appropriate decimal symbol is determined by the regional settings of the user's operating system. ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -341,7 +341,7 @@ method is called, either in code or by the click of the down button, the new value is validated and the control is updated with the new value in the appropriate format. Specifically, if the property is set to `true`, the method is called prior to validating or updating the value. The value is then validated to be between the and values, and the method is called. + When the method is called, either in code or by the click of the down button, the new value is validated and the control is updated with the new value in the appropriate format. Specifically, if the property is set to `true`, the method is called prior to validating or updating the value. The value is then validated to be between the and values, and the method is called. ]]> @@ -427,14 +427,14 @@ property is set, the method is called to update the spin box's display to the new format. + When the property is set, the method is called to update the spin box's display to the new format. When the property is set to `true`, the property should be set to and the property should be set to . ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -483,7 +483,7 @@ ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -537,12 +537,12 @@ property is set, the property is evaluated and the method is called. If the property is greater than the new property, the property value is set equal to the value. If the current is greater than the new value. the property value is set equal to the value. + When the property is set, the property is evaluated and the method is called. If the property is greater than the new property, the property value is set equal to the value. If the current is greater than the new value. the property value is set equal to the value. ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -596,12 +596,12 @@ property is set, the property is evaluated and the method is called. If the new property value is greater than the property value, the value is set equal to the value. If the is less than the new value, the property is also set equal to the value. + When the property is set, the property is evaluated and the method is called. If the new property value is greater than the property value, the value is set equal to the value. If the is less than the new value, the property is also set equal to the value. ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -649,7 +649,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -693,7 +693,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -737,7 +737,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -832,7 +832,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -975,7 +975,7 @@ property is set to `true`, the text displayed is converted to a numeric value so it can be validated to be between the and property values. + If the property is set to `true`, the text displayed is converted to a numeric value so it can be validated to be between the and property values. ]]> @@ -1034,7 +1034,7 @@ has no effect on the appearance of the control; therefore, it is hidden in the designer and from IntelliSense. + The has no effect on the appearance of the control; therefore, it is hidden in the designer and from IntelliSense. ]]> @@ -1130,14 +1130,14 @@ property is set, the method is called to update the spin box's display to the new format. + When the property is set, the method is called to update the spin box's display to the new format. The appropriate thousands separator is determined by the regional settings of the user's operating system. ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -1182,7 +1182,7 @@ and properties. + The return string includes the type and the values for the and properties. ]]> @@ -1219,7 +1219,7 @@ method is called, either in code or by the click of the up button, the new value is validated and the control is updated with the new value in the appropriate format. Specifically, if is set to `true`, is called prior to validating or updating the value. The value is then validated to be between the and values and the method is called. + When the method is called, either in code or by the click of the up button, the new value is validated and the control is updated with the new value in the appropriate format. Specifically, if is set to `true`, is called prior to validating or updating the value. The value is then validated to be between the and values and the method is called. ]]> @@ -1261,7 +1261,7 @@ and values and is converted to the correct format for display in the control. + If the spin box is not being initialized, the current value is validated to be between the and values and is converted to the correct format for display in the control. ]]> @@ -1303,7 +1303,7 @@ method calls the and methods to validate and update the display of the spin box. + The method calls the and methods to validate and update the display of the spin box. ]]> @@ -1348,12 +1348,12 @@ property is set, the new value is validated to be between the and values. Following this, the method is called to update the spin box's display with the new value in the appropriate format. + When the property is set, the new value is validated to be between the and values. Following this, the method is called to update the spin box's display with the new value in the appropriate format. ## Examples - The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. + The following code example creates and initializes a control, sets some of its common properties, and allows the user to change some of these properties at run time. This code assumes three controls have been placed on a form and handlers for their events have been instantiated. The , , and properties are set on the event of each check box. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic NumericUpDown Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/NumericUpDown/Overview/source.cs" id="Snippet1"::: @@ -1415,7 +1415,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `NumericUpDown1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/OSFeature.xml b/xml/System.Windows.Forms/OSFeature.xml index f87a723a616..b489a1e828e 100644 --- a/xml/System.Windows.Forms/OSFeature.xml +++ b/xml/System.Windows.Forms/OSFeature.xml @@ -36,12 +36,12 @@ ## Remarks Use the `static` instance of this class provided in the property to query for operating system features. You cannot create an instance of this class. - To determine the version of a feature, call the method. To determine if a feature or a specific version is present, call the method and specify the feature to look for with the feature identifiers provided in this class. + To determine the version of a feature, call the method. To determine if a feature or a specific version is present, call the method and specify the feature to look for with the feature identifiers provided in this class. ## Examples - The following example uses to query the operating system to determine if the feature is installed. The example presents two different ways of checking to see whether the feature is present. In the first method, `myVersion` is checked to see if it is `null`. If the version is `null`, the feature is not installed. In the second method, the example calls the base class method to see if the feature is installed. The results are displayed in a text box. + The following example uses to query the operating system to determine if the feature is installed. The example presents two different ways of checking to see whether the feature is present. In the first method, `myVersion` is checked to see if it is `null`. If the version is `null`, the feature is not installed. In the second method, the example calls the base class method to see if the feature is installed. The results are displayed in a text box. This code assumes `textBox1` has been created and placed on a form. @@ -130,7 +130,7 @@ ## Remarks Use this `static` property to query for operating system features. You cannot create an instance of this class. - To determine the version of a feature, call the method. To determine if a feature or a specific version is present, call the method and specify the feature to look for with the feature identifiers provided in this class. + To determine the version of a feature, call the method. To determine if a feature or a specific version is present, call the method and specify the feature to look for with the feature identifiers provided in this class. @@ -239,14 +239,14 @@ method to determine if the operating system supports the specific feature or metric identified by `enumValue`. Based upon the value returned from , you would perform conditional actions in your code. For example, if calling this method with a parameter value of returns `true`, you could create owner-drawn menus in your application in a flat style. + Typically, you use the method to determine if the operating system supports the specific feature or metric identified by `enumValue`. Based upon the value returned from , you would perform conditional actions in your code. For example, if calling this method with a parameter value of returns `true`, you could create owner-drawn menus in your application in a flat style. - Accessing some system features or metrics can raise exceptions if they are not available on a specific operating system version. In this case, first use the corresponding enumeration value, along with , to determine if the metric is supported. For example, call with before getting the property value. + Accessing some system features or metrics can raise exceptions if they are not available on a specific operating system version. In this case, first use the corresponding enumeration value, along with , to determine if the metric is supported. For example, call with before getting the property value. ## Examples - The following code example demonstrates how to use the method with the enumeration. The example determines if the operating system supports the `CaretWidth` metric before calling the property. + The following code example demonstrates how to use the method with the enumeration. The example determines if the operating system supports the `CaretWidth` metric before calling the property. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.OSFeature.IsPresent/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/OSFeature/IsPresent/form1.cs" id="Snippet1"::: @@ -294,14 +294,14 @@ A layered window can be made transparent or translucent by the operating system. Support for layered windows was first introduced in Windows 2000. - To determine if the layered windows feature is installed, use the property to call the base class method with as the feature to look for. + To determine if the layered windows feature is installed, use the property to call the base class method with as the feature to look for. - Alternatively, you can check to see if the feature is installed by calling the method with as the feature to find. + Alternatively, you can check to see if the feature is installed by calling the method with as the feature to find. ## Examples - The following example determines whether the current system supports layered windows. The base class method is called with as the feature to look for. The result is displayed in a text box. This code assumes `textBox1` has been instantiated and placed on a form. + The following example determines whether the current system supports layered windows. The base class method is called with as the feature to look for. The result is displayed in a text box. This code assumes `textBox1` has been instantiated and placed on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OSFeature.LayeredWindows Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/OSFeature/LayeredWindows/source.cs" id="Snippet1"::: @@ -346,9 +346,9 @@ A layered window can be made transparent or translucent by the operating system. ## Remarks A theme is a collection of visual interface settings that include wallpaper, cursors, fonts, sounds, and icons. .NET Framework does not directly support manipulating themes, although it does have extensive support for visual styles in the namespace. For more information about Windows Themes, see [Visual styles](/windows/win32/controls/themes-overview). - To determine if the themes feature is installed, call the base class method with as the feature to look for. + To determine if the themes feature is installed, call the base class method with as the feature to look for. - Alternatively, you can check to see if the feature is installed by calling the method with as the feature to find. + Alternatively, you can check to see if the feature is installed by calling the method with as the feature to find. ]]> diff --git a/xml/System.Windows.Forms/OpacityConverter.xml b/xml/System.Windows.Forms/OpacityConverter.xml index 903f819c94d..02f6e8b80b7 100644 --- a/xml/System.Windows.Forms/OpacityConverter.xml +++ b/xml/System.Windows.Forms/OpacityConverter.xml @@ -31,11 +31,11 @@ Provides a type converter to convert opacity values to and from a string. - . Instead, you call the method of class. For more information about type converters and to view code examples, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + . Instead, you call the method of class. For more information about type converters and to view code examples, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + ]]> @@ -71,13 +71,13 @@ Initializes an instance of the class. - . Instead, call the method of class. For more information, see the code examples in the base class. - + . Instead, call the method of class. For more information, see the code examples in the base class. + ]]> @@ -126,16 +126,16 @@ if this converter can perform the conversion; otherwise, . - . - + . + ]]> - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + You can use the parameter to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the contents. Also, properties on the may also return . @@ -186,23 +186,23 @@ Converts the specified object to the converter's native type. An that represents the converted . - method is specialized to convert values that represent percentages or decimal fractions to their corresponding values, which represent the opacity as a percentage. Types other than are passed to the base class implementation of this method. - + method is specialized to convert values that represent percentages or decimal fractions to their corresponding values, which represent the opacity as a percentage. Types other than are passed to the base class implementation of this method. + ]]> The object was not a supported type for the conversion. - could not be properly converted to type . - - -or- - + could not be properly converted to type . + + -or- + The resulting converted was less than zero percent or greater than one hundred percent. - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + You can use the parameter to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the contents. Also, properties on the may also return . @@ -256,11 +256,11 @@ Converts from the converter's native type to a value of the destination type. An that represents the converted . - method is specialized to convert integral values to their percentage representations. Other types are passed to the base class implementation of this method. - + method is specialized to convert integral values to their percentage representations. Other types are passed to the base class implementation of this method. + ]]> @@ -268,10 +268,10 @@ cannot be converted to the . - Override this method to provide your own conversion requirements. - - You can use the parameter to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the contents. Also, properties on the may also return . - + Override this method to provide your own conversion requirements. + + You can use the parameter to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the contents. Also, properties on the may also return . + The resultant object is a representing the percentage of opacity. diff --git a/xml/System.Windows.Forms/OpenFileDialog.xml b/xml/System.Windows.Forms/OpenFileDialog.xml index d82f325c209..15d28bc6577 100644 --- a/xml/System.Windows.Forms/OpenFileDialog.xml +++ b/xml/System.Windows.Forms/OpenFileDialog.xml @@ -47,7 +47,7 @@ On a right-to-left operating system, setting the containing form's instead. ## Examples - The following code example creates an , sets several properties to define the file extension filter and dialog behavior, and displays the dialog box using the method. The example requires a form with a placed on it and a reference to the namespace added to it. + The following code example creates an , sets several properties to define the file extension filter and dialog behavior, and displays the dialog box using the method. The example requires a form with a placed on it and a reference to the namespace added to it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OpenFileDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/Overview/source.cs" id="Snippet1"::: @@ -182,7 +182,7 @@ On a right-to-left operating system, setting the containing form's controls on a Form. It demonstrates initializing an , setting the and properties, and allowing the user to select multiple files by setting the property to true. This code example assumes that your form already has an control named `openFileDialog1`, a named `SelectFileButton`, and a named `flowLayoutPanel1`. + The following code example allows the user to select a number of images and display them in controls on a Form. It demonstrates initializing an , setting the and properties, and allowing the user to select multiple files by setting the property to true. This code example assumes that your form already has an control named `openFileDialog1`, a named `SelectFileButton`, and a named `flowLayoutPanel1`. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/FileNames/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/FileDialog/FileNames/Form1.vb" id="Snippet1"::: @@ -225,12 +225,12 @@ On a right-to-left operating system, setting the containing form's method is used to provide a facility to quickly open a file from the dialog box. The file is opened in read-only mode for security purposes. To open a file in read/write mode, you must use another method, such as . + The method is used to provide a facility to quickly open a file from the dialog box. The file is opened in read-only mode for security purposes. To open a file in read/write mode, you must use another method, such as . ## Examples - The following code example demonstrates how to use the method. + The following code example demonstrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OpenFileDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/Overview/source.cs" id="Snippet1"::: @@ -283,14 +283,14 @@ On a right-to-left operating system, setting the containing form's state does not affect the read/write mode that uses to open a file selected in the dialog box. will always open the file in read-only mode. + The state does not affect the read/write mode that uses to open a file selected in the dialog box. will always open the file in read-only mode. The property must be set before in order for the read-only check box to appear in the dialog box. ## Examples - The following code example demonstrates the use of the property. This example displays the box with the property set to `true`. If the user clicks the option to open the file in read-only mode, the property evaluates to `true`, and the method is used to open the file. Otherwise, the class is used to open the file in read/write mode. + The following code example demonstrates the use of the property. This example displays the box with the property set to `true`. If the user clicks the option to open the file in read-only mode, the property evaluates to `true`, and the method is used to open the file. Otherwise, the class is used to open the file in read/write mode. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DlgOpenFileReadOnly/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/OpenFileDialog/ReadOnlyChecked/form1.cs" id="Snippet1"::: @@ -524,7 +524,7 @@ On a right-to-left operating system, setting the containing form's property. This example displays the box with the property set to `true`. If the user clicks the option to open the file in read-only mode, the method is used to open the file. Otherwise, the class is used to open the file in read/write mode. + The following code example demonstrates the use of the property. This example displays the box with the property set to `true`. If the user clicks the option to open the file in read-only mode, the method is used to open the file. Otherwise, the class is used to open the file in read/write mode. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DlgOpenFileReadOnly/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/OpenFileDialog/ReadOnlyChecked/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/Orientation.xml b/xml/System.Windows.Forms/Orientation.xml index edf290afcbb..9e699a8c070 100644 --- a/xml/System.Windows.Forms/Orientation.xml +++ b/xml/System.Windows.Forms/Orientation.xml @@ -24,11 +24,11 @@ Specifies the orientation of controls or elements of controls. - . - + . + ]]> diff --git a/xml/System.Windows.Forms/Padding.xml b/xml/System.Windows.Forms/Padding.xml index 99ced033da8..beaf194607f 100644 --- a/xml/System.Windows.Forms/Padding.xml +++ b/xml/System.Windows.Forms/Padding.xml @@ -63,7 +63,7 @@ ## Remarks The structure represents the padding or margin associated with a rectangular UI element such as a control. The padding is the internal space between the body of the UI element and its edge. In contrast, a margin is the distance separating the adjoining edges of two adjacent UI elements. Because of structural similarities, is used to represent both padding and margins. - For a diagram that illustrates the and properties on a control, see [Margin and Padding in Windows Forms Controls](/dotnet/desktop/winforms/controls/margin-and-padding-in-windows-forms-controls). + For a diagram that illustrates the and properties on a control, see [Margin and Padding in Windows Forms Controls](/dotnet/desktop/winforms/controls/margin-and-padding-in-windows-forms-controls). Padding has a different effect on controls that are containers than on controls that are not. For example, in a control, the property defines the spacing between the border of the and its child controls. For a control, the property defines the spacing between the border of the control and its contained text. @@ -73,7 +73,7 @@ - A set of operators for performing common arithmetic operations for the class, such as adding two objects together. For languages that do not support operator overloading, you can invoke these members by using alternative method syntax. -- The , , and properties, which provide combined values that are convenient for use in custom layout calculations. +- The , , and properties, which provide combined values that are convenient for use in custom layout calculations. @@ -133,7 +133,7 @@ , , , and properties to the value of the `all` parameter. + This constructor sets the , , , and properties to the value of the `all` parameter. ]]> @@ -284,7 +284,7 @@ ## Remarks When retrieving this property, if all the edges use the same padding value, then this common value is returned. Otherwise, -1 is returned to indicate that all the padding values are not equal. - Setting this value changes the , , , and properties. + Setting this value changes the , , , and properties. ]]> @@ -383,7 +383,7 @@ , , and padding properties set to 0. + An empty padding object is defined as having the , , and padding properties set to 0. This immutable field is useful for comparison operations and initializations. @@ -440,7 +440,7 @@ (or a derived type) can be equal to the current . In addition, the corresponding , , and properties for both objects must be the same. + Only other objects of type (or a derived type) can be equal to the current . In addition, the corresponding , , and properties for both objects must be the same. ]]> @@ -534,11 +534,11 @@ method uses the , , , and values to generate a 32-bit hash code that represents the current . + The method uses the , , , and values to generate a 32-bit hash code that represents the current . A hash code is a number that corresponds to the value of an object (so two objects that have the same value should generate the same hash code). Hash codes are used to sort and store collections of objects. For example, a represents a collection of key-and-value pairs that are organized based on the hash code of the key. - For more information on hash codes and hash functions, see the method. + For more information on hash codes and hash functions, see the method. ]]> @@ -695,11 +695,11 @@ property of the result is the sum of the properties of the two operands. + A vector addition operation is the result of adding the padding values for each edge. For example, the property of the result is the sum of the properties of the two operands. This operation is transitive. - The equivalent method for this operator is ]]> + The equivalent method for this operator is ]]> How to: Outline a Windows Forms Control Using Padding @@ -746,9 +746,9 @@ objects are equal if the padding values for each of the four edges - , , , and - are the same for both objects. + Two objects are equal if the padding values for each of the four edges - , , , and - are the same for both objects. - The equivalent method for this operator is ]]> + The equivalent method for this operator is ]]> @@ -796,9 +796,9 @@ . + This operation is the inverse of . - The equivalent method for this operator is the negation of ]]> + The equivalent method for this operator is the negation of ]]> How to: Outline a Windows Forms Control Using Padding @@ -844,9 +844,9 @@ property of the result is the difference between the properties of two operands. + A vector subtraction operation is the result of subtracting the padding values for each edge. For example, the property of the result is the difference between the properties of two operands. - The equivalent method for this operator is ]]> + The equivalent method for this operator is ]]> How to: Outline a Windows Forms Control Using Padding @@ -957,7 +957,7 @@ ## Remarks The property performs a type conversion from to . The property corresponds to the property, and the property corresponds to the property. - is convenient for use in many layout calculations. + is convenient for use in many layout calculations. ]]> @@ -1117,7 +1117,7 @@ ## Remarks This method returns a string containing the labeled values of the padding for all four edges. - This method overrides . + This method overrides . ]]> diff --git a/xml/System.Windows.Forms/PageSetupDialog.xml b/xml/System.Windows.Forms/PageSetupDialog.xml index cfd5d47be1f..9712f76f75a 100644 --- a/xml/System.Windows.Forms/PageSetupDialog.xml +++ b/xml/System.Windows.Forms/PageSetupDialog.xml @@ -38,16 +38,16 @@ dialog box modifies the and information for a given . The user can enable sections of the dialog box to manipulate printing and margins; paper orientation, size, and source; and to show Help and network buttons. The property defines the minimum margins a user can select. + The dialog box modifies the and information for a given . The user can enable sections of the dialog box to manipulate printing and margins; paper orientation, size, and source; and to show Help and network buttons. The property defines the minimum margins a user can select. - When you create an instance of the class, the read/write properties are set to initial values. For a list of these values, see the constructor. + When you create an instance of the class, the read/write properties are set to initial values. For a list of these values, see the constructor. - Because a needs page settings to display, you need to set the , , or property before calling ; otherwise, an exception will occur. + Because a needs page settings to display, you need to set the , , or property before calling ; otherwise, an exception will occur. ## Examples - The following code example demonstrates the using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. + The following code example demonstrates the using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PageSetupDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PageSetupDialog/Overview/form1.cs" id="Snippet1"::: @@ -93,16 +93,16 @@ |Property|Initial Value| |--------------|-------------------| -||`true`| -||`true`| -||`true`| -||`true`| -||`null`| -||`null`| -||`null`| -||`null`| -||`false`| -||`true`| +||`true`| +||`true`| +||`true`| +||`true`| +||`null`| +||`null`| +||`null`| +||`null`| +||`false`| +||`true`| You can change the value for any of these properties through a separate call to the property. @@ -411,7 +411,7 @@ class measures in hundredths of an inch, but the allows users to set margins in inches or millimeters depending on the culture settings for the system running the application. + The class measures in hundredths of an inch, but the allows users to set margins in inches or millimeters depending on the culture settings for the system running the application. In the .NET Framework version 2.0, you should set this property to `true` if your application could be used in cultures that measure document margins in millimeters. If you are doing this conversion yourself, as was required in versions of the .NET Framework earlier than version 2.0, you should use the default value of `false`. @@ -507,7 +507,7 @@ using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. + The following code example demonstrates the using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PageSetupDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PageSetupDialog/Overview/form1.cs" id="Snippet1"::: @@ -568,7 +568,7 @@ using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. + The following code example demonstrates the using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PageSetupDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PageSetupDialog/Overview/form1.cs" id="Snippet1"::: @@ -735,7 +735,7 @@ using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. + The following code example demonstrates the using the , , and properties. To run this example, place it in a form containing a named `Button1`, a named `ListBox1`, and a named `PageSetupDialog1`. Ensure the button's click event is connected to the event-handling method in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PageSetupDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PageSetupDialog/Overview/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/PaintEventArgs.xml b/xml/System.Windows.Forms/PaintEventArgs.xml index abaaeb9a0f1..ca9eeb2fe04 100644 --- a/xml/System.Windows.Forms/PaintEventArgs.xml +++ b/xml/System.Windows.Forms/PaintEventArgs.xml @@ -46,14 +46,14 @@ event occurs when a control is redrawn. A specifies the to use to paint the control and the in which to paint. + The event occurs when a control is redrawn. A specifies the to use to paint the control and the in which to paint. For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following example demonstrates handling the event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. + The following example demonstrates handling the event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Demontrates Form Paint Event/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PaintEventArgs/Overview/form1.cs" id="Snippet1"::: @@ -256,7 +256,7 @@ method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. + This method is called by the public `Dispose()` method and the method, if it has been overridden. `Dispose()` invokes the protected method with the `disposing` parameter set to `true`. `Finalize` specifies the `disposing` parameter as `false`. When the `disposing` parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. @@ -333,7 +333,7 @@ event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. + The following example demonstrates handling the event and using the class to draw rectangles on the form. The and events are handled to determine the size of the rectangle. The example also demonstrates the method to invalidate the area of the rectangle, causing it to be redrawn. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Demontrates Form Paint Event/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PaintEventArgs/Overview/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/Panel.xml b/xml/System.Windows.Forms/Panel.xml index 0c39dc7c053..a753b2eeb97 100644 --- a/xml/System.Windows.Forms/Panel.xml +++ b/xml/System.Windows.Forms/Panel.xml @@ -201,7 +201,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Panel1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/PictureBox.xml b/xml/System.Windows.Forms/PictureBox.xml index 30516d1f3cd..d6edfaf1be5 100644 --- a/xml/System.Windows.Forms/PictureBox.xml +++ b/xml/System.Windows.Forms/PictureBox.xml @@ -77,7 +77,7 @@ ## Remarks Typically the is used to display graphics from a bitmap, metafile, icon, JPEG, GIF, or PNG file. - Set the property to the you want to display, either at design time or at run time. You can alternatively specify the image by setting the property and load the image synchronously using the method or asynchronously using the method. + Set the property to the you want to display, either at design time or at run time. You can alternatively specify the image by setting the property and load the image synchronously using the method or asynchronously using the method. > [!NOTE] > If you want to use the same image in multiple controls, create a clone of the image for each . Accessing the same image from multiple controls causes an exception to occur. @@ -130,11 +130,11 @@ |Item|Description| |----------|-----------------| -||`null`| -||| +||`null`| +||| ## Examples - The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run the example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods. + The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run the example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet2"::: @@ -234,7 +234,7 @@ You can specify this property at design time or run time. ## Examples - The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used in when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run this example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods. + The following code example demonstrates the use of the and controls. The is initialized by setting the and properties using the and enumerations, respectively. The is populated with pictures from the Sample Pictures directory. The method is used in when handling the event of the control to determine whether an item is selected. If an item is selected, the event handler displays the selected file by setting the property. The example requires that you have JPG files located in the C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures directory. To run this example, paste the code into a form and call the `InitializePictureBox` and `PopulateListView` methods in the form's constructor or event-handling method. Ensure all events are associated with their event-handling methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewAndPictureBox/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnHeader/Overview/form1.cs" id="Snippet2"::: @@ -276,10 +276,10 @@ image is loaded asynchronously when the property is `false` and the method is used to load the image. If a load is canceled with the method cancellation is reported by raising the event with the property of the set to `true`. + A image is loaded asynchronously when the property is `false` and the method is used to load the image. If a load is canceled with the method cancellation is reported by raising the event with the property of the set to `true`. ## Examples - The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and two controls named `startLoadButton` and `cancelLoadButton`. Make sure that the event for the buttons is associated with their event-handling method in this example. You must change the image file path to a path that is valid on your system. + The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and two controls named `startLoadButton` and `cancelLoadButton`. Make sure that the event for the buttons is associated with their event-handling method in this example. You must change the image file path to a path that is valid on your system. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PictureBox/CancelAsync/Form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/PictureBox/CancelAsync/Form1.vb" id="Snippet3"::: @@ -633,7 +633,7 @@ is specified, a default error image is displayed. + If no is specified, a default error image is displayed. ]]> @@ -940,7 +940,7 @@ If a relative path is used, it will be considered relative to the working directory. - A call to the method will overwrite the property, setting to the URL value specified in the method call. + A call to the method will overwrite the property, setting to the URL value specified in the method call. ]]> @@ -1074,7 +1074,7 @@ is specified, a default image is displayed. The is always displayed non-stretched, in the center of the . + If no is specified, a default image is displayed. The is always displayed non-stretched, in the center of the . ]]> @@ -1349,7 +1349,7 @@ ## Remarks -If the `url` parameter indicates a local file, the recommended format is a local file path. For example, an image file named _myPicture.jpg_ located at _c:\\_ would be accessed by passing `c:\myPicture.jpg` for the `url` parameter. A full path, such as `http://www.contoso.com/path/images/image.jpg`, or a relative path, such as **./images/image.jpg**, can be used. If a relative path is used, it will be considered relative to the working directory. A call to the method sets the property to the value of the `url` parameter. +If the `url` parameter indicates a local file, the recommended format is a local file path. For example, an image file named _myPicture.jpg_ located at _c:\\_ would be accessed by passing `c:\myPicture.jpg` for the `url` parameter. A full path, such as `http://www.contoso.com/path/images/image.jpg`, or a relative path, such as **./images/image.jpg**, can be used. If a relative path is used, it will be considered relative to the working directory. A call to the method sets the property to the value of the `url` parameter. ### Load behavior changes @@ -1408,7 +1408,7 @@ If the `url` parameter indicates a local file, the recommended format is a local ## Remarks -Besides calling the method, the property must be set to `false` to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed. +Besides calling the method, the property must be set to `false` to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed. This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . @@ -1454,9 +1454,9 @@ This method stores in the task it returns all non-usage exceptions that the meth ## Remarks -If the `url` parameter indicates a local file, the recommended format is a local file path. For example, an image file named _myPicture.jpg_ located at _c:\\_ would be accessed by passing `c:\myPicture.jpg` for the `url` parameter. A full path, such as `http://www.contoso.com/path/images/image.jpg`, or a relative path, such as **./images/image.jpg**, can be used. If a relative path is used, it will be considered relative to the working directory. A call to the method sets the property to the value of the `url` parameter. +If the `url` parameter indicates a local file, the recommended format is a local file path. For example, an image file named _myPicture.jpg_ located at _c:\\_ would be accessed by passing `c:\myPicture.jpg` for the `url` parameter. A full path, such as `http://www.contoso.com/path/images/image.jpg`, or a relative path, such as **./images/image.jpg**, can be used. If a relative path is used, it will be considered relative to the working directory. A call to the method sets the property to the value of the `url` parameter. -A call to the method sets the property to the value of `url`. Besides calling the method, you must set the property to `false` to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed. If an error occurs during an asynchronous image-loading operation, it will be caught and reported by the property of the . +A call to the method sets the property to the value of `url`. Besides calling the method, you must set the property to `false` to load an image asynchronously. When you load an image asynchronously, you can handle the event to determine the progress of an image load or the event to determine when an image load has completed. If an error occurs during an asynchronous image-loading operation, it will be caught and reported by the property of the . This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . @@ -1466,7 +1466,7 @@ This method stores in the task it returns all non-usage exceptions that the meth ## Examples -The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and a named `startLoadButton`. Make sure that the event for the button is associated with the `startLoadButton_Click` method in this example. You must change the image file path to a path that is valid on your system. +The following code example demonstrates how to use the method. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and a named `startLoadButton`. Make sure that the event for the button is associated with the `startLoadButton_Click` method in this example. You must change the image file path to a path that is valid on your system. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PictureBox/CancelAsync/Form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/PictureBox/CancelAsync/Form1.vb" id="Snippet3"::: @@ -1505,12 +1505,12 @@ The following code example demonstrates how to use the occurs only when the image is loaded asynchronously by using one of the methods, and is `false`. If the image-load is canceled by calling the method the property of the will be set to `true`. If an exception or error occurs during the load process, it will be caught and the property of the will contain the exception information. + The occurs only when the image is loaded asynchronously by using one of the methods, and is `false`. If the image-load is canceled by calling the method the property of the will be set to `true`. If an exception or error occurs during the load process, it will be caught and the property of the will contain the exception information. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PictureBox1`. Then ensure that the event handler is associated with the event. @@ -1551,7 +1551,7 @@ The following code example demonstrates how to use the occurs only when the image is loaded asynchronously by using one of the methods. The progress percentage of the image load is reported with the property of the . + The occurs only when the image is loaded asynchronously by using one of the methods. The progress percentage of the image load is reported with the property of the . Handle the if you want to reflect the progress of an asynchronous image-loading operation in a or similar control. Use the property of the to update the progress value. @@ -1644,7 +1644,7 @@ The following code example demonstrates how to use the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1694,7 +1694,7 @@ The following code example demonstrates how to use the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1738,7 +1738,7 @@ The following code example demonstrates how to use the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1782,7 +1782,7 @@ The following code example demonstrates how to use the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1892,11 +1892,11 @@ The following code example demonstrates how to use the method redraws the image if the property is set to , , or . + The method redraws the image if the property is set to , , or . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1941,7 +1941,7 @@ The following code example demonstrates how to use the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2212,7 +2212,7 @@ The following code example demonstrates how to use the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PictureBox1`. Then ensure that the event handler is associated with the event. @@ -2619,7 +2619,7 @@ The following code example demonstrates how to use the method returns a string that includes the type and the property of the control. + The method returns a string that includes the type and the property of the control. ]]> @@ -2666,7 +2666,7 @@ The following code example demonstrates how to use the property to `true` means the image is loaded synchronously. This causes the user interface to be blocked from other input until the image is loaded. When is `false` (the default) and the method is used to load the image, the image is displayed when the specified image is loaded, and the user can interact with the interface during the load process. + Setting the property to `true` means the image is loaded synchronously. This causes the user interface to be blocked from other input until the image is loaded. When is `false` (the default) and the method is used to load the image, the image is displayed when the specified image is loaded, and the user can interact with the interface during the load process. ## Examples The following code example demonstrates how to use the property. To run this example, paste the following code into a Windows Form that contains a named `pictureBox1` and a named `startLoadButton`. Make sure that the event for the button is associated with the `startLoadButton_Click` method in this example. You must change the image file path to one that is valid on your system. diff --git a/xml/System.Windows.Forms/PopupEventArgs.xml b/xml/System.Windows.Forms/PopupEventArgs.xml index b28ed013c36..6ace0ffb4f0 100644 --- a/xml/System.Windows.Forms/PopupEventArgs.xml +++ b/xml/System.Windows.Forms/PopupEventArgs.xml @@ -38,7 +38,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolTip1`. Then ensure that the event handler is associated with the event. @@ -97,7 +97,7 @@ constructor are used to initialize the corresponding, similarly named properties. The `associatedControl` parameter can be `null` if the owning window is not of type . + The parameters to the constructor are used to initialize the corresponding, similarly named properties. The `associatedControl` parameter can be `null` if the owning window is not of type . ]]> @@ -144,12 +144,12 @@ with multiple controls through the method, you can use the property to determine which control the event is associated with. This is helpful if you want to perform different ToolTip customization based on the associated control. + Because you can associate the with multiple controls through the method, you can use the property to determine which control the event is associated with. This is helpful if you want to perform different ToolTip customization based on the associated control. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolTip1`. Then ensure that the event handler is associated with the event. @@ -204,7 +204,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolTip1`. Then ensure that the event handler is associated with the event. @@ -253,12 +253,12 @@ method of the class. + The type of window used for the ToolTip is specified in the method of the class. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolTip1`. Then ensure that the event handler is associated with the event. @@ -310,12 +310,12 @@ property enables the event handler to change the size of the ToolTip window. is often used in conjunction with the members of the class to customize the appearance of ToolTips. + The property enables the event handler to change the size of the ToolTip window. is often used in conjunction with the members of the class to customize the appearance of ToolTips. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolTip1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/PowerState.xml b/xml/System.Windows.Forms/PowerState.xml index 95509a4d3c4..4115fbb468b 100644 --- a/xml/System.Windows.Forms/PowerState.xml +++ b/xml/System.Windows.Forms/PowerState.xml @@ -23,11 +23,11 @@ Defines identifiers that indicate a suspended system power activity mode. - method of the class. - + method of the class. + ]]> diff --git a/xml/System.Windows.Forms/PreviewKeyDownEventArgs.xml b/xml/System.Windows.Forms/PreviewKeyDownEventArgs.xml index e6f561449f5..08b559d0472 100644 --- a/xml/System.Windows.Forms/PreviewKeyDownEventArgs.xml +++ b/xml/System.Windows.Forms/PreviewKeyDownEventArgs.xml @@ -24,21 +24,21 @@ Provides data for the event. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -107,16 +107,16 @@ if the ALT key was pressed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -149,16 +149,16 @@ if the CTRL key was pressed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -201,16 +201,16 @@ if the key is a regular input key; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -242,16 +242,16 @@ Gets the keyboard code for a or event. One of the values. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -289,16 +289,16 @@ Gets the key code combined with key modifiers such as the SHIFT, CONTROL, and ALT keys for a or event. One of the values. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -330,16 +330,16 @@ Gets the keyboard value for a or event. An representing the keyboard value. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -371,16 +371,16 @@ Gets the modifier flags for a or event. One of the values. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> @@ -413,16 +413,16 @@ if the SHIFT key was pressed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet65"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet65"::: + ]]> diff --git a/xml/System.Windows.Forms/PrintControllerWithStatusDialog.xml b/xml/System.Windows.Forms/PrintControllerWithStatusDialog.xml index 40e3da2b441..a3de7acf4ce 100644 --- a/xml/System.Windows.Forms/PrintControllerWithStatusDialog.xml +++ b/xml/System.Windows.Forms/PrintControllerWithStatusDialog.xml @@ -36,7 +36,7 @@ ## Remarks This class implements a and adds a status dialog box. A print controller specifies how a is printed. - For a list of initial property values for an instance of the class, see the constructor. + For a list of initial property values for an instance of the class, see the constructor. For more information about printing with Windows Forms, see the namespace overview. If you want to print from a Windows Presentation Foundation application, see the namespace. @@ -162,7 +162,7 @@ checks the property of the underlying controller. + The checks the property of the underlying controller. ]]> @@ -204,11 +204,11 @@ class calls the method on the encapsulated . + The class calls the method on the encapsulated . - The method is called immediately after the raises the event. If an exception is thrown inside a event of a , is not called. + The method is called immediately after the raises the event. If an exception is thrown inside a event of a , is not called. - The method creates the object that is sent to the printer. After is called, the method sets the object to a graphic of a single page. (Use to set how to print a page in a document. For example, you can adjust page settings separately for each page.) clears the object, while the method deallocates the object. + The method creates the object that is sent to the printer. After is called, the method sets the object to a graphic of a single page. (Use to set how to print a page in a document. For example, you can adjust page settings separately for each page.) clears the object, while the method deallocates the object. ]]> @@ -250,11 +250,11 @@ class calls the method on the encapsulated . + The class calls the method on the encapsulated . - The method is called immediately after the raises the event. + The method is called immediately after the raises the event. - The method creates the object that is sent to the printer. After is called, the method sets the object to a graphic of a single page. (Use to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document.) The method clears the object, while deallocates the object. + The method creates the object that is sent to the printer. After is called, the method sets the object to a graphic of a single page. (Use to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document.) The method clears the object, while deallocates the object. ]]> @@ -298,13 +298,13 @@ class calls the method on the encapsulated . + The class calls the method on the encapsulated . - The method is called immediately before the raises the event. + The method is called immediately before the raises the event. - The method creates the object that is sent to the printer. After is called, sets the object to a graphic of a single page. The method clears the object, while the method deallocates the object. + The method creates the object that is sent to the printer. After is called, sets the object to a graphic of a single page. The method clears the object, while the method deallocates the object. - Use to set how to print a page in a document. For example, you can adjust page settings separately for each page. + Use to set how to print a page in a document. For example, you can adjust page settings separately for each page. ]]> @@ -346,13 +346,13 @@ class calls the method on the encapsulated . + The class calls the method on the encapsulated . - The method is called immediately after the raises the event. + The method is called immediately after the raises the event. - Use to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document. creates the object that is sent to the printer. After is called, the method sets the object to a graphic of a single page. The method clears the object, while the method deallocates the object. + Use to determine when and how to print a document. For example, you can delay printing for 30 minutes or adjust the printer settings for the document. creates the object that is sent to the printer. After is called, the method sets the object to a graphic of a single page. The method clears the object, while the method deallocates the object. - is a good place to verify that are valid. + is a good place to verify that are valid. ]]> diff --git a/xml/System.Windows.Forms/PrintDialog.xml b/xml/System.Windows.Forms/PrintDialog.xml index 320d0629640..6bb831814e9 100644 --- a/xml/System.Windows.Forms/PrintDialog.xml +++ b/xml/System.Windows.Forms/PrintDialog.xml @@ -46,14 +46,14 @@ , the read/write properties are set to initial values. For a list of these values, see the constructor. To get printer settings that are modified by the user with the , use the property. + When you create an instance of , the read/write properties are set to initial values. For a list of these values, see the constructor. To get printer settings that are modified by the user with the , use the property. For more information about printing with Windows Forms, see the namespace overview. If you want to print from a Windows Presentation Foundation application, see the namespace. ## Examples - The following code example demonstrates how to use the control to set the , , and properties. To run this example, paste the following code into a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event-handling methods defined in this example. + The following code example demonstrates how to use the control to set the , , and properties. To run this example, paste the following code into a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event-handling methods defined in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintDialog/Overview/form1.cs" id="Snippet1"::: @@ -97,14 +97,14 @@ |Property|Initial Value| |--------------|-------------------| -||`false`| -||`true`| -||`false`| -||`null`| -||`null`| -||`false`| -||`false`| -||`true`| +||`false`| +||`true`| +||`false`| +||`null`| +||`null`| +||`false`| +||`false`| +||`true`| You can change the value for any one of these properties through a separate call to the property. @@ -307,7 +307,7 @@ control to set the , , and properties. To run this example, paste the following code into a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event-handling methods defined in this example. + The following code example demonstrates how to use the control to set the , , and properties. To run this example, paste the following code into a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event-handling methods defined in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintDialog/Overview/form1.cs" id="Snippet1"::: @@ -365,7 +365,7 @@ control to set the , , and properties. To run this example, paste the following code into a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event-handling methods defined in this example. + The following code example demonstrates how to use the control to set the , , and properties. To run this example, paste the following code into a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event-handling methods defined in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintDialog/Overview/form1.cs" id="Snippet1"::: @@ -421,7 +421,7 @@ property must be set before you call or an exception will occur. + The property must be set before you call or an exception will occur. ]]> @@ -588,7 +588,7 @@ ## Examples - The following code example demonstrates the use of the control setting the , , and properties. To run this example paste the following code in a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event handling methods defined in this example. + The following code example demonstrates the use of the control setting the , , and properties. To run this example paste the following code in a form that contains a control named `PrintDialog1` and a button named `Button1`. This example requires that the button's event and the event of `docToPrint` have been connected to the event handling methods defined in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintDialogExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintDialog/Overview/form1.cs" id="Snippet1"::: @@ -697,7 +697,7 @@ and will be ignored as these properties were made obsolete for Windows 2000 and later versions of Windows. + When this property is set to `true`, and will be ignored as these properties were made obsolete for Windows 2000 and later versions of Windows. ]]> diff --git a/xml/System.Windows.Forms/PrintPreviewControl.xml b/xml/System.Windows.Forms/PrintPreviewControl.xml index 34f7484bf91..556ecf8c7a9 100644 --- a/xml/System.Windows.Forms/PrintPreviewControl.xml +++ b/xml/System.Windows.Forms/PrintPreviewControl.xml @@ -46,14 +46,14 @@ class, some of the read/write properties are set to initial values. For a list of these values, see the constructor. + When you create an instance of the class, some of the read/write properties are set to initial values. For a list of these values, see the constructor. For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace. ## Examples - The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. + The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintPreviewControlExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewControl/Overview/form1.cs" id="Snippet1"::: @@ -95,18 +95,18 @@ |Property|Default Value| |--------------|-------------------| -||`true`| -||`null`| -||1| -||0| -||0| +||`true`| +||`null`| +||1| +||0| +||0| You can change the value for any of these properties through a separate call to the property. ## Examples - The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. + The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintPreviewControlExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewControl/Overview/form1.cs" id="Snippet1"::: @@ -299,7 +299,7 @@ , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. + The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintPreviewControlExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewControl/Overview/form1.cs" id="Snippet1"::: @@ -522,7 +522,7 @@ property is set to `true`, the method resizes the page in proportion to the control. If is `false`, the centers the page on the control. + If the property is set to `true`, the method resizes the page in proportion to the control. If is `false`, the centers the page on the control. ]]> @@ -564,7 +564,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -819,7 +819,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PrintPreviewControl1`. Then ensure that the event handler is associated with the event. @@ -1008,7 +1008,7 @@ ## Examples - The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. + The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintPreviewControlExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewControl/Overview/form1.cs" id="Snippet1"::: @@ -1092,7 +1092,7 @@ , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. + The following code example demonstrates the , , and properties of the . To run this example, place the following code in a form and call the `InitializePrintPreviewControl` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PrintPreviewControlExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewControl/Overview/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/PrintPreviewDialog.xml b/xml/System.Windows.Forms/PrintPreviewDialog.xml index 45c95434b55..978a2cd19ef 100644 --- a/xml/System.Windows.Forms/PrintPreviewDialog.xml +++ b/xml/System.Windows.Forms/PrintPreviewDialog.xml @@ -70,14 +70,14 @@ class, some of the read/write properties are set to initial values. For a list of these values, see the constructor. + When you create an instance of the class, some of the read/write properties are set to initial values. For a list of these values, see the constructor. For more information about printing with Windows Forms, see the namespace overview. If you wish to print from a Windows Presentation Foundation application, see the namespace. ## Examples - The following code example demonstrates the setting the and properties. The example assumes the form contains a named `TreeView1` that contains objects. The property of each object must be set to a fully qualified document name that can be accessed by the machine running the example. Set each property to a string that identifies the file specified by the property. For example, you could set `TreeNode1.Tag` to "c:\myDocuments\recipe.doc" and `TreeNode1.Text` to "recipe.doc". The example also assumes the form contains a named `PrintPreviewDialog1` and a button named `Button1`. To run this example, call the `InitializePrintPreviewDialog` method in the form's constructor or event handler. + The following code example demonstrates the setting the and properties. The example assumes the form contains a named `TreeView1` that contains objects. The property of each object must be set to a fully qualified document name that can be accessed by the machine running the example. Set each property to a string that identifies the file specified by the property. For example, you could set `TreeNode1.Tag` to "c:\myDocuments\recipe.doc" and `TreeNode1.Text` to "recipe.doc". The example also assumes the form contains a named `PrintPreviewDialog1` and a button named `Button1`. To run this example, call the `InitializePrintPreviewDialog` method in the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet3"::: @@ -122,7 +122,7 @@ ## Examples - The following code example demonstrates the setting the and properties. The example assumes the form contains a named `TreeView1` that contains objects. The property of each object must be set to a fully qualified document name that can be accessed by the machine running the example. Set each property to a string that identifies the file specified by the property. For example, you could set `TreeNode1.Tag` to "c:\myDocuments\recipe.doc" and `TreeNode1.Text` to "recipe.doc". The example also assumes the form contains a named `PrintPreviewDialog1` and a button named `Button1`. To run this example, call the `InitializePrintPreviewDialog` method in the form's constructor or event handler. + The following code example demonstrates the setting the and properties. The example assumes the form contains a named `TreeView1` that contains objects. The property of each object must be set to a fully qualified document name that can be accessed by the machine running the example. Set each property to a string that identifies the file specified by the property. For example, you could set `TreeNode1.Tag` to "c:\myDocuments\recipe.doc" and `TreeNode1.Text` to "recipe.doc". The example also assumes the form contains a named `PrintPreviewDialog1` and a button named `Button1`. To run this example, call the `InitializePrintPreviewDialog` method in the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet3"::: @@ -471,7 +471,7 @@ ## Remarks You can use this property to allow your form and its controls to automatically adjust based on changes in the font. This can be useful in applications where the font might increase or decrease based on the language specified for use by Windows. - To obtain the size the form will auto scale to, use the property. If you want to determine the size the form will auto scale to based on a specific font, use the method. + To obtain the size the form will auto scale to, use the property. If you want to determine the size the form will auto scale to based on a specific font, use the method. ]]> @@ -1537,7 +1537,7 @@ method, see the method. + For more information about the method, see the method. ]]> @@ -1726,7 +1726,7 @@ property returns a with a of 370 pixels and a of 300 pixels. + Unless overridden in a derived class, the property returns a with a of 370 pixels and a of 300 pixels. ]]> @@ -1915,7 +1915,7 @@ . + This property is equivalent to . ]]> @@ -2806,7 +2806,7 @@ A maximize button automatically becomes a restore button when a window is maximized. Minimizing or restoring a window automatically changes the restore button back to a maximize button. > [!NOTE] -> Maximizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to , the form is maximized independently of whatever settings are in effect for the and properties +> Maximizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to , the form is maximized independently of whatever settings are in effect for the and properties ]]> @@ -3004,7 +3004,7 @@ A minimize button enables users to minimize a window to an icon. To display a minimize button, you must also set the form's property to either , , , or . > [!NOTE] -> Minimizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to , the form is minimized independently of whatever settings are in effect for the and properties. +> Minimizing a form at run time generates a event. The property reflects the current state of the window. If you set the property to , the form is minimized independently of whatever settings are in effect for the and properties. ]]> @@ -3149,11 +3149,11 @@ ## Remarks This method is not relevant for this class. - The method invalidates the preview so it is regenerated when the dialog is reopened. + The method invalidates the preview so it is regenerated when the dialog is reopened. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3387,7 +3387,7 @@ , , , and key values will return `false`; otherwise, processing is passed to the base class's method. + The , , , and key values will return `false`; otherwise, processing is passed to the base class's method. ]]> @@ -3570,7 +3570,7 @@ ## Remarks This property is not relevant for this class. - The property is used for applications where the language is written from right to left. When both the and properties are `true`, mirroring will be turned on for the dialog box, and control placement and text will be from right to left. + The property is used for applications where the language is written from right to left. When both the and properties are `true`, mirroring will be turned on for the dialog box, and control placement and text will be from right to left. ]]> @@ -3723,7 +3723,7 @@ ## Remarks This property is not relevant for this class. - This property allows you to set both the height and width of the form at the same time instead of setting the and properties individually. If you want to set the size and location of a form, you can use the property to size and locate the form based on desktop coordinates or use the property of the class to set the size and location of the form based on screen coordinates. + This property allows you to set both the height and width of the form at the same time instead of setting the and properties individually. If you want to set the size and location of a form, you can use the property to size and locate the form based on desktop coordinates or use the property of the class to set the size and location of the form based on screen coordinates. ]]> @@ -4219,7 +4219,7 @@ ## Remarks This property is not relevant for this class. - When the property is assigned a , the areas of the form that have the same will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. For example, if the client region of a form is made transparent, clicking the mouse on that area will send the event notification of the click to any window that is below it. If the color assigned to the property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a control on a form that has its property set to , the control will be displayed transparently unless the property of the control is changed to a different color. + When the property is assigned a , the areas of the form that have the same will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. For example, if the client region of a form is made transparent, clicking the mouse on that area will send the event notification of the click to any window that is below it. If the color assigned to the property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a control on a form that has its property set to , the control will be displayed transparently unless the property of the control is changed to a different color. ]]> @@ -4265,7 +4265,7 @@ ## Remarks Anti-aliasing removes jagged lines when fonts are rendered. - The following code example demonstrates the setting the and properties. The example assumes the form contains a named `TreeView1` that contains objects. The property of each object must be set to a fully qualified document name that can be accessed by the machine running the example. Set each property to a string that identifies the file specified by the property. For example, you could set `TreeNode1.Tag` to "c:\myDocuments\recipe.doc" and `TreeNode1.Text` to "recipe.doc". The example also assumes the form contains a named `PrintPreviewDialog1` and a button named `Button1`. To run this example, call the `InitializePrintPreviewDialog` method in the form's constructor or event handler. + The following code example demonstrates the setting the and properties. The example assumes the form contains a named `TreeView1` that contains objects. The property of each object must be set to a fully qualified document name that can be accessed by the machine running the example. Set each property to a string that identifies the file specified by the property. For example, you could set `TreeNode1.Tag` to "c:\myDocuments\recipe.doc" and `TreeNode1.Text` to "recipe.doc". The example also assumes the form contains a named `PrintPreviewDialog1` and a button named `Button1`. To run this example, call the `InitializePrintPreviewDialog` method in the form's constructor or event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet3"::: @@ -4454,7 +4454,7 @@ property is always set to , regardless of its initial setting. This is reflected in the , , , and property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the property. + Before a form is displayed, the property is always set to , regardless of its initial setting. This is reflected in the , , , and property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the property. ]]> diff --git a/xml/System.Windows.Forms/ProfessionalColorTable.xml b/xml/System.Windows.Forms/ProfessionalColorTable.xml index 49c0d47b46f..293ab7d38e2 100644 --- a/xml/System.Windows.Forms/ProfessionalColorTable.xml +++ b/xml/System.Windows.Forms/ProfessionalColorTable.xml @@ -860,7 +860,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -896,7 +896,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -938,7 +938,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -980,7 +980,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -1022,7 +1022,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -1064,7 +1064,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> diff --git a/xml/System.Windows.Forms/ProfessionalColors.xml b/xml/System.Windows.Forms/ProfessionalColors.xml index f8c748e4adc..12281a0c690 100644 --- a/xml/System.Windows.Forms/ProfessionalColors.xml +++ b/xml/System.Windows.Forms/ProfessionalColors.xml @@ -706,7 +706,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -742,7 +742,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -778,7 +778,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -814,7 +814,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -850,7 +850,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> @@ -886,7 +886,7 @@ must be set to `true` for this color to be displayed. + must be set to `true` for this color to be displayed. ]]> diff --git a/xml/System.Windows.Forms/ProgressBar.xml b/xml/System.Windows.Forms/ProgressBar.xml index 6398e395541..c592f48f2cb 100644 --- a/xml/System.Windows.Forms/ProgressBar.xml +++ b/xml/System.Windows.Forms/ProgressBar.xml @@ -64,19 +64,19 @@ The property determines the style of that is displayed. Note that the control can only be oriented horizontally. For an example of how to create a vertically oriented , see the class. The control is typically used when an application performs tasks such as copying files or printing documents. Users of an application might consider an application unresponsive if there is no visual cue. By using the in your application, you alert the user that the application is performing a lengthy task and that the application is still responding. - The and properties define the range of values to represent the progress of a task. The property is typically set to a value of 0, and the property is typically set to a value indicating the completion of a task. For example, to properly display the progress when copying a group of files, the property could be set to the total number of files to be copied. + The and properties define the range of values to represent the progress of a task. The property is typically set to a value of 0, and the property is typically set to a value indicating the completion of a task. For example, to properly display the progress when copying a group of files, the property could be set to the total number of files to be copied. The property represents the progress that the application has made toward completing the operation. The value displayed by the only approximates the current value of the property. Based on the size of the , the property determines when to display the next block or increase the size of the bar. - There are a number of ways to modify the value displayed by the other than changing the property directly. You can use the property to specify a specific value to increment the property by, and then call the method to increment the value. To vary the increment value, you can use the method and specify a value with which to increment the property. + There are a number of ways to modify the value displayed by the other than changing the property directly. You can use the property to specify a specific value to increment the property by, and then call the method to increment the value. To vary the increment value, you can use the method and specify a value with which to increment the property. > [!NOTE] -> and changes for the will not be honored when visual styles are enabled on Windows XP Home Edition, Windows XP Professional, Windows Server 2003 and above. +> and changes for the will not be honored when visual styles are enabled on Windows XP Home Edition, Windows XP Professional, Windows Server 2003 and above. ## Examples - The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example and that the method is called from another method or event in the . + The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example and that the method is called from another method or event in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ProgressBarOverview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBar/Overview/form1.cs" id="Snippet1"::: @@ -267,7 +267,7 @@ has no effect on the appearance of the . + Setting the has no effect on the appearance of the . ]]> @@ -314,7 +314,7 @@ has no effect on the appearance of the . + Setting the has no effect on the appearance of the . ]]> @@ -1063,14 +1063,14 @@ method enables you to increment the value of the progress bar by a specific amount. This method of incrementing the progress bar is similar to using the property with the method. The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in the `value` parameter, the property is less than the value of the property, the property remains at the value of the property. + The method enables you to increment the value of the progress bar by a specific amount. This method of incrementing the progress bar is similar to using the property with the method. The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in the `value` parameter, the property is less than the value of the property, the property remains at the value of the property. - Because a object whose style is set to displays a continuously scrolling bar instead of its , calling is unnecessary and will raise an . + Because a object whose style is set to displays a continuously scrolling bar instead of its , calling is unnecessary and will raise an . ## Examples - The following code example demonstrates how to use the method and the property to increment the value of a in the event of a . The example also displays the property in a to provide a textual representation of the . This example requires that you have a control, named `progressBar1`, and a control that contains a , named `statusBarPanel1`. The , named `time`, must be added to the form as a member. + The following code example demonstrates how to use the method and the property to increment the value of a in the event of a . The example also displays the property in a to provide a textual representation of the . This example requires that you have a control, named `progressBar1`, and a control that contains a , named `statusBarPanel1`. The , named `time`, must be added to the form as a member. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ProgressBar.Increment/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBar/Increment/form1.cs" id="Snippet1"::: @@ -1370,12 +1370,12 @@ ## Remarks This property specifies the upper limit of the property. When the value of the property is changed, the control is redrawn to reflect the new range of the control. When the value of the property is equal to the value of the property, the progress bar is completely filled. - You can use this property to specify a value to which the property must be set (by setting the property or using the or methods) to indicate that an operation is complete. For example, you can set the value of the property to the total number of files in a file copy operation. Each time a file is copied, the property can be increased by 1 until the total number of files is copied. At that point, the progress bar would be completely filled. + You can use this property to specify a value to which the property must be set (by setting the property or using the or methods) to indicate that an operation is complete. For example, you can set the value of the property to the total number of files in a file copy operation. Each time a file is copied, the property can be increased by 1 until the total number of files is copied. At that point, the progress bar would be completely filled. ## Examples - The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example and that the method is called from another method or event in the . + The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example and that the method is called from another method or event in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ProgressBarOverview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBar/Overview/form1.cs" id="Snippet1"::: @@ -1433,12 +1433,12 @@ property. When the value of the property is changed, the control is redrawn to reflect the new range of the control. When the value of the property is equal to the value of the property, the progress bar is empty. To change the value of the progress bar, use the property with the method, use the method, or set the value of the property directly. + This property specifies the lower limit of the property. When the value of the property is changed, the control is redrawn to reflect the new range of the control. When the value of the property is equal to the value of the property, the progress bar is empty. To change the value of the progress bar, use the property with the method, use the method, or set the value of the property directly. ## Examples - The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a , and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example, and that the method is called from another method or event in the . + The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a , and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example, and that the method is called from another method or event in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ProgressBarOverview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBar/Overview/form1.cs" id="Snippet1"::: @@ -1532,7 +1532,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1599,10 +1599,10 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. > [!NOTE] -> changes will not be honored when visual styles are enabled and the operating system supports visual styles. +> changes will not be honored when visual styles are enabled and the operating system supports visual styles. ]]> @@ -1679,7 +1679,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1729,7 +1729,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1906,16 +1906,16 @@ method increments the value of the progress bar by the amount specified by the property. You can use the property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you might want to set the value of the property to 1 and the value of the property to the total number of files to copy. When each file is copied, you can call the method to increment the progress bar by the value of the property. If you want to have more flexible control of the value of the progress bar, you can use the method or set the value of the property directly. + The method increments the value of the progress bar by the amount specified by the property. You can use the property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you might want to set the value of the property to 1 and the value of the property to the total number of files to copy. When each file is copied, you can call the method to increment the progress bar by the value of the property. If you want to have more flexible control of the value of the progress bar, you can use the method or set the value of the property directly. - The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in , the property is less than the value of the property, the property remains at the value of the property. + The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in , the property is less than the value of the property, the property remains at the value of the property. - Because a object whose style is set to displays a continuously scrolling bar instead of its , calling is unnecessary and will raise an . + Because a object whose style is set to displays a continuously scrolling bar instead of its , calling is unnecessary and will raise an . ## Examples - The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a , and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example, and that the method is called from another method or event in the . + The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a , and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example, and that the method is called from another method or event in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ProgressBarOverview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBar/Overview/form1.cs" id="Snippet1"::: @@ -1968,7 +1968,7 @@ to unless the method is overridden in a derived class. The method is useful when you create a designer for the control, or you are creating your own control that incorporates the . + Calling this method will reset the to unless the method is overridden in a derived class. The method is useful when you create a designer for the control, or you are creating your own control that incorporates the . ]]> @@ -2121,7 +2121,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ProgressBar1`. Then ensure that the event handler is associated with the event. @@ -2173,12 +2173,12 @@ property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you might want to set the value of the property to 1 and the value of the property to the total number of files to copy. When each file is copied, you can call the method to increment the progress bar by the value of the property. If you want to have more flexible control of the value of the progress bar, you can use the method or set the value of the property directly. + You can use the property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you might want to set the value of the property to 1 and the value of the property to the total number of files to copy. When each file is copied, you can call the method to increment the progress bar by the value of the property. If you want to have more flexible control of the value of the progress bar, you can use the method or set the value of the property directly. ## Examples - The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a , and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example, and that the method is called from another method or event in the . + The following code example uses a control to display the progress of a file copy operation. The example uses the and properties to specify a range for the that is equivalent to the number of files to copy. The code also uses the property with the method to increment the value of the as a file is copied. This example requires that you have a control created called `pBar1` that is created within a , and that there is a method created called `CopyFile` (that returns a Boolean value indicating the file copy operation was completed successfully) that performs the file copy operation. The code also requires that an array of strings containing the files to copy is created and passed to the `CopyWithProgress` method defined in the example, and that the method is called from another method or event in the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ProgressBarOverview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBar/Overview/form1.cs" id="Snippet1"::: @@ -2447,7 +2447,7 @@ , , and properties. + The return string includes the type and the values for the , , and properties. ]]> @@ -2498,12 +2498,12 @@ property are specified by the and properties. This property enables you to increment or decrement the value of the progress bar directly. To perform consistent increases in the value of the control you can use the property with the method. To increase the progress bar value by varying amounts, use the method. + The minimum and maximum values of the property are specified by the and properties. This property enables you to increment or decrement the value of the progress bar directly. To perform consistent increases in the value of the control you can use the property with the method. To increase the progress bar value by varying amounts, use the method. ## Examples - The following code example demonstrates how to use the method and the property to increment the value of a in the event of a . The example also displays the property in a to provide a textual representation of the . This example requires that you have a control, named `progressBar1`, and a control that contains a , named `statusBarPanel1`. The , named `time`, must be added to the form as a member. + The following code example demonstrates how to use the method and the property to increment the value of a in the event of a . The example also displays the property in a to provide a textual representation of the . This example requires that you have a control, named `progressBar1`, and a control that contains a , named `statusBarPanel1`. The , named `time`, must be added to the form as a member. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ProgressBar.Increment/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBar/Increment/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ProgressBarRenderer.xml b/xml/System.Windows.Forms/ProgressBarRenderer.xml index 7ed4b20569c..6397941ea6b 100644 --- a/xml/System.Windows.Forms/ProgressBarRenderer.xml +++ b/xml/System.Windows.Forms/ProgressBarRenderer.xml @@ -37,7 +37,7 @@ class provides a set of `static` methods that can be used to render a progress bar control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a progress bar, use the or methods to draw the empty bar, and then use the or methods to draw the elements that fill in the bar. + The class provides a set of `static` methods that can be used to render a progress bar control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a progress bar, use the or methods to draw the empty bar, and then use the or methods to draw the elements that fill in the bar. If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, the methods of this class will draw the progress bar with the current visual style. Otherwise, the methods and properties of this class will throw an . To determine whether the members of this class can be used, you can check the value of the property. @@ -46,7 +46,7 @@ ## Examples - The following code example demonstrates how to create a custom control that uses the and methods to draw a vertical progress bar. The control uses a to redraw the progress bar with an added piece each second. The `SetupProgressBar` method uses the and properties to calculate the height of each progressively larger rectangle that is drawn. + The following code example demonstrates how to create a custom control that uses the and methods to draw a vertical progress bar. The control uses a to redraw the progress bar with an added piece each second. The `SetupProgressBar` method uses the and properties to calculate the height of each progressively larger rectangle that is drawn. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProgressBarRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBarRenderer/Overview/form1.cs" id="Snippet0"::: @@ -95,7 +95,7 @@ ## Examples - The following code example uses the property to determine the size of each rectangle that represents an increment of the progress bar drawn by the method. This code example is part of a larger example provided for the class. + The following code example uses the property to determine the size of each rectangle that represents an increment of the progress bar drawn by the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProgressBarRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBarRenderer/Overview/form1.cs" id="Snippet4"::: @@ -151,7 +151,7 @@ ## Examples - The following code example uses the property to determine the size of each rectangle that represents an increment of the progress bar drawn by the method. This code example is part of a larger example provided for the class. + The following code example uses the property to determine the size of each rectangle that represents an increment of the progress bar drawn by the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProgressBarRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBarRenderer/Overview/form1.cs" id="Snippet4"::: @@ -255,7 +255,7 @@ and properties. + Each progress bar piece drawn by this method spans the height of the `bounds` parameter. The number of progress bar pieces drawn is determined by the width of `bounds` and the values returned by the and properties. Before using this method, you should verify that the property returns `true`. @@ -312,7 +312,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw an empty progress bar. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw an empty progress bar. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProgressBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBarRenderer/Overview/form1.cs" id="Snippet2"::: @@ -366,14 +366,14 @@ and . + Each progress bar piece drawn by this method spans the width of the `bounds` parameter. The number of progress bar pieces drawn is determined by the height of `bounds` and the values returned by and . Before using this method, you should verify that the property returns `true`. ## Examples - The following code example uses the method in a event handler to draw each increment of a progress bar. This code example is part of a larger example provided for the class. + The following code example uses the method in a event handler to draw each increment of a progress bar. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProgressBarRenderer/cpp/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBarRenderer/Overview/form1.cs" id="Snippet6"::: @@ -428,7 +428,7 @@ ## Examples - The following code example uses the property to determine whether to call the method. This code example is part of a larger example provided for the class. + The following code example uses the property to determine whether to call the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProgressBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ProgressBarRenderer/Overview/form1.cs" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/PropertyGrid+PropertyTabCollection.xml b/xml/System.Windows.Forms/PropertyGrid+PropertyTabCollection.xml index 6370c1d45dc..f838bff042b 100644 --- a/xml/System.Windows.Forms/PropertyGrid+PropertyTabCollection.xml +++ b/xml/System.Windows.Forms/PropertyGrid+PropertyTabCollection.xml @@ -80,11 +80,11 @@ The **Property** tab type to add to the grid. Adds a **Property** tab of the specified type to the collection. - value of `Global`. - + value of `Global`. + ]]> @@ -157,11 +157,11 @@ The scope of the tabs to clear. Removes all the **Property** tabs of the specified scope from the collection. - . - + . + ]]> The assigned value of the parameter is less than the value of . @@ -232,13 +232,13 @@ Returns an enumeration of all the **Property** tabs in the collection. An for the . - or to throw an exception. - - Two enumerators created from the same collection at the same time can contain different snapshots. Removing objects from the enumerator also removes them from the collection. - + or to throw an exception. + + Two enumerators created from the same collection at the same time can contain different snapshots. Removing objects from the enumerator also removes them from the collection. + ]]> @@ -308,11 +308,11 @@ The tab type to remove from the collection. Removes the specified tab type from the collection. - @@ -353,11 +353,11 @@ The first position in the specified array to receive copied contents. For a description of this member, see . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -393,11 +393,11 @@ to indicate the list is synchronized; otherwise . - instance is cast to an interface. - + instance is cast to an interface. + ]]> @@ -432,11 +432,11 @@ For a description of this member, see . An object that can be used to synchronize access to the underlying list. - instance is cast to an interface. - + instance is cast to an interface. + ]]> diff --git a/xml/System.Windows.Forms/PropertyGrid.xml b/xml/System.Windows.Forms/PropertyGrid.xml index d3f80d2a86c..bf0ccfa9b52 100644 --- a/xml/System.Windows.Forms/PropertyGrid.xml +++ b/xml/System.Windows.Forms/PropertyGrid.xml @@ -61,9 +61,9 @@ class on a parent control and set to the object to display the properties for. + To use the property grid, you create a new instance of the class on a parent control and set to the object to display the properties for. - The information displayed in the grid is a snapshot of the properties at the time the object is assigned. If a property value of the object specified by the is changed in code at run time, the new value is not displayed until an action is taken in the grid that causes the grid to refresh. + The information displayed in the grid is a snapshot of the properties at the time the object is assigned. If a property value of the object specified by the is changed in code at run time, the new value is not displayed until an action is taken in the grid that causes the grid to refresh. The property tabs within the property grid appear as buttons on the toolbar at the top of the , and can vary in scope as defined in the . @@ -78,7 +78,7 @@ The control is not initially presented in the toolbox in the development environment. You can add a property grid to the toolbox, which enables you to drag a onto your form. You can also define an instance of by adding the appropriate code in your source code. - All public properties of the will be displayed in the by default. You can hide a property so that it is not displayed in the control by decorating it with the and setting the value to `false`. You can specify the category that a property appears in by providing a category with the . You can provide descriptive text for your property that appears at the bottom of the control by using the . + All public properties of the will be displayed in the by default. You can hide a property so that it is not displayed in the control by decorating it with the and setting the value to `false`. You can specify the category that a property appears in by providing a category with the . You can provide descriptive text for your property that appears at the bottom of the control by using the . @@ -502,7 +502,7 @@ is `true` and the object has commands available. + This property is `true` if is `true` and the object has commands available. ]]> @@ -1255,10 +1255,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the destructor of . +> Always call before you release your last reference to the . Otherwise, the resources the is using will not be freed until garbage collection calls the destructor of . ]]> @@ -1636,7 +1636,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -1696,7 +1696,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -1756,7 +1756,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -2144,7 +2144,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2188,7 +2188,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2267,7 +2267,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2312,7 +2312,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2391,7 +2391,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2436,7 +2436,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2481,7 +2481,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2536,7 +2536,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2581,7 +2581,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2625,7 +2625,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2670,7 +2670,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2715,7 +2715,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2760,7 +2760,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2805,7 +2805,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2850,7 +2850,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2895,7 +2895,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2940,7 +2940,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3125,9 +3125,9 @@ property, the appearance of the property sort buttons on the grid changes to reflect the current state of the property. Setting to causes the properties to be displayed in the order they were retrieved. + When you set the property, the appearance of the property sort buttons on the grid changes to reflect the current state of the property. Setting to causes the properties to be displayed in the order they were retrieved. - Setting to both and is the same as setting to alone. The categorized view is always shown as alphabetical. + Setting to both and is the same as setting to alone. The categorized view is always shown as alphabetical. > [!NOTE] > To do custom sorting, implement on the component to return the properties in the desired order. @@ -3135,7 +3135,7 @@ ## Examples - The following code example demonstrates initializing a control using the , properties. In addition, this example sets the control's property to `false` so the grid will not be visible when the example is run. To run this example paste the following code in a form and call the `InitializePropertyGrid` method from the form's constructor or event-handling method. To view the property grid when the form is running, change the grid's property to `true`, recompile, and rerun the form. + The following code example demonstrates initializing a control using the , properties. In addition, this example sets the control's property to `false` so the grid will not be visible when the example is run. To run this example paste the following code in a form and call the `InitializePropertyGrid` method from the form's constructor or event-handling method. To view the property grid when the form is running, change the grid's property to `true`, recompile, and rerun the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PropertyGridExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+ObjectCollection/Add/form1.cs" id="Snippet2"::: @@ -3188,7 +3188,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -3241,7 +3241,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -3345,7 +3345,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -3421,7 +3421,7 @@ method first deletes the property tabs of the specified scope, it then requires the objects and documents to rebuild the tabs. + The method first deletes the property tabs of the specified scope, it then requires the objects and documents to rebuild the tabs. ]]> @@ -3486,7 +3486,7 @@ method is invoked by right clicking on the property. This method discards changes and attempts to reset the property to its default value. + Typically, the method is invoked by right clicking on the property. This method discards changes and attempts to reset the property to its default value. ]]> @@ -3590,7 +3590,7 @@ corresponds to a property of the . + Each corresponds to a property of the . You can use the returned to view type information, the , the parent, and the children of the selected object. @@ -3640,7 +3640,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -3812,7 +3812,7 @@ only displays the properties that are common to all the objects that are in the array. Assigning an array to the replaces the reference to any you might make. + The only displays the properties that are common to all the objects that are in the array. Assigning an array to the replaces the reference to any you might make. ]]> @@ -3861,7 +3861,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -4410,7 +4410,7 @@ This member is an explicit interface member implementation. It can be used only ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - Visual Studio 2005 saves some of the control states, such as the and properties, to the registry and loads them the next time the user runs the application. + Visual Studio 2005 saves some of the control states, such as the and properties, to the registry and loads them the next time the user runs the application. ]]> @@ -4463,7 +4463,7 @@ This member is an explicit interface member implementation. It can be used only ## Remarks This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. - Visual Studio 2005 saves some of the control states, such as the and properties, to the registry and loads them the next time the user runs the application. + Visual Studio 2005 saves some of the control states, such as the and properties, to the registry and loads them the next time the user runs the application. ]]> @@ -4554,7 +4554,7 @@ This member is an explicit interface member implementation. It can be used only ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. @@ -4607,7 +4607,7 @@ This member is an explicit interface member implementation. It can be used only control using the , properties. In addition, this example sets the control's property to `false` so the grid will not be visible when the example is run. To run this example paste the following code in a form and call the `InitializePropertyGrid` method from the form's constructor or event-handling method. To view the property grid when the form is running, change the grid's property to `true`, recompile, and rerun the form. + The following code example demonstrates initializing a control using the , properties. In addition, this example sets the control's property to `false` so the grid will not be visible when the example is run. To run this example paste the following code in a form and call the `InitializePropertyGrid` method from the form's constructor or event-handling method. To view the property grid when the form is running, change the grid's property to `true`, recompile, and rerun the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.PropertyGridExample/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox+ObjectCollection/Add/form1.cs" id="Snippet2"::: @@ -4692,7 +4692,7 @@ This member is an explicit interface member implementation. It can be used only ## Remarks The `UseCompatibleTextRendering` property is intended to provide visual compatibility between Windows Forms controls that render text using the class and .NET Framework 1.0 and .NET Framework 1.1 applications that perform custom text rendering using the class. In most cases, it's recommended that you leave `UseCompatibleTextRendering` set to the default value of `false`. -You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. +You can set the `UseCompatibleTextRendering` property to `true` for a specific control. To set `UseCompatibleTextRendering` to `true` for all supported controls in the application, call the method with a parameter of `true`. ]]> diff --git a/xml/System.Windows.Forms/PropertyManager.xml b/xml/System.Windows.Forms/PropertyManager.xml index 45dfaec1ac6..b10af13687b 100644 --- a/xml/System.Windows.Forms/PropertyManager.xml +++ b/xml/System.Windows.Forms/PropertyManager.xml @@ -34,7 +34,7 @@ inherits from the , and it is used to maintain the current property of an object, rather than the property of a current object in a list. For this reason, trying to set the or property for a has no effect. Similarly, the and methods are not supported because there is no underlying list of data to add to or delete from. In addition, a call to will always return `false` if the has a data source, regardless of whether has been called. + The inherits from the , and it is used to maintain the current property of an object, rather than the property of a current object in a list. For this reason, trying to set the or property for a has no effect. Similarly, the and methods are not supported because there is no underlying list of data to add to or delete from. In addition, a call to will always return `false` if the has a data source, regardless of whether has been called. ]]> @@ -509,7 +509,7 @@ and are two methods that allow the temporary suspension and resumption of data binding. You typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. A call to will always return `false` if the has a data source, regardless of whether has been called. + and are two methods that allow the temporary suspension and resumption of data binding. You typically suspend data binding if the user must be allowed to make several edits to data fields before validation occurs. For example, if one field must be changed in accordance with a second, but where validating the first field would cause the second field to be in error. A call to will always return `false` if the has a data source, regardless of whether has been called. ]]> diff --git a/xml/System.Windows.Forms/PropertyTabChangedEventArgs.xml b/xml/System.Windows.Forms/PropertyTabChangedEventArgs.xml index 2324226d72d..adb2d8b8650 100644 --- a/xml/System.Windows.Forms/PropertyTabChangedEventArgs.xml +++ b/xml/System.Windows.Forms/PropertyTabChangedEventArgs.xml @@ -35,25 +35,25 @@ Provides data for the event of a . - event occurs when the user selects a new property tab in the . - - A provides data on the old tab and new tab being selected. - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event occurs when the user selects a new property tab in the . + + A provides data on the old tab and new tab being selected. + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet531"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet531"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet531"::: + ]]> @@ -132,16 +132,16 @@ Gets the new selected. The newly selected . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet531"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet531"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet531"::: + ]]> @@ -181,16 +181,16 @@ Gets the old selected. The old that was selected. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet531"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet531"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet531"::: + ]]> diff --git a/xml/System.Windows.Forms/PropertyValueChangedEventArgs.xml b/xml/System.Windows.Forms/PropertyValueChangedEventArgs.xml index c2deb0a93b0..ad42cce9aff 100644 --- a/xml/System.Windows.Forms/PropertyValueChangedEventArgs.xml +++ b/xml/System.Windows.Forms/PropertyValueChangedEventArgs.xml @@ -35,23 +35,23 @@ Provides data for the event of a . - event occurs when the user changes the value of a property, which is specified as a , in a . - - For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event occurs when the user changes the value of a property, which is specified as a , in a . + + For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet530"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet530"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet530"::: + ]]> @@ -130,16 +130,16 @@ Gets the that was changed. A in the . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet530"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet530"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet530"::: + ]]> @@ -179,21 +179,21 @@ The value of the grid item before it was changed. A object representing the old value of the property. - . - - - -## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + . + + + +## Examples + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet530"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet530"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet530"::: + ]]> diff --git a/xml/System.Windows.Forms/QueryAccessibilityHelpEventArgs.xml b/xml/System.Windows.Forms/QueryAccessibilityHelpEventArgs.xml index 9c31d9a2c4a..4110c356a35 100644 --- a/xml/System.Windows.Forms/QueryAccessibilityHelpEventArgs.xml +++ b/xml/System.Windows.Forms/QueryAccessibilityHelpEventArgs.xml @@ -38,7 +38,7 @@ class exposes a public event. You can use the properties of the class to return custom help for a particular control to an accessible client, such as a screen reader. When you handle the event, you must set the values of the , , and properties to appropriate values. + The class exposes a public event. You can use the properties of the class to return custom help for a particular control to an accessible client, such as a screen reader. When you handle the event, you must set the values of the , , and properties to appropriate values. > [!NOTE] > The property should be a string representation of a numeric Help topic ID. @@ -46,7 +46,7 @@ ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This example demonstrates using the class with the event. See the class overview for the complete code example. @@ -184,7 +184,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -238,7 +238,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -292,7 +292,7 @@ and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This example demonstrates using the class with the event. See the class overview for the complete code example. diff --git a/xml/System.Windows.Forms/QueryAccessibilityHelpEventHandler.xml b/xml/System.Windows.Forms/QueryAccessibilityHelpEventHandler.xml index 24fe7fbb276..73875069105 100644 --- a/xml/System.Windows.Forms/QueryAccessibilityHelpEventHandler.xml +++ b/xml/System.Windows.Forms/QueryAccessibilityHelpEventHandler.xml @@ -41,22 +41,22 @@ A that contains the event data. Represents the method that will handle the event of a control. - 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/). - - - -## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not include any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - - This code demonstrates using the delegate with the event. For the complete code example, see . - + 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/). + + + +## Examples + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not include any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + + This code demonstrates using the delegate with the event. For the complete code example, see . + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Windows.Forms/QueryContinueDragEventArgs.xml b/xml/System.Windows.Forms/QueryContinueDragEventArgs.xml index b1f710ea527..be2e745e2f0 100644 --- a/xml/System.Windows.Forms/QueryContinueDragEventArgs.xml +++ b/xml/System.Windows.Forms/QueryContinueDragEventArgs.xml @@ -36,14 +36,14 @@ ## Remarks The event occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled. A specifies whether and how the drag-and-drop operation should proceed, whether any modifier keys are pressed, and whether the user has pressed the ESC key. - By default, the event sets to if the ESC key was pressed and sets `Action` to if the left, middle, or right mouse button is pressed. + By default, the event sets to if the ESC key was pressed and sets `Action` to if the left, middle, or right mouse button is pressed. For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - This code excerpt demonstrates using the class with the event. See the method for the complete code example. + This code excerpt demonstrates using the class with the event. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet6"::: @@ -139,12 +139,12 @@ event sets to if the ESC key was pressed and sets `Action` to if the left, middle, or right mouse button is pressed. + By default, the event sets to if the ESC key was pressed and sets `Action` to if the left, middle, or right mouse button is pressed. ## Examples - This code excerpt demonstrates using the class with the event. See the method for the complete code example. + This code excerpt demonstrates using the class with the event. See the method for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet6"::: @@ -194,12 +194,12 @@ event sets to if is true. + By default, the event sets to if is true. ## Examples - The following code example demonstrates the use of the . In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of the . In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. @@ -261,12 +261,12 @@ |16|The middle mouse button.| |32|The ALT key.| - By default, the event sets to if indicates that the left, middle, or right mouse button is pressed. + By default, the event sets to if indicates that the left, middle, or right mouse button is pressed. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/QueryContinueDragEventHandler.xml b/xml/System.Windows.Forms/QueryContinueDragEventHandler.xml index 5ba3f0d5694..bd2a86dde8e 100644 --- a/xml/System.Windows.Forms/QueryContinueDragEventHandler.xml +++ b/xml/System.Windows.Forms/QueryContinueDragEventHandler.xml @@ -41,28 +41,28 @@ A that contains the event data. Represents the method that will handle the event of a . - 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. - - The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. - - The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . - - The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. - - This code excerpt demonstrates using the delegate with the event. See the method for the complete code example. - + 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 handling events with delegates, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following example demonstrates a drag-and-drop operation between two controls. The example calls the method when the drag action starts. The drag action starts if the mouse has moved more than from the mouse location during the event. The method is used to determine the index of the item to drag during the `MouseDown` event. + + The example also demonstrates using custom cursors for the drag-and-drop operation. The example assumes that two cursor files, `3dwarro.cur` and `3dwno.cur`, exist in the application directory, for the custom drag and no-drop cursors, respectively. The custom cursors will be used if the `UseCustomCursorsCheck` is checked. The custom cursors are set in the event handler. + + The keyboard state is evaluated in the event handler for the right `ListBox`, to determine what the drag operation will be based upon state of the SHIFT, CTRL, ALT, or CTRL+ALT keys. The location in the `ListBox` where the drop would occur is also determined during the `DragOver` event. If the data to drop is not a `String`, then the is set to . Finally, the status of the drop is displayed in the `DropLocationLabel` . + + The data to drop for the right `ListBox` is determined in the event handler and the `String` value is added at the appropriate place in the `ListBox`. If the drag operation moves outside the bounds of the form, then the drag-and-drop operation is canceled in the event handler. + + This code excerpt demonstrates using the delegate with the event. See the method for the complete code example. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.DoDragDrop/CPP/form1.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Control/DoDragDrop/form11.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Control/DoDragDrop/form11.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Windows.Forms/QuestionEventArgs.xml b/xml/System.Windows.Forms/QuestionEventArgs.xml index 1b6e52eb5a2..f1ff39aab93 100644 --- a/xml/System.Windows.Forms/QuestionEventArgs.xml +++ b/xml/System.Windows.Forms/QuestionEventArgs.xml @@ -32,7 +32,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. @@ -159,7 +159,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `DataGridView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/RadioButton+RadioButtonAccessibleObject.xml b/xml/System.Windows.Forms/RadioButton+RadioButtonAccessibleObject.xml index 3a66785ea20..99bc49b94e1 100644 --- a/xml/System.Windows.Forms/RadioButton+RadioButtonAccessibleObject.xml +++ b/xml/System.Windows.Forms/RadioButton+RadioButtonAccessibleObject.xml @@ -46,9 +46,9 @@ ## Remarks Windows Forms has accessibility support built in and provides information about your application that allows it to work with accessibility client applications. Examples of accessibility client applications are screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. The class inherits from the class to provide information about the control to accessibility client applications. - There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. + There are instances when you will want to provide custom information, such as a control's name or description, to accessibility client applications. There are two ways of providing this information. To provide limited accessibility information for existing controls, set the control's , , , and property values, which will be reported to accessibility client applications. - If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. + If you require more accessibility information to be included with your control, you can write your own class that is derived from the or classes. For example, if you are writing your own control that is not derived from the common controls, or you require such operations as hit testing within your control, you should create a for your control by calling the method. ]]> diff --git a/xml/System.Windows.Forms/RadioButton.xml b/xml/System.Windows.Forms/RadioButton.xml index ae0ea8d695d..10246e8b97f 100644 --- a/xml/System.Windows.Forms/RadioButton.xml +++ b/xml/System.Windows.Forms/RadioButton.xml @@ -179,7 +179,7 @@ value is set to , then the control is drawn with a circular check box. If the value is set to , then the is drawn as a control that can be toggled to an up or down state. Either type can display text, an image, or both. + If the value is set to , then the control is drawn with a circular check box. If the value is set to , then the is drawn as a control that can be toggled to an up or down state. Either type can display text, an image, or both. @@ -237,7 +237,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RadioButton1`. Then ensure that the event handler is associated with the event. @@ -291,7 +291,7 @@ value is set to `false`, the portion of the control must be checked in code in the event handler. In addition, if the is part of a control group, this property ensures that only one of the controls is checked at a given time. + If the value is set to `false`, the portion of the control must be checked in code in the event handler. In addition, if the is part of a control group, this property ensures that only one of the controls is checked at a given time. If the property is set to `false`, a group of controls will not act as a mutually exclusive group and the property must be updated in code. @@ -356,7 +356,7 @@ property can be changed at run time. The check box portion of a is moved to the right or left of the text when the value changes. This example requires that a control has been instantiated on a form and that a reference to the namespace has been included. + The following code example demonstrates how the property can be changed at run time. The check box portion of a is moved to the right or left of the text when the value changes. This example requires that a control has been instantiated on a form and that a reference to the namespace has been included. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RadioButton.CheckAlign Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButton/CheckAlign/source.cs" id="Snippet1"::: @@ -417,7 +417,7 @@ selection and the property of a . When a specified item is selected from the list box, the method of another is called. This example requires that two controls and a have been instantiated on a form. + The following code example evaluates a selection and the property of a . When a specified item is selected from the list box, the method of another is called. This example requires that two controls and a have been instantiated on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RadioButton.Checked Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButton/Checked/source.cs" id="Snippet1"::: @@ -469,7 +469,7 @@ ## Examples - The following code example demonstrates how the property can be changed at run time. The check box portion of a is moved to the right or left of the text when the value changes. This example requires that a control has been instantiated on a form and that a reference to the namespace has been included. + The following code example demonstrates how the property can be changed at run time. The check box portion of a is moved to the right or left of the text when the value changes. This example requires that a control has been instantiated on a form and that a reference to the namespace has been included. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RadioButton.CheckAlign Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButton/CheckAlign/source.cs" id="Snippet1"::: @@ -513,7 +513,7 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the assembly installed with the .NET Framework. @@ -722,12 +722,12 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how the property can be changed at run time. The check box portion of a is moved to the right or left of the text when the value changes. This example requires that a control has been instantiated on a form and that a reference to the namespace has been included. + The following code example demonstrates how the property can be changed at run time. The check box portion of a is moved to the right or left of the text when the value changes. This example requires that a control has been instantiated on a form and that a reference to the namespace has been included. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RadioButton.OnCheckedChanged Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButton/OnCheckedChanged/source.cs" id="Snippet1"::: @@ -893,7 +893,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -934,7 +934,7 @@ selection and the property of a . When a specified item is selected from the list box, the method of another is called. This example requires that two controls and a have been instantiated on a form. + The following code example evaluates a selection and the property of a . When a specified item is selected from the list box, the method of another is called. This example requires that two controls and a have been instantiated on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RadioButton.Checked Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButton/Checked/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/RadioButtonRenderer.xml b/xml/System.Windows.Forms/RadioButtonRenderer.xml index 6100b90e7e6..92e445068ad 100644 --- a/xml/System.Windows.Forms/RadioButtonRenderer.xml +++ b/xml/System.Windows.Forms/RadioButtonRenderer.xml @@ -37,16 +37,16 @@ class provides a set of `static` methods that can be used to render an option button control. Rendering a control refers to drawing the user interface of a control. To draw an option button, use one of the methods. These methods provide a variety of options, such as drawing text or an image with the option button. + The class provides a set of `static` methods that can be used to render an option button control. Rendering a control refers to drawing the user interface of a control. To draw an option button, use one of the methods. These methods provide a variety of options, such as drawing text or an image with the option button. - If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the option button with the current visual style. Otherwise, will draw the option button with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. + If visual styles are enabled in the operating system and visual styles are applied to the current application, will draw the option button with the current visual style. Otherwise, will draw the option button with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system. This class wraps the functionality of a that is set to one of the elements exposed by the class. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). ## Examples - The following code example demonstrates how to write a custom control that uses the method to draw an option button that responds to mouse clicks. + The following code example demonstrates how to write a custom control that uses the method to draw an option button that responds to mouse clicks. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RadioButtonRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButtonRenderer/Overview/form1.cs" id="Snippet0"::: @@ -222,7 +222,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw an option button in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw an option button in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RadioButtonRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButtonRenderer/Overview/form1.cs" id="Snippet4"::: @@ -488,7 +488,7 @@ ## Examples - The following code example uses the method to determine the bounds of the option button text. This code example is part of a larger example provided for the class. + The following code example uses the method to determine the bounds of the option button text. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RadioButtonRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RadioButtonRenderer/Overview/form1.cs" id="Snippet2"::: @@ -574,7 +574,7 @@ property is `true`, the uses the setting from the property to determine the rendering style. If is `false`, the renderer will always render using visual styles. + If the property is `true`, the uses the setting from the property to determine the rendering style. If is `false`, the renderer will always render using visual styles. diff --git a/xml/System.Windows.Forms/RetrieveVirtualItemEventArgs.xml b/xml/System.Windows.Forms/RetrieveVirtualItemEventArgs.xml index 935ec1e41e0..f2e96e0eb40 100644 --- a/xml/System.Windows.Forms/RetrieveVirtualItemEventArgs.xml +++ b/xml/System.Windows.Forms/RetrieveVirtualItemEventArgs.xml @@ -33,7 +33,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -125,7 +125,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -172,7 +172,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/RichTextBox.xml b/xml/System.Windows.Forms/RichTextBox.xml index 15b3eb12df6..dffe5305153 100644 --- a/xml/System.Windows.Forms/RichTextBox.xml +++ b/xml/System.Windows.Forms/RichTextBox.xml @@ -56,9 +56,9 @@ ## Remarks With the control, the user can enter and edit text. The control also provides more advanced formatting features than the standard control. Text can be assigned directly to the control, or can be loaded from a rich text format (RTF) or plain text file. The text within the control can be assigned character and paragraph formatting. - The control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Once a setting has been made to a selected section of text, all text entered after the selection is also formatted with the same settings until a setting change is made or a different section of the control's document is selected. The property enables you to make text bold or italic. You can also use this property to change the size and typeface of the text. The property enables you to change the color of the text. To create bulleted lists you can use the property. You can also adjust paragraph formatting by setting the , , and properties. + The control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Once a setting has been made to a selected section of text, all text entered after the selection is also formatted with the same settings until a setting change is made or a different section of the control's document is selected. The property enables you to make text bold or italic. You can also use this property to change the size and typeface of the text. The property enables you to change the color of the text. To create bulleted lists you can use the property. You can also adjust paragraph formatting by setting the , , and properties. - The control provides methods that provide functionality for opening and saving files. The method enables you to load an existing RTF or ASCII text file into the control. You can also load data from an already opened data stream. The enables you to save a file to RTF or ASCII text. Similar to the method, you can also use the method to save to an open data stream. The control also provides features for finding strings of text. The method is overloaded to find both strings of text as well as specific characters within the text of the control. + The control provides methods that provide functionality for opening and saving files. The method enables you to load an existing RTF or ASCII text file into the control. You can also load data from an already opened data stream. The enables you to save a file to RTF or ASCII text. Similar to the method, you can also use the method to save to an open data stream. The control also provides features for finding strings of text. The method is overloaded to find both strings of text as well as specific characters within the text of the control. You can also initialize the control to data stored in memory. For example, you can initialize the property to a string that contains the text to display, including the RTF codes that determine how the text should be formatted. @@ -67,7 +67,7 @@ Applications that already use controls can easily be adapted to make use of controls. However, the control does not have the same 64K character capacity limit of the control. The is typically used to provide text manipulation and display features similar to word processing applications such as Microsoft Word. > [!NOTE] -> The method does not work with the or events. +> The method does not work with the or events. @@ -165,7 +165,7 @@ control that contains items to drop into a control. The constructor of the form sets the property to `true` to enable drag-and-drop operations to occur in the . The example uses the event of the to start the drag operation by calling the method. The example uses the event to determine if an item being dragged into the is a valid data type. The event performs the actual dropping of a dragged item into the control at the current cursor location within the . This example requires that the and events have been connected to the event handlers defined in the example. + The following code example demonstrates how to perform drag-and-drop operations using a control that contains items to drop into a control. The constructor of the form sets the property to `true` to enable drag-and-drop operations to occur in the . The example uses the event of the to start the drag operation by calling the method. The example uses the event to determine if an item being dragged into the is a valid data type. The event performs the actual dropping of a dragged item into the control at the current cursor location within the . This example requires that the and events have been connected to the event handlers defined in the example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.AllowDrop/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/IndexFromPoint/form1.cs" id="Snippet1"::: @@ -542,7 +542,7 @@ ## Examples - The following code example demonstrates how to use the property with the , , , and properties to create a bulleted list in a control. This example requires that a control named `richTextBox1` is created on a form. + The following code example demonstrates how to use the property with the , , , and properties to create a bulleted list in a control. This example requires that a control named `richTextBox1` is created on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.BulletIndent/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/BulletIndent/form1.cs" id="Snippet1"::: @@ -595,7 +595,7 @@ ## Examples - The following code example demonstrates how to use the method to paste a bitmap into the control. After opening a bitmap from file, the example uses the method to copy the bitmap to the Windows clipboard. Finally, the example retrieves the format for the object, uses the method to verify that the format can be pasted into the control, and then uses the method to paste the data. + The following code example demonstrates how to use the method to paste a bitmap into the control. After opening a bitmap from file, the example uses the method to copy the bitmap to the Windows clipboard. Finally, the example retrieves the format for the object, uses the method to verify that the format can be pasted into the control, and then uses the method to paste the data. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichText_Paste/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/CanPaste/form1.cs" id="Snippet1"::: @@ -649,12 +649,12 @@ can be reapplied using the method. + You can use this property to determine whether the last operation undone in the can be reapplied using the method. ## Examples - The following code example demonstrates how to use the and properties, and the method, to restrict a redo operation to any action except the deletion of text. This example requires that you have a form that contains a control and that an operation within the has been performed and undone before the code in this example is called. + The following code example demonstrates how to use the and properties, and the method, to restrict a redo operation to any action except the deletion of text. This example requires that you have a form that contains a control and that an operation within the has been performed and undone before the code in this example is called. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.RedoAction/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/CanRedo/form1.cs" id="Snippet1"::: @@ -707,7 +707,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. @@ -886,7 +886,7 @@ ## Examples - The following code example contains an event handler for the event. The event handler processes link clicks within the document of a control and launches an instance of the default browser (using the method), displaying the page for the link that was clicked. This example requires that the event handler has been connected to the event for a . + The following code example contains an event handler for the event. The event handler processes link clicks within the document of a control and launches an instance of the default browser (using the method), displaying the page for the link that was clicked. This example requires that the event handler has been connected to the event for a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RichTextBox.LinkClicked Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/DetectUrls/source.cs" id="Snippet1"::: @@ -1022,7 +1022,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. @@ -1268,9 +1268,9 @@ method searches for the first instance of a character from a list of characters specified in the `characterSet` parameter and returns the location of the character. For example, you pass an array of characters containing the character 'Q'. If the control contained the text "The Quick Brown Fox", the method would return the value of four. An upper case character and a lower case character are considered different values in the search. + This version of the method searches for the first instance of a character from a list of characters specified in the `characterSet` parameter and returns the location of the character. For example, you pass an array of characters containing the character 'Q'. If the control contained the text "The Quick Brown Fox", the method would return the value of four. An upper case character and a lower case character are considered different values in the search. - If the property returns a negative value, the characters being searched for were not found within the contents of the control. You can use this method to search for a group of characters within the control. This version of the method requires that the entire document contained in the control is searched for the characters. If a character from the character list provided in the method's `characterSet` parameter is found, the value returned by this method is a zero-based index of the character's position in the control. A space is considered a character by the method when determining the location of a character. + If the property returns a negative value, the characters being searched for were not found within the contents of the control. You can use this method to search for a group of characters within the control. This version of the method requires that the entire document contained in the control is searched for the characters. If a character from the character list provided in the method's `characterSet` parameter is found, the value returned by this method is a zero-based index of the character's position in the control. A space is considered a character by the method when determining the location of a character. @@ -1326,10 +1326,10 @@ method searches for the text specified in the `str` parameter and returns the location of the first character within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you could use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. + The method searches for the text specified in the `str` parameter and returns the location of the first character within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you could use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. > [!NOTE] -> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). +> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). @@ -1387,11 +1387,11 @@ method searches for the first instance of a character from a list of characters specified in the `characterSet` parameter and returns the location the character. For example, you pass an array of characters containing the character 'Q'. If the control contained the text "The Quick Brown Fox", the method would return the value of four. An upper case character and a lower case character are considered different values in the search. + This version of the method searches for the first instance of a character from a list of characters specified in the `characterSet` parameter and returns the location the character. For example, you pass an array of characters containing the character 'Q'. If the control contained the text "The Quick Brown Fox", the method would return the value of four. An upper case character and a lower case character are considered different values in the search. If the property returns a negative value, the characters being searched for were not found within the contents of the control. You can use this method to search for a group of characters within the control. If a character from the character list provided in the method's `characterSet` parameter is found, the value returned by this method is a zero-based index of the character's position in the control. A space is considered a character by the method when determining the location of a character. - This version of the method enables you to search for a character set from a specified start position within the text of the control by specifying a value for the `start` parameter. A value of zero indicates that the search should start from the beginning of the control's document. You can use this version of the method to narrow your search to avoid text that you already know does not contain the specified characters you are searching for or are not important in your search. + This version of the method enables you to search for a character set from a specified start position within the text of the control by specifying a value for the `start` parameter. A value of zero indicates that the search should start from the beginning of the control's document. You can use this version of the method to narrow your search to avoid text that you already know does not contain the specified characters you are searching for or are not important in your search. @@ -1449,12 +1449,12 @@ method searches for the text specified in the `str` parameter and returns the location of the first character within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you can use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. + The method searches for the text specified in the `str` parameter and returns the location of the first character within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you can use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. - With this version of the method, you can specify options that enable you to expand or narrow your search. You can specify options that enable you to match the casing of the search word or to search for entire words instead of partial words. By specifying the `RichTextBoxFinds.Reverse` enumeration in the `options` parameter, you can search for text from the bottom of the document to the top instead of the default top to bottom search method. + With this version of the method, you can specify options that enable you to expand or narrow your search. You can specify options that enable you to match the casing of the search word or to search for entire words instead of partial words. By specifying the `RichTextBoxFinds.Reverse` enumeration in the `options` parameter, you can search for text from the bottom of the document to the top instead of the default top to bottom search method. > [!NOTE] -> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). +> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). @@ -1508,11 +1508,11 @@ method searches for the first instance of a character from a list of characters specified in the `characterSet` parameter and returns the location of the character. For example, you pass an array of characters containing the character 'Q'. If the control contained the text "The Quick Brown Fox", the method would return the value of four. An upper case character and a lower case character are considered different values in the search. + This version of the method searches for the first instance of a character from a list of characters specified in the `characterSet` parameter and returns the location of the character. For example, you pass an array of characters containing the character 'Q'. If the control contained the text "The Quick Brown Fox", the method would return the value of four. An upper case character and a lower case character are considered different values in the search. If the property returns a negative value, the characters being searched for were not found within the contents of the control. You can use this method to search for a group of characters within the control. If a character from the character list provided in the method's `characterSet` parameter is found, the value returned by this method is a zero based index of the character's position in the control. A space is considered a character by the method when determining the location of a character. - This version of the method enables you to search for a character set from a range of text in the control by specifying a value for the `start` and `end` parameters. A value of zero for the `start` parameter indicates that the search should start from the beginning of the control's document. A -1 value for the `end` parameter indicates that the search should end at the end of the text within the control. You can use this version of the method to narrow your search to a specific range of text within the control to avoid searching areas of the document that are not important to the needs of your application. + This version of the method enables you to search for a character set from a range of text in the control by specifying a value for the `start` and `end` parameters. A value of zero for the `start` parameter indicates that the search should start from the beginning of the control's document. A -1 value for the `end` parameter indicates that the search should end at the end of the text within the control. You can use this version of the method to narrow your search to a specific range of text within the control to avoid searching areas of the document that are not important to the needs of your application. ]]> @@ -1567,12 +1567,12 @@ method searches for the text specified in the `str` parameter and returns the location of the first character of the search string within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you could use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. + The method searches for the text specified in the `str` parameter and returns the location of the first character of the search string within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you could use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. - With this version of the method, you can specify options that enable you to expand or narrow your search. You can specify options that enable you to match the casing of the search word or to search for entire words instead of partial words. By specifying the `RichTextBoxFinds.Reverse` enumeration in the `options` parameter, you can search for text from the bottom of the document to the top instead of the default top to bottom search method. This version of the method also enables you to narrow the search for text by selecting a specific starting position within the control's text. This feature can enable you to avoid text that might have already been searched or where the specific text you are searching for is known not to exist. When the `RichTextBoxFinds.Reverse` value is specified in the `options` parameter, the value of the `start` parameter indicates the position where the reverse search will end since the search will start at the bottom of the document when using this version of the method. + With this version of the method, you can specify options that enable you to expand or narrow your search. You can specify options that enable you to match the casing of the search word or to search for entire words instead of partial words. By specifying the `RichTextBoxFinds.Reverse` enumeration in the `options` parameter, you can search for text from the bottom of the document to the top instead of the default top to bottom search method. This version of the method also enables you to narrow the search for text by selecting a specific starting position within the control's text. This feature can enable you to avoid text that might have already been searched or where the specific text you are searching for is known not to exist. When the `RichTextBoxFinds.Reverse` value is specified in the `options` parameter, the value of the `start` parameter indicates the position where the reverse search will end since the search will start at the bottom of the document when using this version of the method. > [!NOTE] -> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). +> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). @@ -1628,17 +1628,17 @@ method searches for the text specified in the `str` parameter and returns the location of the first character of the search string within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you can use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. + The method searches for the text specified in the `str` parameter and returns the location of the first character of the search string within the control. If the property returns a negative value, the text string being searched for was not found within the contents of the control. You can use this method to create search functionality that can be provided to the user of the control. You can also use this method to search for text to be replaced with a specific format. For example, if the user entered dates into the control, you can use the method to search for all dates in the document and replace them with the appropriate format before using the method of the control. - With this version of the method, you can specify options that enable you to expand or narrow your search. You can specify options that enable you to match the casing of the search word or to search for entire words instead of partial words. By specifying the `RichTextBoxFinds.Reverse` enumeration in the `options` parameter, you can search for text from the bottom of the document to the top instead of the default top to bottom search method. This version of the method also enables you to narrow the search for text by selecting a specific start and end position within the control's text. This feature can enable you to limit the search range to a specific section of the control's text. If a value of negative one (-1) is assigned to the `end` parameter, the method will search until the end of the text in the for normal searches. For reverse searches, a value of negative one (-1) assigned to the `end` parameter indicates that text will be searched from the end of text (bottom) to the position defined by `start` parameter. When the `start` and `end` parameters are provided the same value the entire control is searched for normal searches. For a reverse search, the entire control is searched but the search begins at the bottom of the document and searches to the top of the document. + With this version of the method, you can specify options that enable you to expand or narrow your search. You can specify options that enable you to match the casing of the search word or to search for entire words instead of partial words. By specifying the `RichTextBoxFinds.Reverse` enumeration in the `options` parameter, you can search for text from the bottom of the document to the top instead of the default top to bottom search method. This version of the method also enables you to narrow the search for text by selecting a specific start and end position within the control's text. This feature can enable you to limit the search range to a specific section of the control's text. If a value of negative one (-1) is assigned to the `end` parameter, the method will search until the end of the text in the for normal searches. For reverse searches, a value of negative one (-1) assigned to the `end` parameter indicates that text will be searched from the end of text (bottom) to the position defined by `start` parameter. When the `start` and `end` parameters are provided the same value the entire control is searched for normal searches. For a reverse search, the entire control is searched but the search begins at the bottom of the document and searches to the top of the document. > [!NOTE] -> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). +> The methods that accept a `string` as a parameter cannot find text that is contained on more than one line of text within the . Performing such a search will return a value of negative one (-1). ## Examples - The following code example searches a section of text in a for the first instance of a search string passed into the `searchText` parameter of the method. The range to search for text within the control is specified by the `searchStart` and `searchEnd` parameters of the method. If the search string is found in the , the method returns the index location of the first character of the found text and highlights the found text; otherwise, it returns a value of -1. The example also uses the `options` parameter of the method to specify that the found text should match the case of the search string. The example requires that this method is placed in the class of a that contains a control named `richTextBox1`. After the first instance of the search string has been found, you can use this example to find other instances in the text. + The following code example searches a section of text in a for the first instance of a search string passed into the `searchText` parameter of the method. The range to search for text within the control is specified by the `searchStart` and `searchEnd` parameters of the method. If the search string is found in the , the method returns the index location of the first character of the found text and highlights the found text; otherwise, it returns a value of -1. The example also uses the `options` parameter of the method to specify that the found text should match the case of the search string. The example requires that this method is placed in the class of a that contains a control named `richTextBox1`. After the first instance of the search string has been found, you can use this example to find other instances in the text. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.FindStringStartEnd/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/Find/form12.cs" id="Snippet1"::: @@ -1786,7 +1786,7 @@ The parameter was less the par ## Examples - The following code example demonstrates how to use the method with the method to search for a specific string within a control and display the character index where the found string is located within the control. The example searches for the word "brown" within the contents of the control and returns the character index position where the search string is found. This example requires that you have a form that contains a control named `richTextBox1` that contains text. It also requires that the code in the example is connected to the event of the . + The following code example demonstrates how to use the method with the method to search for a specific string within a control and display the character index where the found string is located within the control. The example searches for the word "brown" within the contents of the control and returns the character index position where the search string is found. This example requires that you have a form that contains a control named `richTextBox1` that contains text. It also requires that the code in the example is connected to the event of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.GetCharIndexFromPosition/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/GetCharIndexFromPosition/form1.cs" id="Snippet1"::: @@ -1838,15 +1838,15 @@ The parameter was less the par method returns the physical line number where the indexed character is located within the control. For example, if a portion of the first logical line of text in the control wraps to the next line, the method returns 1 if the character at the specified character index has wrapped to the second physical line. If is set to `false`, no portion of the line wraps to the next, and the method returns 0 for the specified character index. You can use this method to determine which line a specific character index is located within. For example, after calling the method to search for text, you can obtain the character index to where the search results are found. You can call this method with the character index returned by the method to determine which line the word was found. + This method enables you to determine the line number based on the character index specified in the `index` parameter of the method. The first line of text in the control returns the value zero. The method returns the physical line number where the indexed character is located within the control. For example, if a portion of the first logical line of text in the control wraps to the next line, the method returns 1 if the character at the specified character index has wrapped to the second physical line. If is set to `false`, no portion of the line wraps to the next, and the method returns 0 for the specified character index. You can use this method to determine which line a specific character index is located within. For example, after calling the method to search for text, you can obtain the character index to where the search results are found. You can call this method with the character index returned by the method to determine which line the word was found. - In certain cases, does not throw an exception when the `index` parameter is an invalid value. For example: + In certain cases, does not throw an exception when the `index` parameter is an invalid value. For example: -- If the `index` parameter is or -1, returns 0. +- If the `index` parameter is or -1, returns 0. -- If the `index` parameter is the text length or , returns the number of the last line of text, which is not necessarily the same as `Lines.Length-1`, depending on the value of the property. +- If the `index` parameter is the text length or , returns the number of the last line of text, which is not necessarily the same as `Lines.Length-1`, depending on the value of the property. - In these cases, validate the input before calling . + In these cases, validate the input before calling . > [!NOTE] > If the character index specified in the `index` parameter is beyond the available number of lines contained within the control, the last line number is returned. @@ -1854,7 +1854,7 @@ The parameter was less the par ## Examples - The following code example demonstrates using the method. To run the example, paste the following code in a form containing a control named `RichTextBox1`, a button named `Button1` and two text boxes named `TextBox1` and `TextBox2`. When the example is running, enter a search string in `TextBox2` and click the button to get search results. + The following code example demonstrates using the method. To run the example, paste the following code in a form containing a control named `RichTextBox1`, a button named `Button1` and two text boxes named `TextBox1` and `TextBox2`. When the example is running, enter a search string in `TextBox2` and click the button to get search results. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.RichTextBoxGetLine/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/GetLineFromCharIndex/form1.cs" id="Snippet1"::: @@ -2007,7 +2007,7 @@ The parameter was less the par ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. @@ -2060,7 +2060,7 @@ The parameter was less the par ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. @@ -2157,7 +2157,7 @@ The parameter was less the par ## Examples - The following code example contains an event handler for the event. The event handler processes link clicks within the document of a control and launches an instance of the default browser (using the method), displaying the page for the link that was clicked. This example requires that the event handler has been connected to the event for a . + The following code example contains an event handler for the event. The event handler processes link clicks within the document of a control and launches an instance of the default browser (using the method), displaying the page for the link that was clicked. This example requires that the event handler has been connected to the event for a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RichTextBox.LinkClicked Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/DetectUrls/source.cs" id="Snippet1"::: @@ -2217,13 +2217,13 @@ The parameter was less the par method, the contents of the file being loaded replace the entire contents of the control. This will cause the values of the and properties to change. You can use this method to load a previously created text or RTF document into the control for manipulation. If you want to save the file, you can use the method. + When loading a file with the method, the contents of the file being loaded replace the entire contents of the control. This will cause the values of the and properties to change. You can use this method to load a previously created text or RTF document into the control for manipulation. If you want to save the file, you can use the method. > [!NOTE] -> With this version of the method, if the file being loaded is not an RTF document, an exception will occur. To load a different type of file such as an ASCII text file, use the other versions of this method that accept a value from the enumeration as a parameter. +> With this version of the method, if the file being loaded is not an RTF document, an exception will occur. To load a different type of file such as an ASCII text file, use the other versions of this method that accept a value from the enumeration as a parameter. > [!NOTE] -> The method will not open a file until a handle is created for the . Ensure that the control's handle is created before calling the method. +> The method will not open a file until a handle is created for the . Ensure that the control's handle is created before calling the method. ## Examples The following code example opens an RTF file into the control. The example uses the class to display a dialog to request the file from the user. The code then loads that file assuming that it is an RTF document file. If the file is not, the example code will throw an exception. This example requires that the code is placed in a class that has a control named `richTextBox1`. @@ -2275,15 +2275,15 @@ The parameter was less the par method to load the with data from an existing stream of data. The data that is loaded into the control replaces the entire contents of the control. This will cause the values of the and properties to change. You can use this method to load a file that has been previously opened into a data stream into the control for manipulation. If you want to save contents of the control back into the stream, you can use the method that accepts a object as a parameter. + You can use this version of the method to load the with data from an existing stream of data. The data that is loaded into the control replaces the entire contents of the control. This will cause the values of the and properties to change. You can use this method to load a file that has been previously opened into a data stream into the control for manipulation. If you want to save contents of the control back into the stream, you can use the method that accepts a object as a parameter. - This version of the method also enables you to specify the type of data that is being loaded into the control. This feature enables you to use data streams that contain data other than rich text format (RTF) documents into the control. + This version of the method also enables you to specify the type of data that is being loaded into the control. This feature enables you to use data streams that contain data other than rich text format (RTF) documents into the control. > [!NOTE] -> The method will not open a file until a handle is created for the . Ensure that the control's handle is created before calling the method. +> The method will not open a file until a handle is created for the . Ensure that the control's handle is created before calling the method. ## Examples - The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. + The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. This is a complete example that's ready to run when you copy it to your project. @@ -2337,17 +2337,17 @@ The parameter was less the par method, the contents of the file being loaded replace the entire contents of the control. This will cause the values of the and properties to change. You can use this method to load a previously created text or rich text format (RTF) document into the control for manipulation. If you want to save the file, you can use the method. + When loading a file with the method, the contents of the file being loaded replace the entire contents of the control. This will cause the values of the and properties to change. You can use this method to load a previously created text or rich text format (RTF) document into the control for manipulation. If you want to save the file, you can use the method. - You can use this version of the method to specify the file type of the file being loaded. This feature enables you to load files other than RTF documents into the control. + You can use this version of the method to specify the file type of the file being loaded. This feature enables you to load files other than RTF documents into the control. > [!NOTE] -> The method will not open a file until a handle is created for the . Ensure that the control's handle is created before calling the method. +> The method will not open a file until a handle is created for the . Ensure that the control's handle is created before calling the method. ## Examples - The following code example opens a text file into the control. The example uses the class to display a dialog to request the file from the user. The code then loads that file into the control. The example uses this version of the method to specify that the file be opened as an ASCII text file instead of the standard rich text format. This example requires that the code is placed in a class that has a control named `richTextBox1`. + The following code example opens a text file into the control. The example uses the class to display a dialog to request the file from the user. The code then loads that file into the control. The example uses this version of the method to specify that the file be opened as an ASCII text file instead of the standard rich text format. This example requires that the code is placed in a class that has a control named `richTextBox1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RichTextBox.LoadFile1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/LoadFile/source1.cs" id="Snippet1"::: @@ -2524,7 +2524,7 @@ The parameter was less the par ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2691,7 +2691,7 @@ The parameter was less the par ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2737,7 +2737,7 @@ The parameter was less the par ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2783,7 +2783,7 @@ The parameter was less the par ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2829,7 +2829,7 @@ The parameter was less the par ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2909,7 +2909,7 @@ The parameter was less the par ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3003,7 +3003,7 @@ The parameter was less the par ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3047,12 +3047,12 @@ The parameter was less the par method is different from the method as it enables you to paste only text in a specified Clipboard format. You can use the method to determine whether the data within the Clipboard is in the specified Clipboard format. You can then call this version of the method to ensure that the paste operation is made with the appropriate data format. + You can use this method to paste data from the clipboard into the control. This version of the method is different from the method as it enables you to paste only text in a specified Clipboard format. You can use the method to determine whether the data within the Clipboard is in the specified Clipboard format. You can then call this version of the method to ensure that the paste operation is made with the appropriate data format. ## Examples - The following code example demonstrates how to use the method to paste a bitmap into the control. After opening a bitmap from file, the example uses the method to copy the bitmap to the Windows clipboard. Finally, the example retrieves the format for the object, verifies that the format can be pasted into the control, and uses the method to paste the data. + The following code example demonstrates how to use the method to paste a bitmap into the control. After opening a bitmap from file, the example uses the method to copy the bitmap to the Windows clipboard. Finally, the example retrieves the format for the object, verifies that the format can be pasted into the control, and uses the method to paste the data. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichText_Paste/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/CanPaste/form1.cs" id="Snippet1"::: @@ -3146,7 +3146,7 @@ The parameter was less the par ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. @@ -3239,12 +3239,12 @@ The parameter was less the par method to reapply the last undo operation to the control. The method enables you to determine whether the last operation the user has undone can be reapplied to the control. + You can then use the method to reapply the last undo operation to the control. The method enables you to determine whether the last operation the user has undone can be reapplied to the control. ## Examples - The following code example demonstrates how to use the and properties, and the method, to restrict a redo operation to any action except the deletion of text. This example requires that you have a form that contains a control and that an operation within the has been performed and undone before the code in this example is called. + The following code example demonstrates how to use the and properties, and the method, to restrict a redo operation to any action except the deletion of text. This example requires that you have a form that contains a control and that an operation within the has been performed and undone before the code in this example is called. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.RedoAction/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/CanRedo/form1.cs" id="Snippet1"::: @@ -3296,12 +3296,12 @@ The parameter was less the par control that can then be reapplied to the control when a call to the method is made. You can determine whether there are any operations to be reapplied to the control by using the property. + If this property returns an empty string (""), there is no operation available to reapply to the control. You can use this method to determine the last action undone in the control that can then be reapplied to the control when a call to the method is made. You can determine whether there are any operations to be reapplied to the control by using the property. ## Examples - The following code example demonstrates how to use the and properties, and the method, to restrict a redo operation to any action except the deletion of text. This example requires that you have a form that contains a control and that an operation within the has been performed and undone before the code in this example is called. + The following code example demonstrates how to use the and properties, and the method, to restrict a redo operation to any action except the deletion of text. This example requires that you have a form that contains a control and that an operation within the has been performed and undone before the code in this example is called. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.RedoAction/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/CanRedo/form1.cs" id="Snippet1"::: @@ -3539,7 +3539,7 @@ The parameter was less the par method enables you to save the entire contents of the control to an RTF file that can be used by other programs such as Microsoft Word and Windows WordPad. If the file name that is passed to the `path` parameter already exists at the specified directory, the file will be overwritten without notice. You can use the method to load the contents of a file into the . + The method enables you to save the entire contents of the control to an RTF file that can be used by other programs such as Microsoft Word and Windows WordPad. If the file name that is passed to the `path` parameter already exists at the specified directory, the file will be overwritten without notice. You can use the method to load the contents of a file into the . > [!NOTE] > To save the contents of the control to a different type of file format such as ASCII text, use the other versions of this method that accept a value from the enumeration as a parameter. @@ -3595,14 +3595,14 @@ The parameter was less the par method enables you to save the entire contents of the control to the data stream that is already opened. The data stream can then save the information to a file. You can use the method to load the contents of a file into the . + This version of the method enables you to save the entire contents of the control to the data stream that is already opened. The data stream can then save the information to a file. You can use the method to load the contents of a file into the . - This version of the method also enables you to specify a data format of the information that will be sent to the object. + This version of the method also enables you to specify a data format of the information that will be sent to the object. ## Examples - The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. + The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. This is a complete example that is ready to run when you copy it to your project. @@ -3655,14 +3655,14 @@ The parameter was less the par method enables you to save the entire contents of the control to an RTF file that can be used by other programs such as Microsoft Word and Windows WordPad. If the file name that is passed to the `path` parameter already exists at the specified directory, the file will be overwritten without notice. You can use the method to load the contents of a file into the . + The method enables you to save the entire contents of the control to an RTF file that can be used by other programs such as Microsoft Word and Windows WordPad. If the file name that is passed to the `path` parameter already exists at the specified directory, the file will be overwritten without notice. You can use the method to load the contents of a file into the . - This version of the method enables you to specify a file type to save the contents of the control to. You can use this feature to ensure that the file is saved in the proper format based on the contents of the control. For example, if your document has no differences in font style or coloring, you can save the file as an ASCII text file by setting the `fileType` parameter to `RichTextBoxStreamType.PlainText`. + This version of the method enables you to specify a file type to save the contents of the control to. You can use this feature to ensure that the file is saved in the proper format based on the contents of the control. For example, if your document has no differences in font style or coloring, you can save the file as an ASCII text file by setting the `fileType` parameter to `RichTextBoxStreamType.PlainText`. ## Examples - The following code example saves the contents of the into an ASCII text file. The example uses the class to display a dialog to request the path and file name from the user. The code then saves the contents of the control to that file. The example uses this version of the method to specify that the file be saved as an ASCII text file instead of the standard rich text format. This example requires that the code is placed in a class that has a control named `richTextBox1`. + The following code example saves the contents of the into an ASCII text file. The example uses the class to display a dialog to request the path and file name from the user. The code then saves the contents of the control to that file. The example uses this version of the method to specify that the file be saved as an ASCII text file instead of the standard rich text format. This example requires that the code is placed in a class that has a control named `richTextBox1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RichTextBox.SaveFile1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/SaveFile/source1.cs" id="Snippet1"::: @@ -3720,7 +3720,7 @@ The parameter was less the par This property enables you to provide horizontal and vertical scroll bars to the user of the control to enable scrolling text within the control that is outside of the physical dimensions of the control. You can also use this property to remove scroll bars from the control to restrict scrolling the contents of the control. > [!NOTE] -> Horizontal scroll bars will not be shown if the is `true`, regardless of the value of the property. +> Horizontal scroll bars will not be shown if the is `true`, regardless of the value of the property. ]]> @@ -3829,7 +3829,7 @@ The parameter was less the par property with the , , and properties to create a bulleted list in a control. This example requires that a control named `richTextBox1` is created on a form. + The following code example demonstrates how to use the property with the , , and properties to create a bulleted list in a control. This example requires that a control named `richTextBox1` is created on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.SelectionBullet/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/SelectedText/form1.cs" id="Snippet1"::: @@ -3889,7 +3889,7 @@ The parameter was less the par If a selection is made within the control when the property is set, all paragraphs selected are aligned based on this property setting. You can use this property to align the paragraphs in a document being created in the . For example, if you want all paragraphs in a document to be centered, you can select all the paragraphs in the control and set the property to `HorizontalAlignment.Center`. > [!NOTE] -> returns `SelectionAlignment.Left` when the text selection contains multiple paragraphs with mixed alignment. +> returns `SelectionAlignment.Left` when the text selection contains multiple paragraphs with mixed alignment. @@ -3946,7 +3946,7 @@ The parameter was less the par to get or set the color of selected text in the . If no text is currently selected, the property applies to the current position of the caret. Characters that are entered from that position have the specified . + Use to get or set the color of selected text in the . If no text is currently selected, the property applies to the current position of the caret. Characters that are entered from that position have the specified . ]]> @@ -4007,7 +4007,7 @@ The parameter was less the par ## Examples - The following code example demonstrates how to use the property with the , , and properties to create a bulleted list in a control. This example requires that a control named `richTextBox1` is created on a form. + The following code example demonstrates how to use the property with the , , and properties to create a bulleted list in a control. This example requires that a control named `richTextBox1` is created on a form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/RichTextBox.SelectionBullet/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/SelectedText/form1.cs" id="Snippet1"::: @@ -4062,7 +4062,7 @@ The parameter was less the par ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. @@ -4389,7 +4389,7 @@ The parameter was less the par ## Remarks If no text is currently selected, the indentation setting is applied to the paragraph in which the insertion point appears and to all text that is typed into the control after the insertion point. The indentation setting applies until the property is changed to a different value or until the insertion point is moved to a different paragraph within the control. - If text is selected within the control, the selected text and any text entered after the text selection will have the value of this property applied to it. You can use this property to indent paragraphs contained in document of the . You can use this property in conjunction with the to create paragraphs displayed in paragraphs. + If text is selected within the control, the selected text and any text entered after the text selection will have the value of this property applied to it. You can use this property to indent paragraphs contained in document of the . You can use this property in conjunction with the to create paragraphs displayed in paragraphs. To create a hanging indent for paragraphs in the control, use the property. @@ -4582,7 +4582,7 @@ The parameter was less the par ## Remarks If no text is currently selected, the indentation setting is applied to the paragraph in which the insertion point appears and to all text that is typed into the control after the insertion point. The indentation setting applies until the property is changed to a different value or until the insertion point is moved to a different paragraph within the control. - If text is selected within the control, the selected text and any text entered after the text selection will have the value of this property applied to it. You can use this property to indent paragraphs contained in document of the . You can use this property in conjunction with the to create paragraphs displayed in paragraphs. + If text is selected within the control, the selected text and any text entered after the text selection will have the value of this property applied to it. You can use this property to indent paragraphs contained in document of the . You can use this property in conjunction with the to create paragraphs displayed in paragraphs. To create a hanging indent for paragraphs in the control, use the property. @@ -4918,7 +4918,7 @@ The parameter was less the par ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `RichTextBox1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/RichTextBoxFinds.xml b/xml/System.Windows.Forms/RichTextBoxFinds.xml index c5e515b3366..77a7e463c98 100644 --- a/xml/System.Windows.Forms/RichTextBoxFinds.xml +++ b/xml/System.Windows.Forms/RichTextBoxFinds.xml @@ -30,20 +30,20 @@ Specifies how a text search is carried out in a control. - control by calling the method of the control. This enumeration enables you to specify how the search is performed when the method is called. You can combine one or more values from this enumeration to specify more than one search option when calling the method. - - - -## Examples - The following example searches the entire contents of a for the first instance of a search string passed into the text parameter of the method. The search starting location is specified by the start parameter of the method. If the search string is found in the , the method returns the index location of the first character of the found text and highlights the found text; otherwise, it returns a value of -1. The example also specifies options in the search to match the case of the specified search string. The example assumes that this method is placed in the class of a that contains a named `richTextBox1`. You can use this example when performing a "Find Next" type operation once the first instance of search text has been found to find other instances of the text. - + control by calling the method of the control. This enumeration enables you to specify how the search is performed when the method is called. You can combine one or more values from this enumeration to specify more than one search option when calling the method. + + + +## Examples + The following example searches the entire contents of a for the first instance of a search string passed into the text parameter of the method. The search starting location is specified by the start parameter of the method. If the search string is found in the , the method returns the index location of the first character of the found text and highlights the found text; otherwise, it returns a value of -1. The example also specifies options in the search to match the case of the specified search string. The example assumes that this method is placed in the class of a that contains a named `richTextBox1`. You can use this example when performing a "Find Next" type operation once the first instance of search text has been found to find other instances of the text. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RichTextBox.Find2 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/Find/source2.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/RichTextBox/Find/source2.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/RichTextBox/Find/source2.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/RichTextBoxStreamType.xml b/xml/System.Windows.Forms/RichTextBoxStreamType.xml index e05eef7e11b..815a1bf5daa 100644 --- a/xml/System.Windows.Forms/RichTextBoxStreamType.xml +++ b/xml/System.Windows.Forms/RichTextBoxStreamType.xml @@ -24,20 +24,20 @@ Specifies the types of input and output streams used to load and save data in the control. - and methods of the control. - - - -## Examples - The following example saves the contents of the into an ASCII text file. The example uses the class to display a dialog to request the path and file name from the user. The code then saves the contents of the control to that file. The example uses this version of the method to specify that the file be saved as an ASCII text file instead of the standard Rich Text Format. This example assumes that the code is placed in a class that has a control named `richTextBox1`. - + and methods of the control. + + + +## Examples + The following example saves the contents of the into an ASCII text file. The example uses the class to display a dialog to request the path and file name from the user. The code then saves the contents of the control to that file. The example uses this version of the method to specify that the file be saved as an ASCII text file instead of the standard Rich Text Format. This example assumes that the code is placed in a class that has a control named `richTextBox1`. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic RichTextBox.SaveFile1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/RichTextBox/SaveFile/source1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/RichTextBox/SaveFile/source1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/RichTextBox/SaveFile/source1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/RowStyle.xml b/xml/System.Windows.Forms/RowStyle.xml index 2ccb1caa79a..e4641d33632 100644 --- a/xml/System.Windows.Forms/RowStyle.xml +++ b/xml/System.Windows.Forms/RowStyle.xml @@ -29,7 +29,7 @@ ## Remarks The class represents the user interface (UI) characteristics of a row in a . The styles for all the rows in a are collected in the property. - This simple class offers the and for a row. + This simple class offers the and for a row. @@ -205,7 +205,7 @@ property will take on different meanings depending on the property. The following table describes the possible meanings of . + The property will take on different meanings depending on the property. The following table describes the possible meanings of . |`SizeType` value|`Height` interpretation| |----------------------|-----------------------------| diff --git a/xml/System.Windows.Forms/SaveFileDialog.xml b/xml/System.Windows.Forms/SaveFileDialog.xml index 350a9c03a2f..d7dcd21da45 100644 --- a/xml/System.Windows.Forms/SaveFileDialog.xml +++ b/xml/System.Windows.Forms/SaveFileDialog.xml @@ -49,7 +49,7 @@ ## Examples - The following code example illustrates creating a , setting members, calling the dialog box using the method, and saving the current file. The example requires a form with a button placed on it. + The following code example illustrates creating a , setting members, calling the dialog box using the method, and saving the current file. The example requires a form with a button placed on it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic SaveFileDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SaveFileDialog/Overview/source.cs" id="Snippet1"::: @@ -170,7 +170,7 @@ and methods with streams. It also demonstrates using the , , , and members. + The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. This is a complete example that is ready to run when you copy it to your project. @@ -252,7 +252,7 @@ ## Examples - The following code example illustrates creating a , setting members, calling the dialog box using the method, and opening the selected file. The example requires a form with a button placed on it. + The following code example illustrates creating a , setting members, calling the dialog box using the method, and opening the selected file. The example requires a form with a button placed on it. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic SaveFileDialog Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SaveFileDialog/Overview/source.cs" id="Snippet1"::: @@ -301,7 +301,7 @@ and methods with streams. It also demonstrates using the , , , and members. + The following code example demonstrates using the and methods with streams. It also demonstrates using the , , , and members. This is a complete example that is ready to run when you copy it to your project. diff --git a/xml/System.Windows.Forms/Screen.xml b/xml/System.Windows.Forms/Screen.xml index e157e0ccc7d..fa1b3a6305c 100644 --- a/xml/System.Windows.Forms/Screen.xml +++ b/xml/System.Windows.Forms/Screen.xml @@ -340,7 +340,7 @@ method. This example creates a referencing the and coordinates passed by a , and then uses the method to determine if the point clicked is on the primary screen. + The following code example shows how to use the method. This example creates a referencing the and coordinates passed by a , and then uses the method to determine if the point clicked is on the primary screen. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Screen.FromPoint/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Screen/FromPoint/form1.cs" id="Snippet1"::: @@ -583,7 +583,7 @@ property and the method. This method requires a form containing a button named `Button1` + The following code example demonstrates the use of property and the method. This method requires a form containing a button named `Button1` :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Screen/GetWorkingArea/form1.cs" id="Snippet1"::: @@ -741,7 +741,7 @@ ## Examples - The following code example demonstrates the use of property and the method. This method requires a form containing a button named `Button1`. + The following code example demonstrates the use of property and the method. This method requires a form containing a button named `Button1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScreenExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Screen/GetWorkingArea/form1.cs" id="Snippet1"::: @@ -815,7 +815,7 @@ ## Remarks The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. - will return the entire area of the screen if the Windows Taskbar is set to Auto-Hide, no matter whether the Taskbar is currently displayed or not. + will return the entire area of the screen if the Windows Taskbar is set to Auto-Hide, no matter whether the Taskbar is currently displayed or not. ]]> diff --git a/xml/System.Windows.Forms/ScrollBar.xml b/xml/System.Windows.Forms/ScrollBar.xml index 6722b54ab3b..2f5f866cc27 100644 --- a/xml/System.Windows.Forms/ScrollBar.xml +++ b/xml/System.Windows.Forms/ScrollBar.xml @@ -55,9 +55,9 @@ > [!NOTE] > The scroll box is sometimes referred to as the scroll thumb. - To adjust the value range of the scroll bar control, set the and properties. To adjust the distance the scroll box moves, set the and properties. To adjust the starting point of the scroll box, set the property when the control is initially displayed. + To adjust the value range of the scroll bar control, set the and properties. To adjust the distance the scroll box moves, set the and properties. To adjust the starting point of the scroll box, set the property when the control is initially displayed. - User interface guidelines suggest that the and properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the and properties should be set relative to the size of the picture box, not to the size of the image. + User interface guidelines suggest that the and properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the and properties should be set relative to the size of the picture box, not to the size of the image. @@ -893,7 +893,7 @@ method to return the bounds that the control should be scaled by. You may override this method if you wish to reuse scaling logic, but you need to supply your own bounds. + This is a helper method that used by the method to return the bounds that the control should be scaled by. You may override this method if you wish to reuse scaling logic, but you need to supply your own bounds. ]]> @@ -1027,7 +1027,7 @@ > [!NOTE] > You can handle key press events so that when the user presses the PAGE UP or PAGE DOWN key the scroll box moves. - User interface guidelines suggest that the and properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the and properties should be set relative to the size of the picture box, not to the size of the image. + User interface guidelines suggest that the and properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the and properties should be set relative to the size of the picture box, not to the size of the image. @@ -1512,7 +1512,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1557,7 +1557,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -1613,7 +1613,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -1813,7 +1813,7 @@ ## Examples - The following example scrolls an image in a picture box. It uses the of the scrollbar to redraw a new part of the image whenever the user scrolls. This code example is part of a larger example provided for the class overview. + The following example scrolls an image in a picture box. It uses the of the scrollbar to redraw a new part of the image whenever the user scrolls. This code example is part of a larger example provided for the class overview. > [!NOTE] > For instructions about how to run this example in Visual Studio, see [How to: Compile and Run a Complete Windows Forms Code Example Using Visual Studio](https://msdn.microsoft.com/library/cc447f7e-4c3b-4397-9d05-aeba3ca49416(v=vs.100)). @@ -1872,7 +1872,7 @@ ## Remarks When the user presses one of the arrow keys or clicks one of the scroll bar buttons, the property changes according to the value set in the property. - User interface guidelines suggest that the and properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the and properties should be set relative to the size of the picture box, not to the size of the image. + User interface guidelines suggest that the and properties are set relative to the size of the view that the user sees, not to the total size including the unseen part. For example, if you have a picture box with scroll bars displaying a large image, the and properties should be set relative to the size of the picture box, not to the size of the image. @@ -2064,7 +2064,7 @@ method returns a string that includes the type and the values for the , and properties. + The method returns a string that includes the type and the values for the , and properties. ]]> @@ -2101,7 +2101,7 @@ method redraws the by using the values of the , , , and properties. + The method redraws the by using the values of the , , , and properties. ]]> @@ -2152,7 +2152,7 @@ of the scrollbar to redraw a new part of the image whenever the user scrolls. This code example is part of a larger example provided for the class overview. + The following example scrolls an image in a picture box. It uses the of the scrollbar to redraw a new part of the image whenever the user scrolls. This code example is part of a larger example provided for the class overview. > [!NOTE] > For instructions about how to run this example in Visual Studio, see [How to: Compile and Run a Complete Windows Forms Code Example Using Visual Studio](https://msdn.microsoft.com/library/cc447f7e-4c3b-4397-9d05-aeba3ca49416(v=vs.100)). diff --git a/xml/System.Windows.Forms/ScrollBarRenderer.xml b/xml/System.Windows.Forms/ScrollBarRenderer.xml index 75859ca08dd..7d94ae82af7 100644 --- a/xml/System.Windows.Forms/ScrollBarRenderer.xml +++ b/xml/System.Windows.Forms/ScrollBarRenderer.xml @@ -100,7 +100,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a scroll arrow in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a scroll arrow in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScrollBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollBarRenderer/Overview/form1.cs" id="Snippet2"::: @@ -161,7 +161,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a scroll box in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a scroll box in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScrollBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollBarRenderer/Overview/form1.cs" id="Snippet2"::: @@ -222,7 +222,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a scroll box grip in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a scroll box grip in the state determined by the location of the mouse pointer. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScrollBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollBarRenderer/Overview/form1.cs" id="Snippet2"::: @@ -283,7 +283,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw the left side of a scroll bar track in the pressed state. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw the left side of a scroll bar track in the pressed state. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScrollBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollBarRenderer/Overview/form1.cs" id="Snippet2"::: @@ -396,7 +396,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw the scroll bar track. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw the scroll bar track. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScrollBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollBarRenderer/Overview/form1.cs" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/ScrollBars.xml b/xml/System.Windows.Forms/ScrollBars.xml index 4469abaac7b..d6488b45297 100644 --- a/xml/System.Windows.Forms/ScrollBars.xml +++ b/xml/System.Windows.Forms/ScrollBars.xml @@ -24,22 +24,22 @@ Specifies which scroll bars will be visible on a control. - . - - Not all controls support scroll bars. Use this enumeration to specify which scroll bars will be visible on a control, either under some or all circumstances. - - - -## Examples - The following code example demonstrates how to use the enumeration.To run the example, paste the following code in a form. Call the `SetFourDifferentScrollBars` method in the form's constructor or event-handling method. - + . + + Not all controls support scroll bars. Use this enumeration to specify which scroll bars will be visible on a control, either under some or all circumstances. + + + +## Examples + The following code example demonstrates how to use the enumeration.To run the example, paste the following code in a form. Call the `SetFourDifferentScrollBars` method in the form's constructor or event-handling method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ScrollBarsExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollBars/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ScrollBars/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ScrollBars/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/ScrollButton.xml b/xml/System.Windows.Forms/ScrollButton.xml index 938a101a752..4af8b33da7b 100644 --- a/xml/System.Windows.Forms/ScrollButton.xml +++ b/xml/System.Windows.Forms/ScrollButton.xml @@ -24,11 +24,11 @@ Specifies the type of scroll arrow to draw on a scroll bar. - . - + . + ]]> diff --git a/xml/System.Windows.Forms/ScrollEventArgs.xml b/xml/System.Windows.Forms/ScrollEventArgs.xml index 3edf3ba43f2..371ba7fe9c4 100644 --- a/xml/System.Windows.Forms/ScrollEventArgs.xml +++ b/xml/System.Windows.Forms/ScrollEventArgs.xml @@ -290,7 +290,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ScrollableControl1` and ensure that the event handler is associated with the event. @@ -343,7 +343,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ScrollableControl1` and ensure that the event handler is associated with the event. @@ -391,7 +391,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ScrollableControl1` and ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ScrollEventType.xml b/xml/System.Windows.Forms/ScrollEventType.xml index ecedfd0fc86..6a841451b66 100644 --- a/xml/System.Windows.Forms/ScrollEventType.xml +++ b/xml/System.Windows.Forms/ScrollEventType.xml @@ -30,11 +30,11 @@ Specifies the type of action used to raise the event. - . - + . + ]]> diff --git a/xml/System.Windows.Forms/ScrollProperties.xml b/xml/System.Windows.Forms/ScrollProperties.xml index 377df12db5f..01c9debbc09 100644 --- a/xml/System.Windows.Forms/ScrollProperties.xml +++ b/xml/System.Windows.Forms/ScrollProperties.xml @@ -30,11 +30,11 @@ Encapsulates properties related to scrolling. - and , which are returned by the and properties of . - + and , which are returned by the and properties of . + ]]> @@ -67,11 +67,11 @@ The whose scrolling properties this object describes. Initializes a new instance of the class. - or . - + or . + ]]> @@ -153,11 +153,11 @@ Gets or sets the distance to move a scroll bar in response to a large scroll command. An describing how far, in pixels, to move the scroll bar in response to a large change. - is used to determine how far the scroll bar is moved in response to a request to move a considerable distance, such as when the user presses the PAGE UP or PAGE DOWN button. - + is used to determine how far the scroll bar is moved in response to a request to move a considerable distance, such as when the user presses the PAGE UP or PAGE DOWN button. + ]]> @@ -205,11 +205,11 @@ Gets or sets the upper limit of the scrollable range. An representing the maximum range of the scroll bar. - is less than , then is set equal to . - + is less than , then is set equal to . + ]]> @@ -255,11 +255,11 @@ Gets or sets the lower limit of the scrollable range. An representing the lower range of the scroll bar. - is greater than , then is set equal to . - + is greater than , then is set equal to . + ]]> @@ -335,11 +335,11 @@ Gets or sets the distance to move a scroll bar in response to a small scroll command. An representing how far, in pixels, to move the scroll bar. - is used to calculate how far to move the scroll bar in response to an arrow key click or a click on a scroll bar button. - + is used to calculate how far to move the scroll bar in response to an arrow key click or a click on a scroll bar button. + ]]> diff --git a/xml/System.Windows.Forms/ScrollableControl+DockPaddingEdges.xml b/xml/System.Windows.Forms/ScrollableControl+DockPaddingEdges.xml index 68d58b55525..16119d2c77e 100644 --- a/xml/System.Windows.Forms/ScrollableControl+DockPaddingEdges.xml +++ b/xml/System.Windows.Forms/ScrollableControl+DockPaddingEdges.xml @@ -42,7 +42,7 @@ class creates a margin on a given edge or all edges of a docked control. You can set the width of this margin for each individual edge by setting the following properties: , , , . Alternatively, you can set all the edges to the same width simultaneously by setting the property. If the size of the control is too large for its container, the control will be resized to fit in the container, minus the specified margin width. + The class creates a margin on a given edge or all edges of a docked control. You can set the width of this margin for each individual edge by setting the following properties: , , , . Alternatively, you can set all the edges to the same width simultaneously by setting the property. If the size of the control is too large for its container, the control will be resized to fit in the container, minus the specified margin width. diff --git a/xml/System.Windows.Forms/ScrollableControl.xml b/xml/System.Windows.Forms/ScrollableControl.xml index 0ac0bf743db..f5b226a1902 100644 --- a/xml/System.Windows.Forms/ScrollableControl.xml +++ b/xml/System.Windows.Forms/ScrollableControl.xml @@ -70,7 +70,7 @@ The class acts as a base class for controls that require the ability to scroll. To enable a control to display scroll bars as needed, set the property to `true` and set the property to the desired size. When the control is sized smaller than the specified minimum size, or a child control is located outside the bounds of the control, the appropriate scroll bars are displayed. - When developing custom controls that respond to layout changes by displaying scroll bars, set the and properties. If either scroll bar is not visible, set the corresponding property to `false`, even if the property is set to `true`. + When developing custom controls that respond to layout changes by displaying scroll bars, set the and properties. If either scroll bar is not visible, set the corresponding property to `false`, even if the property is set to `true`. You can handle the event to know when the user or code scrolls the client area. @@ -109,13 +109,13 @@ constructor performs the following actions: + The default constructor performs the following actions: -- Marks the current instance as a container control by calling the method to set the style to `true`. +- Marks the current instance as a container control by calling the method to set the style to `true`. - Enables background erasing by setting the to `false`. -- Disables auto-scrolling by calling the method to set the bit to `false`. +- Disables auto-scrolling by calling the method to set the bit to `false`. ]]> @@ -164,7 +164,7 @@ method lays out the client area, including resizing the display area as required to accommodate the scroll bars. + When required, the method lays out the client area, including resizing the display area as required to accommodate the scroll bars. ]]> @@ -226,12 +226,12 @@ When `true`, this property enables the container to have a virtual size that is larger than its visible boundaries. > [!Note] -> In Windows Forms when a child control is anchored to the right or bottom ( contains or ) the Container will behave as if were set to `false`. +> In Windows Forms when a child control is anchored to the right or bottom ( contains or ) the Container will behave as if were set to `false`. -There is currently a limitation in Windows Forms that prevents all classes derived from from acting properly when both is enabled and is set to `true`. For example, let's say that you place a control such as - or a container class derived from (such as or ) - on your form. If you set on the container to `true` and then set the property on one or more of the controls inside of the container to , then no scrollbar ever appears. The class derived from acts as if were set to `false`. Currently, the only workaround is to nest the inside another . For instance, if you need to work in this situation, you can place it inside of a control and set on the to `true`. +There is currently a limitation in Windows Forms that prevents all classes derived from from acting properly when both is enabled and is set to `true`. For example, let's say that you place a control such as - or a container class derived from (such as or ) - on your form. If you set on the container to `true` and then set the property on one or more of the controls inside of the container to , then no scrollbar ever appears. The class derived from acts as if were set to `false`. Currently, the only workaround is to nest the inside another . For instance, if you need to work in this situation, you can place it inside of a control and set on the to `true`. > [!NOTE] -> maintains the visibility of the scrollbars automatically. Therefore, setting the or property to `true` has no effect when is enabled. +> maintains the visibility of the scrollbars automatically. Therefore, setting the or property to `true` has no effect when is enabled. @@ -258,7 +258,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv If you position a part of the text box below the bottom of the panel, you will see a vertical scroll bar when you click the button. - The example code checks to see whether the text box is outside the bounds of the panel before it sets the property to `true`, and before it sets the property. This out-of-bounds check is not required. If is set to `true`, no scroll bars will appear when the text box is completely within the panel. Also, you can leave the margins at their default settings of 0,0. + The example code checks to see whether the text box is outside the bounds of the panel before it sets the property to `true`, and before it sets the property. This out-of-bounds check is not required. If is set to `true`, no scroll bars will appear when the text box is completely within the panel. Also, you can leave the margins at their default settings of 0,0. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ScrollableControl.AutoScroll Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollableControl/AutoScroll/source.cs" id="Snippet1"::: @@ -317,10 +317,10 @@ There is currently a limitation in Windows Forms that prevents all classes deriv size is added to the size of any child controls contained in the scrollable control to determine whether or not scroll bars are needed. The property is evaluated when the parent scrollable control is resized or the individual child controls are brought into view, and is used to determine if scroll bars must be displayed. Docked controls are excluded from the calculations that determine if scroll bars must be displayed. + The auto-scroll margin is the distance between any child controls and the edges of the scrollable parent control. The size is added to the size of any child controls contained in the scrollable control to determine whether or not scroll bars are needed. The property is evaluated when the parent scrollable control is resized or the individual child controls are brought into view, and is used to determine if scroll bars must be displayed. Docked controls are excluded from the calculations that determine if scroll bars must be displayed. > [!NOTE] -> If a docked control's property is set to , the control fills the parent scrollable control and the docked control is ignored when using the to determine whether scroll bars are needed. +> If a docked control's property is set to , the control fills the parent scrollable control and the docked control is ignored when using the to determine whether scroll bars are needed. If the distance from the edge of a child control to the parent scrollable control is less than the value assigned to the property and the property is set to `true`, the appropriate scroll bar is displayed. @@ -445,14 +445,14 @@ There is currently a limitation in Windows Forms that prevents all classes deriv When adding controls programmatically to a form, use the property to position the control either inside or outside of the current viewable scroll area. > [!NOTE] -> The and coordinate values retrieved are negative if the control has scrolled away from its starting position (0,0). When you set this property, you must always assign positive and values to set the scroll position relative to the starting position. For example, if you have a horizontal scroll bar and you set x and y to 200, you move the scroll 200 pixels to the right; if you then set x and y to 100, the scroll appears to jump the left by 100 pixels, because you are setting it 100 pixels away from the starting position. In the first case, returns {-200, 0}; in the second case, it returns {-100,0}. +> The and coordinate values retrieved are negative if the control has scrolled away from its starting position (0,0). When you set this property, you must always assign positive and values to set the scroll position relative to the starting position. For example, if you have a horizontal scroll bar and you set x and y to 200, you move the scroll 200 pixels to the right; if you then set x and y to 100, the scroll appears to jump the left by 100 pixels, because you are setting it 100 pixels away from the starting position. In the first case, returns {-200, 0}; in the second case, it returns {-100,0}. - To detect when changes, create an event handler for the event, save the old position value in a private variable, and compare the new value to the old value on subsequent events. + To detect when changes, create an event handler for the event, save the old position value in a private variable, and compare the new value to the old value on subsequent events. ## Examples - The following code example uses the derived class and adds a button to the upper left corner of the scrollable area. The example allows for the offset determined by the . The example was written under the assumption that you have a that contains a with a on it. To enable auto-scrolling, place the button outside of the client area of the . + The following code example uses the derived class and adds a button to the upper left corner of the scrollable area. The example allows for the offset determined by the . The example was written under the assumption that you have a that contains a with a on it. To enable auto-scrolling, place the button outside of the client area of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.ScrollableControl/CPP/scrollablecontrol.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ScrollableControl/AutoScrollPosition/scrollablecontrol.cs" id="Snippet1"::: @@ -529,7 +529,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv property is set to `true`, the property is the virtual size and position of the control. For example, if the width and height of the are both 100 pixels and the control contains controls that extend beyond its boundaries, represents the size the needs to be to include the contained controls. Similarly, the and properties of are relevant to the scroll position of the . + If the property is set to `true`, the property is the virtual size and position of the control. For example, if the width and height of the are both 100 pixels and the control contains controls that extend beyond its boundaries, represents the size the needs to be to include the contained controls. Similarly, the and properties of are relevant to the scroll position of the . ]]> @@ -765,9 +765,9 @@ There is currently a limitation in Windows Forms that prevents all classes deriv property can also be accomplished through calls to the and methods using as the parameter. + The functionality of the property can also be accomplished through calls to the and methods using as the parameter. - **Note** maintains the visibility of the scrollbars automatically. Therefore, setting the or properties to `true` have no effect when is enabled. + **Note** maintains the visibility of the scrollbars automatically. Therefore, setting the or properties to `true` have no effect when is enabled. ]]> @@ -856,11 +856,11 @@ There is currently a limitation in Windows Forms that prevents all classes deriv property is set to `true`, the mouse wheel scrolls through the control vertically. However, if only the horizontal scroll bar is visible, which means that the is set to `false` and the property to set to `true,` the mouse wheel scrolls horizontally. + If the vertical scroll bar is visible, which means that the property is set to `true`, the mouse wheel scrolls through the control vertically. However, if only the horizontal scroll bar is visible, which means that the is set to `false` and the property to set to `true,` the mouse wheel scrolls horizontally. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -907,7 +907,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -951,7 +951,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1035,7 +1035,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1208,7 +1208,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ScrollableControl1` and ensure that the event handler is associated with the event. @@ -1257,7 +1257,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv property must be set to `true`, and at least one of the scroll bars, horizontal or vertical, must also be visible, for the method to have an effect. To make the horizontal and vertical scroll bars visible, the and properties, respectively, must be set to `true`. + The property must be set to `true`, and at least one of the scroll bars, horizontal or vertical, must also be visible, for the method to have an effect. To make the horizontal and vertical scroll bars visible, the and properties, respectively, must be set to `true`. If the `activeControl` parameter is not a child control, no action takes place. @@ -1312,7 +1312,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv field is a mask. You can use it with the and methods to get and set the property. + The field is a mask. You can use it with the and methods to get and set the property. ]]> @@ -1352,7 +1352,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv field is a mask. Use it with the and methods to get and set whether the user has enabled full window drag. + The field is a mask. Use it with the and methods to get and set whether the user has enabled full window drag. When full window drag is enabled, the contents of windows are displayed when the user moves and sizes the windows. @@ -1393,7 +1393,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv field is a mask. Use it with the and methods to get and set the property. + The field is a mask. Use it with the and methods to get and set the property. ]]> @@ -1433,7 +1433,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv field is a mask. Use it with the method to get whether the user had scrolled through the . + The field is a mask. Use it with the method to get whether the user had scrolled through the . ]]> @@ -1474,7 +1474,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv field is a mask. Use it with the and methods to get and set the property. + The field is a mask. Use it with the and methods to get and set the property. ]]> @@ -1517,9 +1517,9 @@ There is currently a limitation in Windows Forms that prevents all classes deriv method uses the method to calculate how far it must scroll to display the specified control. The property of the child control is used to adjust the scrolled position. + The method uses the method to calculate how far it must scroll to display the specified control. The property of the child control is used to adjust the scrolled position. - does not cause scrolling; the method is typically used to subsequently scroll to the calculated position. + does not cause scrolling; the method is typically used to subsequently scroll to the calculated position. ]]> @@ -1622,7 +1622,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv property is set to `true`, the property is the virtual size and position displayed client area of the . Call the method to scroll through the to the specified position. + If the property is set to `true`, the property is the virtual size and position displayed client area of the . Call the method to scroll through the to the specified position. ]]> @@ -1671,7 +1671,7 @@ There is currently a limitation in Windows Forms that prevents all classes deriv class, the method updates the state of the control to the `value` parameter. For more information about the valid parameters and their values, see the method. + When the bit parameter is set to one of the fields of the class, the method updates the state of the control to the `value` parameter. For more information about the valid parameters and their values, see the method. ]]> @@ -1771,9 +1771,9 @@ There is currently a limitation in Windows Forms that prevents all classes deriv property can also be accomplished through calls to the and methods using as the parameter. + The functionality of the property can also be accomplished through calls to the and methods using as the parameter. - **Note** maintains the visibility of the scrollbars automatically. Therefore, setting the or properties to `true` have no effect when is enabled. + **Note** maintains the visibility of the scrollbars automatically. Therefore, setting the or properties to `true` have no effect when is enabled. ]]> diff --git a/xml/System.Windows.Forms/SearchDirectionHint.xml b/xml/System.Windows.Forms/SearchDirectionHint.xml index 329cf1f3eca..3c83ecefe4a 100644 --- a/xml/System.Windows.Forms/SearchDirectionHint.xml +++ b/xml/System.Windows.Forms/SearchDirectionHint.xml @@ -23,20 +23,20 @@ Provides a directional hint of where to search for a . - methods in the and classes, as well as by the class. Identifying the nearest item in a control can vary depending on the operating system the application is running on; therefore, the search direction is a hint, and not an absolute guarantee of results. - - - -## Examples - The following code example demonstrates how to use the enumeration. To run this example, paste the following code into a Windows Form and call `InitializeLocationSearchListView` from the form's constructor or event-handling method. - + methods in the and classes, as well as by the class. Identifying the nearest item in a control can vary depending on the operating system the application is running on; therefore, the search direction is a hint, and not an absolute guarantee of results. + + + +## Examples + The following code example demonstrates how to use the enumeration. To run this example, paste the following code into a Windows Form and call `InitializeLocationSearchListView` from the form's constructor or event-handling method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ListViewFindItems/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SearchDirectionHint/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/SearchDirectionHint/Overview/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/SearchDirectionHint/Overview/form1.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Windows.Forms/SearchForVirtualItemEventArgs.xml b/xml/System.Windows.Forms/SearchForVirtualItemEventArgs.xml index 02c14e5c68f..b8ed9819449 100644 --- a/xml/System.Windows.Forms/SearchForVirtualItemEventArgs.xml +++ b/xml/System.Windows.Forms/SearchForVirtualItemEventArgs.xml @@ -33,12 +33,12 @@ is constructed and passed to the event when you call the or methods on a control in virtual mode. + The is constructed and passed to the event when you call the or methods on a control in virtual mode. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -132,7 +132,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -185,7 +185,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -241,7 +241,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -294,7 +294,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -342,12 +342,12 @@ control by location by using the method, or you can perform a text search by using the method. + You can search a control by location by using the method, or you can perform a text search by using the method. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -399,7 +399,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -446,12 +446,12 @@ control by location by using the method, or you can perform a text search by using the method. + You can search a control by location by using the method, or you can perform a text search by using the method. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. @@ -499,12 +499,12 @@ control by location by using the method, or you can perform a text search by using the method. + You can search a control by location by using the method, or you can perform a text search by using the method. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ListView1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/SelectedGridItemChangedEventArgs.xml b/xml/System.Windows.Forms/SelectedGridItemChangedEventArgs.xml index f7188320e1f..e826edb2c9c 100644 --- a/xml/System.Windows.Forms/SelectedGridItemChangedEventArgs.xml +++ b/xml/System.Windows.Forms/SelectedGridItemChangedEventArgs.xml @@ -31,21 +31,21 @@ Provides data for the event of the control. - event occurs when the user changes the that is selected in a . - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event occurs when the user changes the that is selected in a . + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet533"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet533"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet533"::: + ]]> @@ -124,16 +124,16 @@ Gets the newly selected . The new . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet533"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet533"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet533"::: + ]]> @@ -173,16 +173,16 @@ Gets the previously selected . The old . This can be . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `PropertyGrid1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet533"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet533"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet533"::: + ]]> diff --git a/xml/System.Windows.Forms/SelectionMode.xml b/xml/System.Windows.Forms/SelectionMode.xml index f1adcf9f15f..a95a2fa9593 100644 --- a/xml/System.Windows.Forms/SelectionMode.xml +++ b/xml/System.Windows.Forms/SelectionMode.xml @@ -38,7 +38,7 @@ ## Examples - The following example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example assumes that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. + The following example demonstrates how to use the method to determine which items in a are selected in order to select the items that are not selected and deselect the items that are selected. The example also demonstrates using the property to enable a to have more than one selected item and uses the property to demonstrate how to sort items in a automatically. This example assumes that a , named `listBox1`, has been added to a form and that the `InitializeMyListBox` method defined in the example is called from the event of the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ListBox.GetSelected/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ListBox/GetSelected/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/SelectionRange.xml b/xml/System.Windows.Forms/SelectionRange.xml index a2bafd04260..8f40407f752 100644 --- a/xml/System.Windows.Forms/SelectionRange.xml +++ b/xml/System.Windows.Forms/SelectionRange.xml @@ -38,12 +38,12 @@ is the date or dates selected and highlighted on the control. If only one date is selected, the and property values will be equal. The can be changed by the user clicking a date while dragging the mouse pointer across the desired dates, or you can set the range in code. For example, you might want to have the user enter a date range into two controls or two controls and set the based on those dates. + The is the date or dates selected and highlighted on the control. If only one date is selected, the and property values will be equal. The can be changed by the user clicking a date while dragging the mouse pointer across the desired dates, or you can set the range in code. For example, you might want to have the user enter a date range into two controls or two controls and set the based on those dates. ## Examples - The following example sets the property of a control based on two dates entered into two controls when a is clicked. This code assumes new instances of a control, two controls, and a have been created on a . You might consider adding code to validate the assigned to the text boxes to verify that they contain valid dates. + The following example sets the property of a control based on two dates entered into two controls when a is clicked. This code assumes new instances of a control, two controls, and a have been created on a . You might consider adding code to validate the assigned to the text boxes to verify that they contain valid dates. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic SelectionRange.SelectionRange1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SelectionRange/Overview/source.cs" id="Snippet1"::: @@ -91,12 +91,12 @@ and values are set to `null` when this constructor is used. + The and values are set to `null` when this constructor is used. ## Examples - The following example creates a object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. + The following example creates a object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/CPP/selectionrangeobj.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/DateChanged/selectionrangeobj.cs" id="Snippet1"::: @@ -137,12 +137,12 @@ and property values are assigned the and property values of the assigned object. + The and property values are assigned the and property values of the assigned object. ## Examples - The following example creates a object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. + The following example creates a object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/CPP/selectionrangeobj.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/DateChanged/selectionrangeobj.cs" id="Snippet1"::: @@ -194,7 +194,7 @@ ## Examples - The following example sets the property of a control based on two dates entered into two controls when a is clicked. This code assumes new instances of a control, two controls, and a have been created on a . You might consider adding code to validate the assigned to the text boxes to verify that they contain valid dates. + The following example sets the property of a control based on two dates entered into two controls when a is clicked. This code assumes new instances of a control, two controls, and a have been created on a . You might consider adding code to validate the assigned to the text boxes to verify that they contain valid dates. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic SelectionRange.SelectionRange1 Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SelectionRange/Overview/source.cs" id="Snippet1"::: @@ -243,7 +243,7 @@ object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. + The following example creates a object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/CPP/selectionrangeobj.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/DateChanged/selectionrangeobj.cs" id="Snippet1"::: @@ -291,7 +291,7 @@ object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. + The following example creates a object, sets its and properties, and assigns the object to the property of the control. When the event is raised, the and property values are displayed in the text boxes. This example assumes that you have a with two controls, a , and a control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SelectionRange Members/CPP/selectionrangeobj.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/MonthCalendar/DateChanged/selectionrangeobj.cs" id="Snippet1"::: @@ -334,7 +334,7 @@ method returns a string that includes the values for the and properties. + The method returns a string that includes the values for the and properties. ]]> diff --git a/xml/System.Windows.Forms/SelectionRangeConverter.xml b/xml/System.Windows.Forms/SelectionRangeConverter.xml index fde813a781a..9103a84e4cf 100644 --- a/xml/System.Windows.Forms/SelectionRangeConverter.xml +++ b/xml/System.Windows.Forms/SelectionRangeConverter.xml @@ -31,16 +31,16 @@ Provides a type converter to convert objects to and from various other types. - class represents a single date or a range of dates. This class is commonly associated with the control, where it represents the selected and highlighted dates. The class is an adjunct class to that enables you to convert to and from other types, most often strings. - - For more information about type converters, see the base class, [Generalized Type Conversion](https://msdn.microsoft.com/library/49253ae6-7657-4810-82ab-1176a6feeada), and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + class represents a single date or a range of dates. This class is commonly associated with the control, where it represents the selected and highlighted dates. The class is an adjunct class to that enables you to convert to and from other types, most often strings. + + For more information about type converters, see the base class, [Generalized Type Conversion](https://msdn.microsoft.com/library/49253ae6-7657-4810-82ab-1176a6feeada), and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> You should never create a . Instead, call the method of the class. For more information, see the examples in the base class. - +> You should never create a . Instead, call the method of the class. For more information, see the examples in the base class. + ]]> @@ -82,13 +82,13 @@ Initializes a new instance of the class. - is the parameterless constructor supplied by the compiler. - - You should never create a . Instead, call the method of the class. For more information, see the examples in the base class. - + is the parameterless constructor supplied by the compiler. + + You should never create a . Instead, call the method of the class. For more information, see the examples in the base class. + ]]> @@ -137,16 +137,16 @@ if the converter can perform the specified conversion; otherwise, . - class is specialized to convert between the types and . As a result, the method returns `true` if the `sourceType` parameter is of type . Otherwise, it defers the call to the base implementation of this method, . - + class is specialized to convert between the types and . As a result, the method returns `true` if the `sourceType` parameter is of type . Otherwise, it defers the call to the base implementation of this method, . + ]]> - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + The parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the information. Also, properties on the context object may also return . @@ -190,16 +190,16 @@ if this converter can perform the specified conversion; otherwise, . - method returns `true` if the `destinationType` parameter is of type or . Otherwise, it defers the call to the base implementation of this method, . - + method returns `true` if the `destinationType` parameter is of type or . Otherwise, it defers the call to the base implementation of this method, . + ]]> - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + The parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the information. Also, properties on the context object may also return . @@ -252,11 +252,11 @@ Converts the specified value to the converter's native type by using the specified locale. An that represents the converted . - method is specialized to convert values that represent a range of dates to their representations. Types other than are passed to the base class implementation of this method. - + method is specialized to convert values that represent a range of dates to their representations. Types other than are passed to the base class implementation of this method. + ]]> @@ -264,8 +264,8 @@ is of type that was parsed into two strings, but the conversion of one or both into the type did not succeed. - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + The parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the information. Also, properties on the context object may also return . @@ -318,11 +318,11 @@ Converts the specified object to another type by using the specified culture. An that represents the converted . - method is specialized to convert values to their or representations. Other types are passed to the base class implementation of this method. - + method is specialized to convert values to their or representations. Other types are passed to the base class implementation of this method. + ]]> @@ -330,8 +330,8 @@ cannot be converted to the . - Override this method to provide your own conversion requirements. - + Override this method to provide your own conversion requirements. + The parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be , so you should always verify the information. Also, properties on the context object may also return . @@ -381,11 +381,11 @@ Creates a object by using the specified type descriptor and set of property values for that object. If successful, the newly created ; otherwise, this method throws an exception. - method to make changes to an existing immutable object by creating a modified version of it. This method expects the `propertyValues` parameter to have elements with key values of `Start` and `End`, each with the corresponding value. - + method to make changes to an existing immutable object by creating a modified version of it. This method expects the `propertyValues` parameter to have elements with key values of `Start` and `End`, each with the corresponding value. + ]]> @@ -428,11 +428,11 @@ if must be called to make a change to one or more properties; otherwise . - @@ -496,11 +496,11 @@ Returns the set of filtered properties for the type. If successful, the set of properties that should be exposed for the type; otherwise, . - method. - + method. + ]]> @@ -542,11 +542,11 @@ if can be called to find the properties of a object; otherwise, . - diff --git a/xml/System.Windows.Forms/SendKeys.xml b/xml/System.Windows.Forms/SendKeys.xml index fc604664800..94935515f99 100644 --- a/xml/System.Windows.Forms/SendKeys.xml +++ b/xml/System.Windows.Forms/SendKeys.xml @@ -34,14 +34,14 @@ to send keystrokes and keystroke combinations to the active application. This class cannot be instantiated. To send a keystroke to a class and immediately continue with the flow of your program, use . To wait for any processes started by the keystroke, use . + Use to send keystrokes and keystroke combinations to the active application. This class cannot be instantiated. To send a keystroke to a class and immediately continue with the flow of your program, use . To wait for any processes started by the keystroke, use . Each key is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, pass in the string "A" to the method. To represent more than one character, append each additional character to the one preceding it. To represent the letters A, B, and C, specify the parameter as "ABC". The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses () have special meanings to . To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use "{+}". To specify brace characters, use "{{}" and "{}}". Brackets ([ ]) have no special meaning to , but you must enclose them in braces. In other applications, brackets do have a special meaning that might be significant when dynamic data exchange (DDE) occurs. > [!CAUTION] -> If your application is intended for international use with a variety of keyboards, the use of could yield unpredictable results and should be avoided. +> If your application is intended for international use with a variety of keyboards, the use of could yield unpredictable results and should be avoided. To specify characters that aren't displayed when you press a key, such as ENTER or TAB, and keys that represent actions rather than characters, use the codes in the following table. @@ -106,7 +106,7 @@ > [!NOTE] > The class has been updated for the .NET Framework 3.0 to enable its use in applications that run on Windows Vista. The enhanced security of Windows Vista (known as User Account Control or UAC) prevents the previous implementation from working as expected. > -> The class is susceptible to timing issues, which some developers have had to work around. The updated implementation is still susceptible to timing issues, but is slightly faster and may require changes to the workarounds. The class tries to use the previous implementation first, and if that fails, uses the new implementation. As a result, the class may behave differently on different operating systems. Additionally, when the class uses the new implementation, the method will not wait for messages to be processed when they are sent to another process. +> The class is susceptible to timing issues, which some developers have had to work around. The updated implementation is still susceptible to timing issues, but is slightly faster and may require changes to the workarounds. The class tries to use the previous implementation first, and if that fails, uses the new implementation. As a result, the class may behave differently on different operating systems. Additionally, when the class uses the new implementation, the method will not wait for messages to be processed when they are sent to another process. > > If your application relies on consistent behavior regardless of the operating system, you can force the class to use the new implementation by adding the following application setting to your app.config file. > @@ -121,7 +121,7 @@ ## Examples - The following code example demonstrates how to use the method. To run the example, paste the following code in a form called Form1 containing a button called Button1. Ensure the click events are associated with their event-handling methods in this example. The button control's property should be set to 0. When the example is running, double-click the form to trigger the button's click event. + The following code example demonstrates how to use the method. To run the example, paste the following code in a form called Form1 containing a button called Button1. Ensure the click events are associated with their event-handling methods in this example. The button control's property should be set to 0. When the example is running, double-click the form to trigger the button's click event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SendKeys/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SendKeys/Overview/form1.cs" id="Snippet1"::: @@ -162,7 +162,7 @@ to wait for the application to process keystrokes and other operating system messages that are in the message queue. This is equivalent to calling until there are no more keys to process. + Use to wait for the application to process keystrokes and other operating system messages that are in the message queue. This is equivalent to calling until there are no more keys to process. > [!NOTE] > Because there is no managed method to activate another application, you can either use this class within the current application or use native Windows methods, such as `FindWindow` and `SetForegroundWindow`, to force focus on other applications. @@ -216,7 +216,7 @@ The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses () have special meanings to . To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use "{+}". To specify brace characters, use "{{}" and "{}}". Brackets ([ ]) have no special meaning to , but you must enclose them in braces. In other applications, brackets do have a special meaning that might be significant when dynamic data exchange (DDE) occurs. > [!CAUTION] -> If your application is intended for international use with a variety of keyboards, the use of could yield unpredictable results and should be avoided. +> If your application is intended for international use with a variety of keyboards, the use of could yield unpredictable results and should be avoided. To specify characters that aren't displayed when you press a key, such as ENTER or TAB, and keys that represent actions rather than characters, use the codes in the following table. @@ -281,7 +281,7 @@ > [!NOTE] > The class has been updated for the .NET Framework 3.0 to enable its use in applications that run on Windows Vista. The enhanced security of Windows Vista (known as User Account Control or UAC) prevents the previous implementation from working as expected. > -> The class is susceptible to timing issues, which some developers have had to work around. The updated implementation is still susceptible to timing issues, but is slightly faster and may require changes to the workarounds. The class tries to use the previous implementation first, and if that fails, uses the new implementation. As a result, the class may behave differently on different operating systems. Additionally, when the class uses the new implementation, the method will not wait for messages to be processed when they are sent to another process. +> The class is susceptible to timing issues, which some developers have had to work around. The updated implementation is still susceptible to timing issues, but is slightly faster and may require changes to the workarounds. The class tries to use the previous implementation first, and if that fails, uses the new implementation. As a result, the class may behave differently on different operating systems. Additionally, when the class uses the new implementation, the method will not wait for messages to be processed when they are sent to another process. > > If your application relies on consistent behavior regardless of the operating system, you can force the class to use the new implementation by adding the following application setting to your app.config file. > @@ -296,7 +296,7 @@ ## Examples - The following code example demonstrates how to use the method.To run the example, paste the following code in a form called Form1 containing a button called Button1. Ensure the click events are associated with their event-handling methods in this example. The button control's property should be set to 0. When the example is running, double-click the form to trigger the button's click event. + The following code example demonstrates how to use the method.To run the example, paste the following code in a form called Form1 containing a button called Button1. Ensure the click events are associated with their event-handling methods in this example. The button control's property should be set to 0. When the example is running, double-click the form to trigger the button's click event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.SendKeys/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SendKeys/Overview/form1.cs" id="Snippet1"::: @@ -349,7 +349,7 @@ to send keystrokes or combinations of keystrokes to the active application and wait for the keystroke messages to be processed. You can use this method to send keystrokes to an application and wait for any processes that are started by the keystrokes to be completed. This can be important if the other application must finish before your application can continue. + Use to send keystrokes or combinations of keystrokes to the active application and wait for the keystroke messages to be processed. You can use this method to send keystrokes to an application and wait for any processes that are started by the keystrokes to be completed. This can be important if the other application must finish before your application can continue. > [!NOTE] > Because there is no managed method to activate another application, you can either use this class within the current application or use native Windows methods, such as `FindWindow` and `SetForegroundWindow`, to force focus on other applications. @@ -357,7 +357,7 @@ > [!NOTE] > The class has been updated for the .NET Framework 3.0 to enable its use in applications that run on Windows Vista. The enhanced security of Windows Vista (known as User Account Control or UAC) prevents the previous implementation from working as expected. > -> The class is susceptible to timing issues, which some developers have had to work around. The updated implementation is still susceptible to timing issues, but is slightly faster and may require changes to the workarounds. The class tries to use the previous implementation first, and if that fails, uses the new implementation. As a result, the class may behave differently on different operating systems. Additionally, when the class uses the new implementation, the method will not wait for messages to be processed when they are sent to another process. +> The class is susceptible to timing issues, which some developers have had to work around. The updated implementation is still susceptible to timing issues, but is slightly faster and may require changes to the workarounds. The class tries to use the previous implementation first, and if that fails, uses the new implementation. As a result, the class may behave differently on different operating systems. Additionally, when the class uses the new implementation, the method will not wait for messages to be processed when they are sent to another process. > > If your application relies on consistent behavior regardless of the operating system, you can force the class to use the new implementation by adding the following application setting to your app.config file. > diff --git a/xml/System.Windows.Forms/SplitContainer.xml b/xml/System.Windows.Forms/SplitContainer.xml index 373125d59ca..832184121bb 100644 --- a/xml/System.Windows.Forms/SplitContainer.xml +++ b/xml/System.Windows.Forms/SplitContainer.xml @@ -75,9 +75,9 @@ also eases control placement at design time. For example, to create a window similar to Windows Explorer, add a control to a and set its property to `DockStyle.Fill`. Add a control to the and set its property to `DockStyle.Fill`. To complete the layout, add a control and set its property to `DockStyle.Fill` to have the occupy the remaining space on the . At run time, the user can then resize the width of both controls using the splitter. Use the property to specify that a control should not be resized along with the or other container. - Use to specify where the splitter starts on your form. Use to specify how many pixels the splitter moves at a time. The default for is one pixel. + Use to specify where the splitter starts on your form. Use to specify how many pixels the splitter moves at a time. The default for is one pixel. - Use and to specify how close the splitter bar can be moved to the outside edge of a panel. The default minimum size of a panel is 25 pixels. + Use and to specify how close the splitter bar can be moved to the outside edge of a panel. The default minimum size of a panel is 25 pixels. Use the property to specify horizontal orientation. The default orientation of the is vertical. @@ -86,7 +86,7 @@ ## Examples - The following code example shows both a vertical and horizontal . The vertical splitter moves in 10-pixel increments. The left panel of the vertical contains a control, and its right panel contains a horizontal . Both panels of the horizontal are filled with controls, and the top panel is defined as a so that it does not resize when you resize the container. Moving the vertical splitter raises the event, signified in this example by a change to the cursor style. The event is raised when you stop moving the splitter. This is signified in this example by the cursor style reverting to the default. + The following code example shows both a vertical and horizontal . The vertical splitter moves in 10-pixel increments. The left panel of the vertical contains a control, and its right panel contains a horizontal . Both panels of the horizontal are filled with controls, and the top panel is defined as a so that it does not resize when you resize the container. Moving the vertical splitter raises the event, signified in this example by a change to the cursor style. The event is raised when you stop moving the splitter. This is signified in this example by the cursor style reverting to the default. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BasicSplitContainer/CPP/basicsplitcontainer.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SplitContainer/Overview/basicsplitcontainer.cs" id="Snippet1"::: @@ -221,7 +221,7 @@ size is added to the size of any child controls contained in the scrollable control to determine if scroll bars are needed. The property is evaluated when the parent scrollable control is resized or the individual child controls are brought into view, and is used to determine if scroll bars must be displayed. Docked controls are excluded from the calculations that determine if scroll bars must be displayed. + The auto-scroll margin is the distance between any child controls and the edges of the scrollable parent control. The size is added to the size of any child controls contained in the scrollable control to determine if scroll bars are needed. The property is evaluated when the parent scrollable control is resized or the individual child controls are brought into view, and is used to determine if scroll bars must be displayed. Docked controls are excluded from the calculations that determine if scroll bars must be displayed. If the distance from the edge of a child control to the parent scrollable control is less than the value assigned to the property and the property is set to `true`, the appropriate scroll bar is displayed. @@ -430,7 +430,7 @@ property is set to `true`, the will resize automatically to encompass its contents, although it will never be resized to be smaller than its original . This operation will maintain the control's . This property is not relevant to this class. + The contents of a control may change for many reasons; including display data changes; addition of child controls; layout and padding changes; or system font, language, or resolution changes. If the property is set to `true`, the will resize automatically to encompass its contents, although it will never be resized to be smaller than its original . This operation will maintain the control's . This property is not relevant to this class. ]]> @@ -587,7 +587,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. @@ -1184,7 +1184,7 @@ ## Examples - The following code example shows a horizontal splitter whose top panel is defined as a so that it does not resize along with the container. Other basic properties of a horizontal splitter are also shown. This example is part of a larger example provided for the class. + The following code example shows a horizontal splitter whose top panel is defined as a so that it does not resize along with the container. Other basic properties of a horizontal splitter are also shown. This example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BasicSplitContainer/CPP/basicsplitcontainer.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SplitContainer/Overview/basicsplitcontainer.cs" id="Snippet3"::: @@ -1246,7 +1246,7 @@ property to enable or disable splitter movement. For example, you might programmatically set to `true` when refreshing the display, when some other control has the focus, or when an event is occurring for which the display areas divided by the must remain constant, and set to `false` when those circumstances do not apply. + Use the property to enable or disable splitter movement. For example, you might programmatically set to `true` when refreshing the display, when some other control has the focus, or when an event is occurring for which the display areas divided by the must remain constant, and set to `false` when those circumstances do not apply. ]]> @@ -1287,7 +1287,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1331,11 +1331,11 @@ event handler allows the user to move the splitter down when the DOWN arrow key is pressed. The event handler also draws the to show the current position of the splitter while it is moving. + By default, the event handler allows the user to move the splitter down when the DOWN arrow key is pressed. The event handler also draws the to show the current position of the splitter while it is moving. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1379,11 +1379,11 @@ event handler allows the user to move the splitter up when the UP arrow key is pressed. The event handler also draws the to show the current position of the splitter while it is moving. + By default, the event handler allows the user to move the splitter up when the UP arrow key is pressed. The event handler also draws the to show the current position of the splitter while it is moving. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1429,7 +1429,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1474,7 +1474,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1550,11 +1550,11 @@ event handler allows the user to track the splitter position while it is moved down with the mouse. also draws the to show the current position of the splitter while it is moving. The keeps track of the initial in case the user cancels the move. + By default, the event handler allows the user to track the splitter position while it is moved down with the mouse. also draws the to show the current position of the splitter while it is moving. The keeps track of the initial in case the user cancels the move. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1601,7 +1601,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1650,11 +1650,11 @@ event handler allows the user to track the splitter position while it is moved with the mouse. also draws the to show the current position of the splitter while it is moving. The keeps track of the initial in case the user cancels the move. + By default, the event handler allows the user to track the splitter position while it is moved with the mouse. also draws the to show the current position of the splitter while it is moving. The keeps track of the initial in case the user cancels the move. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1699,11 +1699,11 @@ event handler allows the user to track the splitter position while it is moved up with the mouse. also draws the to show the current position of the splitter while it is moving. The keeps track of the initial in case the user cancels the move. + By default, the event handler allows the user to track the splitter position while it is moved up with the mouse. also draws the to show the current position of the splitter while it is moving. The keeps track of the initial in case the user cancels the move. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1750,7 +1750,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1794,7 +1794,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1875,7 +1875,7 @@ event is raised after the splitter has been moved. When the is in the process of moving, use the event and the event handler. + The event is raised after the splitter has been moved. When the is in the process of moving, use the event and the event handler. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1929,7 +1929,7 @@ event is raised while the splitter is in the process of moving. After the has moved, use the event and the event handler. + The event is raised while the splitter is in the process of moving. After the has moved, use the event and the event handler. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2155,14 +2155,14 @@ property to configure the left panel of a vertical or the top panel of a horizontal . For example, you can specify the minimum size of the panel by changing the value of the property, set the property to `Panel1` so that the panel remains the same size when the container is resized, or you can get or set the panel's and properties. + Use the property to configure the left panel of a vertical or the top panel of a horizontal . For example, you can specify the minimum size of the panel by changing the value of the property, set the property to `Panel1` so that the panel remains the same size when the container is resized, or you can get or set the panel's and properties. - You cannot remove from the . + You cannot remove from the . > [!NOTE] -> If or contains no control that can receive the focus, the focus remains on the splitter when it is clicked. To change the focus to or , set the property of to 0 and the property of to 1. +> If or contains no control that can receive the focus, the focus remains on the splitter when it is clicked. To change the focus to or , set the property of to 0 and the property of to 1. - If or contains no control that can receive the focus, the focus remains on the splitter when it is clicked. To change the focus to or , set the property of to 0 and the property of to 1. + If or contains no control that can receive the focus, the focus remains on the splitter when it is clicked. To change the focus to or , set the property of to 0 and the property of to 1. ]]> @@ -2257,12 +2257,12 @@ ## Remarks Use the property to prevent the splitter from moving too close to the left or top edge of the container. For example, you might want to prevent some of the display area of a from being covered. - If the property is `Vertical` (the default), returns the minimum distance in pixels of the splitter from the left edge of . If the property is `Horizontal`, returns the minimum distance in pixels of the splitter from the top edge of . + If the property is `Vertical` (the default), returns the minimum distance in pixels of the splitter from the left edge of . If the property is `Horizontal`, returns the minimum distance in pixels of the splitter from the top edge of . ## Examples - The following code example shows a vertical splitter where the minimum size of (the left panel) is set to 30 pixels, which is now the minimum distance the splitter can be from the left edge of the container. Other basic properties of a vertical splitter are also shown. This example is part of a larger example provided for the class. + The following code example shows a vertical splitter where the minimum size of (the left panel) is set to 30 pixels, which is now the minimum distance the splitter can be from the left edge of the container. Other basic properties of a vertical splitter are also shown. This example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BasicSplitContainer/CPP/basicsplitcontainer.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SplitContainer/Overview/basicsplitcontainer.cs" id="Snippet2"::: @@ -2323,12 +2323,12 @@ property to configure the right panel of a vertical or the bottom panel of a horizontal . For example, you can specify the minimum size of the panel by changing the value of the property, set the property to `Panel2` so that the panel remains the same size when the container is resized, or you can get or set the panel's and properties. + Use the property to configure the right panel of a vertical or the bottom panel of a horizontal . For example, you can specify the minimum size of the panel by changing the value of the property, set the property to `Panel2` so that the panel remains the same size when the container is resized, or you can get or set the panel's and properties. - You cannot remove from the . + You cannot remove from the . > [!NOTE] -> If or contains no control that can receive the focus, the focus remains on the splitter when it is clicked. To change the focus to or , set the property of to 0 and the property of to 1. +> If or contains no control that can receive the focus, the focus remains on the splitter when it is clicked. To change the focus to or , set the property of to 0 and the property of to 1. ]]> @@ -2423,12 +2423,12 @@ ## Remarks Use the property to prevent the splitter from moving too close to the right or bottom edge of the container. For example, you might want to prevent some of the display area of a from being covered. - If the property is `Vertical` (the default), returns the minimum distance in pixels that the splitter can be from the right edge of . If the property is `Horizontal`, returns the minimum distance in pixels that the splitter can be from the bottom edge of . + If the property is `Vertical` (the default), returns the minimum distance in pixels that the splitter can be from the right edge of . If the property is `Horizontal`, returns the minimum distance in pixels that the splitter can be from the bottom edge of . ## Examples - The following code example shows a vertical splitter where the minimum size of (the right panel) is set to 20 pixels, which is now the minimum distance the splitter can be from the right edge of the container. Other basic properties of a vertical splitter are also shown. This example is part of a larger example provided for the class. + The following code example shows a vertical splitter where the minimum size of (the right panel) is set to 20 pixels, which is now the minimum distance the splitter can be from the right edge of the container. Other basic properties of a vertical splitter are also shown. This example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/BasicSplitContainer/CPP/basicsplitcontainer.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SplitContainer/Overview/basicsplitcontainer.cs" id="Snippet2"::: @@ -2476,7 +2476,7 @@ method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. The run time calls this method only when the control is hosted in a Windows Forms application or as an ActiveX control. + This method is called during message preprocessing to handle dialog box key characters, such as TAB, LEFT ARROW, RIGHT ARROW, UP ARROW, and DOWN ARROW. Keys that include the ALT or CONTROL modifiers are not handled. This method is called only if the method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. The run time calls this method only when the control is hosted in a Windows Forms application or as an ActiveX control. ]]> @@ -2524,15 +2524,15 @@ controls the tab focus order in the following manner: + controls the tab focus order in the following manner: -- From the first control outside the to the first control on . +- From the first control outside the to the first control on . -- All controls on . +- All controls on . - The splitter (so that the user can use the arrow keys to move the splitter). -- All controls on . +- All controls on . - The second control outside the that is next in the tab order. @@ -2705,7 +2705,7 @@ property to determine or specify the distance in pixels of the splitter from the left or top edge of the container. You can both specify an initial distance and change the distance at design time or run time. If is `Horizontal`, is calculated in pixels from the top edge of the . If is `Vertical`, is calculated in pixels from the left edge of the . + Use the property to determine or specify the distance in pixels of the splitter from the left or top edge of the container. You can both specify an initial distance and change the distance at design time or run time. If is `Horizontal`, is calculated in pixels from the top edge of the . If is `Vertical`, is calculated in pixels from the left edge of the . @@ -2919,9 +2919,9 @@ to get the width and height of the splitter relative to the . The , , , , and event handlers draw the to show the current position of the splitter while it is moving. + Use to get the width and height of the splitter relative to the . The , , , , and event handlers draw the to show the current position of the splitter while it is moving. - The meaning of the values vary depending on the . The output of is in the format `{X, Y, Width, Height}`. The following table shows the meaning of the values for vertical and horizontal splitters. + The meaning of the values vary depending on the . The output of is in the format `{X, Y, Width, Height}`. The following table shows the meaning of the values for vertical and horizontal splitters. |Dimension|Vertical Splitter|Horizontal Splitter| |---------------|-----------------------|-------------------------| @@ -3040,7 +3040,7 @@ to `true` to give input focus to a splitter so that it can be moved with the arrow keys as well as with the mouse. Starting in the .NET Framework 4, setting to `false` excludes the splitter and any of the controls that are contained in the from the collection of controls in the tab order. To enable controls to get focus by using the TAB key, create a control that inherits from . Create a new property named `TabStop` and override the method. The following example demonstrates how to accomplish this. + When the user presses the TAB key, the input focus is set to the next control in the tab order of the form. Set to `true` to give input focus to a splitter so that it can be moved with the arrow keys as well as with the mouse. Starting in the .NET Framework 4, setting to `false` excludes the splitter and any of the controls that are contained in the from the collection of controls in the tab order. To enable controls to get focus by using the TAB key, create a control that inherits from . Create a new property named `TabStop` and override the method. The following example demonstrates how to accomplish this. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/SplitContainer/TabStop/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/SplitContainer/TabStop/module1.vb" id="Snippet1"::: @@ -3185,9 +3185,9 @@ method after getting filtered through the method. + All messages are sent to the method after getting filtered through the method. - The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)). + The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)). ]]> diff --git a/xml/System.Windows.Forms/Splitter.xml b/xml/System.Windows.Forms/Splitter.xml index 263644de975..bf645b8cc7f 100644 --- a/xml/System.Windows.Forms/Splitter.xml +++ b/xml/System.Windows.Forms/Splitter.xml @@ -73,7 +73,7 @@ ## Remarks The control enables the user to resize controls that are docked to the edges of the control at run time. When the user passes the mouse pointer over the control, the cursor changes to indicate that the controls docked to the control can be resized. The control enables the user to resize the docked control that is immediately before it in the docking order. Therefore, to enable the user to resize a docked control, dock the control you want the user to be able to resize to an edge of a container, and then dock a splitter to the same side of that container. For example, to create a window similar to Windows Explorer, add a control to a form and set its property to `DockStyle.Left`. Add a control to the form and set its property to `DockStyle.Left` as well. To complete the form layout, add a control and set its property to `DockStyle.Fill` to have the occupy the remaining space on the form. At run time, the user can then resize the width of the control (as well as the control) by moving the control. - To ensure that the control does not resize controls docked to a size that is too small to be useful to the user, you use the and properties. The and properties determine the minimum size that controls docked to the left and right (or top and bottom if a horizontal control) can be sized to. If the other controls on your form that the control is docked to display a specific style of border, you can use the property to match the border style of the controls that are docked to it. + To ensure that the control does not resize controls docked to a size that is too small to be useful to the user, you use the and properties. The and properties determine the minimum size that controls docked to the left and right (or top and bottom if a horizontal control) can be sized to. If the other controls on your form that the control is docked to display a specific style of border, you can use the property to match the border style of the controls that are docked to it. You might want to set a maximum size limit on controls that the control is docked to. The and events enable you to determine when the user is resizing a docked control. You can use the property in an event handler for the or events to determine the size of the control that the control is docked to and set the property to a different value to limit the docked control's width to a specified maximum width (or height if a horizontally aligned control). @@ -83,7 +83,7 @@ ## Examples - The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . + The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Splitter Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Splitter/Overview/form1.cs" id="Snippet1"::: @@ -122,12 +122,12 @@ and properties are set to 25. The property is set to `DockStyle.Left` by default. + By default, the and properties are set to 25. The property is set to `DockStyle.Left` by default. ## Examples - The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . + The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Splitter Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Splitter/Overview/form1.cs" id="Snippet1"::: @@ -1268,7 +1268,7 @@ ## Examples - The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . + The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Splitter Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Splitter/Overview/form1.cs" id="Snippet1"::: @@ -1332,7 +1332,7 @@ ## Examples - The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . + The following code example uses a control in combination with and controls to create a window similar to Windows Explorer. To identify the and controls, nodes and items are added to both controls. The example uses the and properties of the to prevent the or control from being sized too small or too large. This example requires that the method created in this example is defined within a and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Splitter Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Splitter/Overview/form1.cs" id="Snippet1"::: @@ -1417,7 +1417,7 @@ method begins dragging the `Splitter` control to resize the docked control that is immediately before `Splitter` in the docking order. + The method begins dragging the `Splitter` control to resize the docked control that is immediately before `Splitter` in the docking order. ]]> @@ -1457,7 +1457,7 @@ method moves the control to resize the docked control that is immediately before in the docking order. + If the user holds down left mouse button and moves the mouse, the method moves the control to resize the docked control that is immediately before in the docking order. ]]> @@ -1497,7 +1497,7 @@ method resizes the docked control that is immediately before Splitter in the docking order. + The method resizes the docked control that is immediately before Splitter in the docking order. ]]> @@ -1539,7 +1539,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1587,7 +1587,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1757,7 +1757,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Splitter1`. Then ensure that the event handler is associated with the event. @@ -1810,7 +1810,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `Splitter1`. Then ensure that the event handler is associated with the event. @@ -2058,7 +2058,7 @@ method returns a string that includes the type and the values for the and properties. + The method returns a string that includes the type and the values for the and properties. ]]> diff --git a/xml/System.Windows.Forms/SplitterCancelEventArgs.xml b/xml/System.Windows.Forms/SplitterCancelEventArgs.xml index 96d2f613a90..e73ad68cb61 100644 --- a/xml/System.Windows.Forms/SplitterCancelEventArgs.xml +++ b/xml/System.Windows.Forms/SplitterCancelEventArgs.xml @@ -24,16 +24,16 @@ Provides data for splitter events. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet547"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: + ]]> @@ -106,16 +106,16 @@ Gets the X coordinate of the mouse pointer in client coordinates. An integer representing the X coordinate of the mouse pointer in client coordinates. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet547"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: + ]]> @@ -153,16 +153,16 @@ Gets the Y coordinate of the mouse pointer in client coordinates. An integer representing the Y coordinate of the mouse pointer in client coordinates. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet547"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: + ]]> @@ -204,16 +204,16 @@ Gets or sets the X coordinate of the upper left corner of the in client coordinates. An integer representing the X coordinate of the upper left corner of the . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet547"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: + ]]> @@ -255,16 +255,16 @@ Gets or sets the Y coordinate of the upper left corner of the in client coordinates. An integer representing the Y coordinate of the upper left corner of the . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet547"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet547"::: + ]]> diff --git a/xml/System.Windows.Forms/SplitterEventArgs.xml b/xml/System.Windows.Forms/SplitterEventArgs.xml index 3a026f297bc..951ff2a2acf 100644 --- a/xml/System.Windows.Forms/SplitterEventArgs.xml +++ b/xml/System.Windows.Forms/SplitterEventArgs.xml @@ -39,7 +39,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. @@ -142,7 +142,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. @@ -202,7 +202,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. @@ -258,7 +258,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. @@ -314,7 +314,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `SplitContainer1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/SplitterPanel.xml b/xml/System.Windows.Forms/SplitterPanel.xml index f2b56db2887..785d980a777 100644 --- a/xml/System.Windows.Forms/SplitterPanel.xml +++ b/xml/System.Windows.Forms/SplitterPanel.xml @@ -54,11 +54,11 @@ Creates a panel that is associated with a . - is a member of its associated rather than being a member of the underlying form. At design time, the is accessible through the or properties of . - + is a member of its associated rather than being a member of the underlying form. At design time, the is accessible through the or properties of . + ]]> diff --git a/xml/System.Windows.Forms/StatusBar+StatusBarPanelCollection.xml b/xml/System.Windows.Forms/StatusBar+StatusBarPanelCollection.xml index fe38117a1a0..ed02cd9c955 100644 --- a/xml/System.Windows.Forms/StatusBar+StatusBarPanelCollection.xml +++ b/xml/System.Windows.Forms/StatusBar+StatusBarPanelCollection.xml @@ -53,14 +53,14 @@ ## Remarks The class stores the panels displayed in the . Each object in the collection is an instance of the class which defines the display characteristics and behaviors of a panel displayed in a . - There are a number of ways to add panels to the collection. The method provides the ability to add a single panel to the collection. To add a number of panels to the collection, you create an array of objects and assign it to the method. If you want to insert a panel at a specific location within the collection, you can use the method. To remove panels, you can use either the method or the method if you know where the panel is located within the collection. The method enables you to remove all panels from the collection instead of using the method to remove a single panel at a time. + There are a number of ways to add panels to the collection. The method provides the ability to add a single panel to the collection. To add a number of panels to the collection, you create an array of objects and assign it to the method. If you want to insert a panel at a specific location within the collection, you can use the method. To remove panels, you can use either the method or the method if you know where the panel is located within the collection. The method enables you to remove all panels from the collection instead of using the method to remove a single panel at a time. - In addition to methods and properties for adding and removing panels, the also provides methods to find panels within the collection. The method enables you to determine whether a panel is a member of the collection. Once you know that the panel is located within the collection, you can use the method to determine where the panel is located within the collection. + In addition to methods and properties for adding and removing panels, the also provides methods to find panels within the collection. The method enables you to determine whether a panel is a member of the collection. Once you know that the panel is located within the collection, you can use the method to determine where the panel is located within the collection. ## Examples - The following code example creates a control on a form and adds two objects. One of the , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. One of the , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -142,7 +142,7 @@ control to display more than one type of information. This version of the method creates a new with the text specified in the `text` parameter and adds it to collection. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To insert a panel at a specific position in the collection, use the method. To add a set of panels to the collection in a single operation, use the method. + You can add panels to a control to display more than one type of information. This version of the method creates a new with the text specified in the `text` parameter and adds it to collection. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To insert a panel at a specific position in the collection, use the method. To add a set of panels to the collection in a single operation, use the method. ]]> @@ -181,12 +181,12 @@ control to display more than one type of information. This version of the method adds the specified in the `value` parameter to the collection. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To insert a panel at a specific position in the collection, use the method. To add a set of panels to the collection in a single operation, use the method. + You can add panels to a control to display more than one type of information. This version of the method adds the specified in the `value` parameter to the collection. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To insert a panel at a specific position in the collection, use the method. To add a set of panels to the collection in a single operation, use the method. ## Examples - The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -230,7 +230,7 @@ control to display more than one type of information. The method adds an array of objects specified in the `panels` parameter to the collection. All existing panels in the collection are removed from the collection before inserting new panels. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To add a single to the collection, use the method. To insert a panel at a specific position in the control (and in this collection), use the method. + You can add panels to a control to display more than one type of information. The method adds an array of objects specified in the `panels` parameter to the collection. All existing panels in the collection are removed from the collection before inserting new panels. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To add a single to the collection, use the method. To insert a panel at a specific position in the control (and in this collection), use the method. ]]> @@ -269,7 +269,7 @@ , use the or method. + When you remove panels from the collection, all information about the deleted panels is lost. To remove a single panel from the , use the or method. ]]> @@ -308,7 +308,7 @@ method enables you to determine whether a panel is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the panel is located within the collection. + The method enables you to determine whether a panel is a member of the collection. Once you know that the item is located within the collection, you can use the method to determine where the panel is located within the collection. ]]> @@ -347,7 +347,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. ]]> @@ -457,7 +457,7 @@ method enables you to determine where a panel is located within the collection. To determine whether an item is located within the collection before calling this method, use the method. + The method enables you to determine where a panel is located within the collection. To determine whether an item is located within the collection before calling this method, use the method. ]]> @@ -493,11 +493,11 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. The property corresponds to the key for a in the . The key comparison is not case-sensitive. - If the `key` parameter is `null` or an empty string, returns -1. + If the `key` parameter is `null` or an empty string, returns -1. ]]> @@ -534,7 +534,7 @@ control to display more than one type of information. The method enables you to create a new and insert it at a specific location within the collection. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To add a panel to the end of the collection, use the method. To add a set of panels to the collection in a single operation, use the method. + You can add panels to a control to display more than one type of information. The method enables you to create a new and insert it at a specific location within the collection. The order in which panels are located in the represents the order that panels are displayed within the control. Panels are displayed from left to right starting with the first panel in the collection. The property of the control does not change the order in which panels are displayed in the . To add a panel to the end of the collection, use the method. To add a set of panels to the collection in a single operation, use the method. ]]> @@ -621,7 +621,7 @@ stored at a specific location within the collection. To determine the index of a specific panel within the collection, use the method. + You can use this method to obtain the stored at a specific location within the collection. To determine the index of a specific panel within the collection, use the method. ]]> @@ -661,7 +661,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. ]]> @@ -696,7 +696,7 @@ by specifying the actual to remove from the collection. To specify the index of the panel to remove instead of the panel itself, use the method. To remove all panels from the collection, use the method. + When you remove a panel from the list, the indexes change for subsequent items in the collection. All information about the removed panel is deleted. You can use this method to remove a specific panel from the by specifying the actual to remove from the collection. To specify the index of the panel to remove instead of the panel itself, use the method. To remove all panels from the collection, use the method. ]]> @@ -737,7 +737,7 @@ method. To remove all panels from the control, use the method. + When you remove a panel from the collection, the indexes change for subsequent panels in the collection. All information about the removed panel is deleted. You can use this method to remove a specific panel from the list by specifying the index of the panel to remove from the collection. To specify the panel to remove instead of the index to the panel, use the method. To remove all panels from the control, use the method. ]]> diff --git a/xml/System.Windows.Forms/StatusBar.xml b/xml/System.Windows.Forms/StatusBar.xml index e04337e28ef..41bcc1885eb 100644 --- a/xml/System.Windows.Forms/StatusBar.xml +++ b/xml/System.Windows.Forms/StatusBar.xml @@ -74,14 +74,14 @@ This class is not available in .NET 5 and later versions. Use the control provides properties that enable you to customize the appearance of the control. If the is displayed on a form that can be resized, you can use the property to display a sizing grip in the lower-right corner of the form to indicate to users that the form can be resized. The property enables you to display panels within your or to display only the value of the property of the control. - The default has no panels. To add panels to a you can use the method of the class that is accessible through the property of the control. You can also use the object provided through the property to remove panels from the control and access a specific to manipulate the panel. + The default has no panels. To add panels to a you can use the method of the class that is accessible through the property of the control. You can also use the object provided through the property to remove panels from the control and access a specific to manipulate the panel. If you want to determine when a object within a control is clicked, you can create an event handler for the event. To perform owner-draw operations on a panel, you can create an event handler for the event. The event data passed to the event handler provides information on the panel to draw and a object to use to perform drawing tasks. - When you create an instance of , the read/write properties are set to initial values. For a list of these values, see the constructor. + When you create an instance of , the read/write properties are set to initial values. For a list of these values, see the constructor. ## Examples - The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -122,16 +122,16 @@ This class is not available in .NET 5 and later versions. Use the || -||`false`| -||`true`| +||| +||`false`| +||`true`| You can change the value for any of these properties through a separate call to the property. ## Examples - The following code example demonstrates how to construct a and use the , , , , and members and how to handle the event. + The following code example demonstrates how to construct a and use the , , , , and members and how to handle the event. To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or `Load` method. @@ -338,7 +338,7 @@ This class is not available in .NET 5 and later versions. Use the has no effect on the appearance of the control, therefore it is not shown in the designer or by IntelliSense. + Setting the has no effect on the appearance of the control, therefore it is not shown in the designer or by IntelliSense. ]]> @@ -848,7 +848,7 @@ This class is not available in .NET 5 and later versions. Use the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -898,7 +898,7 @@ This class is not available in .NET 5 and later versions. Use the [!NOTE] -> When overriding in a derived class, be sure to call the base class's method. +> When overriding in a derived class, be sure to call the base class's method. ]]> @@ -1043,7 +1043,7 @@ This class is not available in .NET 5 and later versions. Use the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1156,7 +1156,7 @@ This class is not available in .NET 5 and later versions. Use the , , , , and members and how to handle the event. + The following code example demonstrates how to use the , , , , and members and how to handle the event. To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or `Load` method. @@ -1216,7 +1216,7 @@ This class is not available in .NET 5 and later versions. Use the control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second object, named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second object, named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -1265,12 +1265,12 @@ This class is not available in .NET 5 and later versions. Use the control displays the value of its property without any panels. When `ShowPanels` is set to `true`, any objects specified in the control are displayed. No panels are initially created when you create an instance of the class. You can add panels to a control by using the method of the class. This collection class can be accessed through the property of . + By default, the control displays the value of its property without any panels. When `ShowPanels` is set to `true`, any objects specified in the control are displayed. No panels are initially created when you create an instance of the class. You can add panels to a control by using the method of the class. This collection class can be accessed through the property of . ## Examples - The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. One of the objects, named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses and the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example requires that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -1323,7 +1323,7 @@ This class is not available in .NET 5 and later versions. Use the , , , , and members and how to handle the event. + The following code example demonstrates how to use the , , , , and members and how to handle the event. To run the example, paste the following code in a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event handler. diff --git a/xml/System.Windows.Forms/StatusBarPanel.xml b/xml/System.Windows.Forms/StatusBarPanel.xml index 2e0b807ead1..c9e9e4198e5 100644 --- a/xml/System.Windows.Forms/StatusBarPanel.xml +++ b/xml/System.Windows.Forms/StatusBarPanel.xml @@ -66,10 +66,10 @@ This class is not available in .NET 5 and later versions. Use the control is typically used to display textual information, you can also provide your own type of display to a . The property enables you to specify how the will be drawn. By default, the property is used to display the value of the property (and an icon, if specified in the property). If the property is set to , you can draw your own information into the panel. You can use this feature to draw a progress bar or an animated icon in the panel. - When you create an instance of the class, the read/write properties are set to initial values. For a list of these values, see the constructor. + When you create an instance of the class, the read/write properties are set to initial values. For a list of these values, see the constructor. ## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -106,22 +106,22 @@ This class is not available in .NET 5 and later versions. Use the || -||| -||| -||`null`| -||10| -||| -||A zero-length string.| -||A zero-length string.| -||100| +||| +||| +||| +||`null`| +||10| +||| +||A zero-length string.| +||A zero-length string.| +||100| You can change the value for any of these properties through a separate call to the property. ## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -176,7 +176,7 @@ This class is not available in .NET 5 and later versions. Use the , , , , and properties, and how to handle the event. + The following code example demonstrates how to use the , , , , and properties, and how to handle the event. To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-handling method. @@ -233,12 +233,12 @@ This class is not available in .NET 5 and later versions. Use the objects set to have precedence over those panels set to the value. For example, a that has its property set to is shortened if a with the property set to requires that space. - You can use to ensure that the contents of a are properly displayed in a control that contains more than one panel. For example, you might want a panel that contains text to adjust automatically to the amount of text it is displaying (), while another panel on the that displays an owner-drawn progress bar would need to be a fixed size (). + You can use to ensure that the contents of a are properly displayed in a control that contains more than one panel. For example, you might want a panel that contains text to adjust automatically to the amount of text it is displaying (), while another panel on the that displays an owner-drawn progress bar would need to be a fixed size (). ## Examples - The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -279,7 +279,7 @@ This class is not available in .NET 5 and later versions. Use the method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. + This method is used to start the initialization of a component that is used on a form or used by another component. The method ends the initialization. Using the and methods prevents the control from being used before it is fully initialized. ]]> @@ -331,7 +331,7 @@ This class is not available in .NET 5 and later versions. Use the control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -414,7 +414,7 @@ This class is not available in .NET 5 and later versions. Use the method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. + This method is used to end the initialization of a component that is used by another component. The method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. ]]> @@ -598,7 +598,7 @@ This class is not available in .NET 5 and later versions. Use the control that a is contained within. objects are added to a control by calling the method of the class. The of a control is accessible through the property. + You can use this property to determine the control that a is contained within. objects are added to a control by calling the method of the class. The of a control is accessible through the property. ]]> @@ -750,7 +750,7 @@ This class is not available in .NET 5 and later versions. Use the control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -804,7 +804,7 @@ This class is not available in .NET 5 and later versions. Use the control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . + The following code example creates a control on a form and adds two objects. The first , named `panel1`, displays status text for an application. The second , named `panel2`, displays the current date and uses the property of the class to display the current time. The example uses the property to ensure that the panels are displayed instead of a standard panel, and it uses the property to access the method of the to add the panels to the . The example also uses the , , , and properties to initialize the objects. This example assumes that the method defined in the example is defined and called from the constructor of a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/StatusBar and StatusBarPanel Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/StatusBar+StatusBarPanelCollection/Overview/form1.cs" id="Snippet1"::: @@ -884,7 +884,7 @@ This class is not available in .NET 5 and later versions. Use the , , , , and properties, and how to handle the event. + The following code example demonstrates how to use the , , , , and properties, and how to handle the event. To run the example, paste the following code into a form. Call the `InitializeStatusBarPanels` method in the form's constructor or event-handling method. diff --git a/xml/System.Windows.Forms/StatusBarPanelClickEventArgs.xml b/xml/System.Windows.Forms/StatusBarPanelClickEventArgs.xml index 1c8edd0cdd6..00b3a69f389 100644 --- a/xml/System.Windows.Forms/StatusBarPanelClickEventArgs.xml +++ b/xml/System.Windows.Forms/StatusBarPanelClickEventArgs.xml @@ -42,7 +42,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `StatusBar1`. Then ensure that the event handler is associated with the event. @@ -129,7 +129,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `StatusBar1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/StatusStrip.xml b/xml/System.Windows.Forms/StatusStrip.xml index 3af104558c4..24c662ee41f 100644 --- a/xml/System.Windows.Forms/StatusStrip.xml +++ b/xml/System.Windows.Forms/StatusStrip.xml @@ -58,7 +58,7 @@ The following items are specifically designed to work seamlessly with both control displays information about an object being viewed on a , the object's components, or contextual information that relates to that object's operation within your application. Typically, a control consists of objects, each of which displays text, an icon, or both. The can also contain , , and controls. - The default has no panels. To add panels to a , use the method, or use the [StatusStrip Items Collection Editor](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/ms233631(v=vs.100)) at design time to add, remove, or reorder items and modify properties. Use the [StatusStrip Tasks Dialog Box](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2008/ms233642(v=vs.90)) at design time to run common commands. + The default has no panels. To add panels to a , use the method, or use the [StatusStrip Items Collection Editor](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2010/ms233631(v=vs.100)) at design time to add, remove, or reorder items and modify properties. Use the [StatusStrip Tasks Dialog Box](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2008/ms233642(v=vs.90)) at design time to run common commands. replaces and extends the control. is not available in .NET 5 and later versions. @@ -172,13 +172,13 @@ The following items are specifically designed to work seamlessly with both method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. ## Examples - For a code example demonstrating how to use , see . + For a code example demonstrating how to use , see . ]]> @@ -223,7 +223,7 @@ The following items are specifically designed to work seamlessly with both method to add a with commonly used characteristics to a . + Use the method to add a with commonly used characteristics to a . ]]> @@ -437,7 +437,7 @@ The following items are specifically designed to work seamlessly with both property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). + Use the property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. @@ -615,7 +615,7 @@ Use the `LayoutStyle` property to get or set how items are arranged on the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -654,7 +654,7 @@ Use the `LayoutStyle` property to get or set how items are arranged on the to do custom table layouts. The default value of is . + Override to do custom table layouts. The default value of is . ]]> @@ -993,7 +993,7 @@ Use the `LayoutStyle` property to get or set how items are arranged on the structure wraps messages that Windows sends. You can use this structure to wrap a message and assign it to the window procedure to be dispatched. You can also use this structure to get information about a message the system sends to your application or controls. - You cannot create the structure directly. To create a structure, use the method. To make creating structures more efficient, the structure uses its pool of existing structures instead of creating an instance of a new one, if possible. However, if a structure is not available in the pool, a new instance of the structure is created. + You cannot create the structure directly. To create a structure, use the method. To make creating structures more efficient, the structure uses its pool of existing structures instead of creating an instance of a new one, if possible. However, if a structure is not available in the pool, a new instance of the structure is created. ]]> diff --git a/xml/System.Windows.Forms/SystemInformation.xml b/xml/System.Windows.Forms/SystemInformation.xml index 6d41edba627..c19393d30bb 100644 --- a/xml/System.Windows.Forms/SystemInformation.xml +++ b/xml/System.Windows.Forms/SystemInformation.xml @@ -611,9 +611,9 @@ property retrieves the NetBIOS name of the local computer. This is accomplished with a call into the native System Information function GetComputerName. This name is established at system startup, when the system reads it from the registry. If the local computer is a node in a cluster, returns the name of the cluster virtual server. + The property retrieves the NetBIOS name of the local computer. This is accomplished with a call into the native System Information function GetComputerName. This name is established at system startup, when the system reads it from the registry. If the local computer is a node in a cluster, returns the name of the cluster virtual server. - You can use the method to determine the name of the computer that is displayed to other users on a network. + You can use the method to determine the name of the computer that is displayed to other users on a network. @@ -1001,7 +1001,7 @@ ## Remarks The property indicates the thickness of the frame, in pixels, around the perimeter of a window that has a caption but is not sizable. - The property of is the height of the horizontal border and the property of is the width of the vertical border. + The property of is the height of the horizontal border and the property of is the width of the vertical border. @@ -1156,7 +1156,7 @@ ## Remarks The property indicates the width and height of the resizing border for a window. - The value of this property is the width of a vertical resizing border. The value of this property is the height of a horizontal resizing border. + The value of this property is the width of a vertical resizing border. The value of this property is the height of a horizontal resizing border. @@ -1772,7 +1772,7 @@ property indicates the size of the grid rectangle that each icon fits into when the system arranges them in a large-icon view. This value is always greater than or equal to . + The property indicates the size of the grid rectangle that each icon fits into when the system arranges them in a large-icon view. This value is always greater than or equal to . @@ -2310,7 +2310,7 @@ If menu animation is enabled and the value of this property is `true`, menus use fade animation. If menu animation is enabled and the value of this property is `false`, menus use slide animation. If menu animation is disabled, the value of this property is meaningless. > [!NOTE] -> If the value of the is `false`, the value of this property is meaningless. +> If the value of the is `false`, the value of this property is meaningless. On other platforms, this property returns `false`. @@ -2737,7 +2737,7 @@ property indicates the maximum dimensions to which a user can drag resize a window. The value returned by refers to the dimensions of the entire desktop. + The property indicates the maximum dimensions to which a user can drag resize a window. The value returned by refers to the dimensions of the entire desktop. @@ -2831,7 +2831,7 @@ value of this property indicates the default width for a button on a menu-bar, in pixels. The value of this property indicates the height of a menu bar, in pixels. + The value of this property indicates the default width for a button on a menu-bar, in pixels. The value of this property indicates the height of a menu bar, in pixels. @@ -3415,7 +3415,7 @@ indicates whether all monitors currently recognized by the operating system are using the same pixel color format. + The indicates whether all monitors currently recognized by the operating system are using the same pixel color format. Pixel formats define the data structure used to encode pixel color and luminosity information. The enumeration indicates a set of standard pixel color formats. Pixel values can be encoded in a variety of formats, with differing color value ranges and bit precisions, and differing positions of bits in a pixel data format structure. @@ -3658,7 +3658,7 @@ property indicates whether a pointing device is present or installed on the system. This is usually the case, so almost always returns `true`. + The property indicates whether a pointing device is present or installed on the system. This is usually the case, so almost always returns `true`. ## Examples @@ -3755,7 +3755,7 @@ The property indicates whether the system recognizes a mouse wheel on an installed mouse. > [!NOTE] -> This property is equivalent to . +> This property is equivalent to . ## Examples @@ -3906,7 +3906,7 @@ The property indicates whether the system recognizes a mouse wheel on an installed mouse. > [!NOTE] -> This property is equivalent to . +> This property is equivalent to . @@ -4683,14 +4683,14 @@ |Item|Description| |----------|-----------------| -||Indicates whether the slide-open effect for combo boxes is enabled.| -||Indicates whether the gradient effect for window title bars is enabled.| -||Indicates whether hot tracking of user-interface elements, such as menu names on menu bars, is enabled.| -||Indicates whether the smooth-scrolling effect for list boxes is enabled.| -||Indicates whether menu fade or slide animation features are enabled.| -||Indicates whether menu access keys are always underlined.| -||Indicates whether the selection fade effect is enabled.| -||Indicates whether ToolTip animation is enabled.| +||Indicates whether the slide-open effect for combo boxes is enabled.| +||Indicates whether the gradient effect for window title bars is enabled.| +||Indicates whether hot tracking of user-interface elements, such as menu names on menu bars, is enabled.| +||Indicates whether the smooth-scrolling effect for list boxes is enabled.| +||Indicates whether menu fade or slide animation features are enabled.| +||Indicates whether menu access keys are always underlined.| +||Indicates whether the selection fade effect is enabled.| +||Indicates whether ToolTip animation is enabled.| ## Examples The following code example lists all properties of the class in a and displays the current value of the property in a when a list item selected. @@ -5192,7 +5192,7 @@ The position coordinates of the rectangle indicate the position offset, in pixels, of the upper left corner of the virtual screen area relative to the upper left corner of the onscreen area of the primary display. The size values of the rectangle indicate the size of the virtual screen area. > [!NOTE] -> The position coordinate of the rectangle is negative when the virtual screen starts to the left of the left edge of the primary display. The coordinate of the rectangle is negative when the virtual screen starts above the top edge of the primary display. +> The position coordinate of the rectangle is negative when the virtual screen starts to the left of the left edge of the primary display. The coordinate of the rectangle is negative when the virtual screen starts above the top edge of the primary display. ## Examples The following code example lists all properties of the class in a and displays the current value of the property in a when a list item selected. @@ -5240,7 +5240,7 @@ ## Remarks The property indicates the bounds of the screen that can be used by applications. The working area is the desktop area of the display, excluding taskbars, docked windows, and docked tool bars. - always returns the work area of the primary monitor. If you need the work area of a monitor in a multiple display environment, you can call one of the overloads of . + always returns the work area of the primary monitor. If you need the work area of a monitor in a multiple display environment, you can call one of the overloads of . diff --git a/xml/System.Windows.Forms/SystemParameter.xml b/xml/System.Windows.Forms/SystemParameter.xml index 08470179a76..3de0985bbe6 100644 --- a/xml/System.Windows.Forms/SystemParameter.xml +++ b/xml/System.Windows.Forms/SystemParameter.xml @@ -29,13 +29,13 @@ Specifies the system parameter type. - enumeration is primarily used by the method. retrieves whether a is supported on the current version of the operating system. - + enumeration is primarily used by the method. retrieves whether a is supported on the current version of the operating system. + For more information about system-wide parameters, see [SystemParametersInfo](/windows/win32/api/winuser/nf-winuser-systemparametersinfoa). - + ]]> diff --git a/xml/System.Windows.Forms/TabAlignment.xml b/xml/System.Windows.Forms/TabAlignment.xml index 8e0bc544c56..647aaef63ec 100644 --- a/xml/System.Windows.Forms/TabAlignment.xml +++ b/xml/System.Windows.Forms/TabAlignment.xml @@ -24,20 +24,20 @@ Specifies the locations of the tabs in a tab control. - . - - - -## Examples - The following code example demonstrates how to use the and properties and the and enumerations. To run the example, paste the following codein a form containing a called TabControl1. Call the ChangeTheLookOfTheTabControl method in the form's constructor or Load method. - + . + + + +## Examples + The following code example demonstrates how to use the and properties and the and enumerations. To run the example, paste the following codein a form containing a called TabControl1. Call the ChangeTheLookOfTheTabControl method in the form's constructor or Load method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TabControlExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabAlignment/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TabAlignment/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TabAlignment/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/TabAppearance.xml b/xml/System.Windows.Forms/TabAppearance.xml index bf4bfef2185..812bf8fd0a6 100644 --- a/xml/System.Windows.Forms/TabAppearance.xml +++ b/xml/System.Windows.Forms/TabAppearance.xml @@ -24,20 +24,20 @@ Specifies the appearance of the tabs in a tab control. - . - - - -## Examples - The following code example demonstrates how to use the and properties and the and enumerations. To run the example, paste the following codein a form containing a called TabControl1. Call the ChangeTheLookOfTheTabControl method in the form's constructor or Load method. - + . + + + +## Examples + The following code example demonstrates how to use the and properties and the and enumerations. To run the example, paste the following codein a form containing a called TabControl1. Call the ChangeTheLookOfTheTabControl method in the form's constructor or Load method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TabControlExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabAlignment/Overview/form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TabAlignment/Overview/form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TabAlignment/Overview/form1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/TabControl+TabPageCollection.xml b/xml/System.Windows.Forms/TabControl+TabPageCollection.xml index 73d22ca9a86..9df5ab3a749 100644 --- a/xml/System.Windows.Forms/TabControl+TabPageCollection.xml +++ b/xml/System.Windows.Forms/TabControl+TabPageCollection.xml @@ -166,7 +166,7 @@ with one . This example uses the method to add a single tab page to the `tabControl1` tab control. Notice the property is used to get the `tabControl1` controls collection to add the `tabPage1` to this collection. + The following code example creates a with one . This example uses the method to add a single tab page to the `tabControl1` tab control. Notice the property is used to get the `tabControl1` controls collection to add the `tabPage1` to this collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPageCollection.Add/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl+TabPageCollection/Add/form1.cs" id="Snippet1"::: @@ -371,7 +371,7 @@ with three . This example uses the method to add an array of tab pages to the `tabControl1` tab control. Notice that the property gets the `tabControl1` controls collection, in order to add the array of tab pages to this collection. + The following code example creates a with three . This example uses the method to add an array of tab pages to the `tabControl1` tab control. Notice that the property gets the `tabControl1` controls collection, in order to add the array of tab pages to this collection. Use the and namespaces for this collection. @@ -422,7 +422,7 @@ with three . This example uses the method to clear all controls in the `tabControl1` controls collection at one instance. Then, the example adds `tabPage2` back to the collection. Notice that the property is used to get the `tabControl1` controls collection to remove (and add) tab pages from this collection. + The following code example initially creates a with three . This example uses the method to clear all controls in the `tabControl1` controls collection at one instance. Then, the example adds `tabPage2` back to the collection. Notice that the property is used to get the `tabControl1` controls collection to remove (and add) tab pages from this collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPageCollection.Clear/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl+TabPageCollection/Clear/form1.cs" id="Snippet1"::: @@ -469,7 +469,7 @@ with three objects. The first two tab pages are added directly to `tabControl1` by the method. The method determines `tabPage3` is part of the `tabControl1` controls collection. Because `tabPage3` was not found in this collection, it was added by the method. + The following code example initially creates a with three objects. The first two tab pages are added directly to `tabControl1` by the method. The method determines `tabPage3` is part of the `tabControl1` controls collection. Because `tabPage3` was not found in this collection, it was added by the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPageCollection.Contains/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl+TabPageCollection/Contains/form1.cs" id="Snippet1"::: @@ -522,7 +522,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. ]]> @@ -613,7 +613,7 @@ or to throw an exception. + This method creates an enumerator that contains a snapshot of the collection. You can change the collection by changing the enumerator; however, multiple enumerators can simultaneously access the same collection. Changing the collection (either directly or through another enumerator) can thus cause or to throw an exception. Two enumerators created from the same collection at the same time can contain different snapshots. @@ -661,7 +661,7 @@ with one . This example uses the method to retrieve the `tabPage1` index value. A ToolTip is used to display this value. + The following code example creates a with one . This example uses the method to retrieve the `tabPage1` index value. A ToolTip is used to display this value. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPageCollection.IndexOf/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl+TabPageCollection/IndexOf/form1.cs" id="Snippet1"::: @@ -710,9 +710,9 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. - The property corresponds to the key for a in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. + The property corresponds to the key for a in the . The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. ]]> @@ -763,7 +763,7 @@ method allows you to create a new tab page and insert it at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. + The method allows you to create a new tab page and insert it at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. ]]> @@ -804,7 +804,7 @@ method allows you to insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. + The method allows you to insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. ]]> @@ -850,7 +850,7 @@ ## Remarks The property corresponds to the key for a in the . - The method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. + The method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. ]]> @@ -898,7 +898,7 @@ ## Remarks The property corresponds to the key for a in the . - The method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. + The method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. The `imageIndex` parameter refers to an image in the property of the . @@ -955,7 +955,7 @@ ## Remarks The property corresponds to the key for a in the . - The method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. + The method allows you to create and insert a tab page at a specified location. To add a tab page without specifying a particular position in the collection, use the method. If you want to add an array of items to the collection, use the method. The `imageKey` parameter refers to an image in the property of the . @@ -1100,7 +1100,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. ]]> @@ -1140,7 +1140,7 @@ with three . This example uses the method to remove a single tab page, specifically `tabPage2` from the `tabControl1` controls collection. Notice that the property gets the `tabControl1` controls collection to add and remove tab pages from this collection. + The following code example initially creates a with three . This example uses the method to remove a single tab page, specifically `tabPage2` from the `tabControl1` controls collection. Notice that the property gets the `tabControl1` controls collection to add and remove tab pages from this collection. Use the and namespaces with this example. @@ -1193,7 +1193,7 @@ with three . This example uses the method to remove `tabPage1`, which is specified by its index, from the `tabControl1` controls collection. Notice that the property gets the `tabControl1` controls collection to add and remove tab pages from this collection. + The following code example initially creates a with three . This example uses the method to remove `tabPage1`, which is specified by its index, from the `tabControl1` controls collection. Notice that the property gets the `tabControl1` controls collection to add and remove tab pages from this collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPageCollection.RemoveAt/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl+TabPageCollection/RemoveAt/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/TabControl.xml b/xml/System.Windows.Forms/TabControl.xml index c3492634ab8..ed455a995bb 100644 --- a/xml/System.Windows.Forms/TabControl.xml +++ b/xml/System.Windows.Forms/TabControl.xml @@ -66,10 +66,10 @@ The user can change the current by clicking one of the tabs in the control. You can also programmatically change the current by using one of the following properties and methods: -- -- -- -- +- +- +- +- You can respond when the current tab changes by handling one of the following events: @@ -78,11 +78,11 @@ You can respond when the current tab changes by handling one of the following ev - - - The tabs in a are part of the , but not parts of the individual controls. Members of the class, such as the property, affect only the client rectangle of the tab page, but not the tabs. Additionally, the method of the will not hide the tab. To hide the tab, you must remove the control from the collection. + The tabs in a are part of the , but not parts of the individual controls. Members of the class, such as the property, affect only the client rectangle of the tab page, but not the tabs. Additionally, the method of the will not hide the tab. To hide the tab, you must remove the control from the collection. The tab is considered part of the tab page for determining when the and events of the occur. - The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the of the tab page, the raises the appropriate event. + The following events are not raised for the class unless there is at least one in the collection: , , , , , , and . If there is at least one in the collection, and the user interacts with the tab control's header (where the names appear), the raises the appropriate event. However, if the user interaction is within the of the tab page, the raises the appropriate event. Controls contained in a are not created until the tab page is shown, and any data bindings in these controls are not activated until the tab page is shown. @@ -130,7 +130,7 @@ The tab is considered part of the tab page for determining when the with one . The constructor creates an instance of `tabControl1`. + The following code example creates a with one . The constructor creates an instance of `tabControl1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabControl_constructor/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl/.ctor/form1.cs" id="Snippet1"::: @@ -742,12 +742,12 @@ The tab is considered part of the tab page for determining when the is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -814,12 +814,12 @@ The tab is considered part of the tab page for determining when the is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -1041,7 +1041,7 @@ The tab is considered part of the tab page for determining when the with one . This example uses the property to draw a representing the tab page display area of `tabControl1`. Notice that the example uses the method; otherwise, the drawing code overwrites the drawn in the `DrawOnTabPage` method. + The following code example creates a with one . This example uses the property to draw a representing the tab page display area of `tabControl1`. Notice that the example uses the method; otherwise, the drawing code overwrites the drawn in the `DrawOnTabPage` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DisplayRectangle1/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl/DisplayRectangle/form1.cs" id="Snippet1"::: @@ -1485,7 +1485,7 @@ The tab is considered part of the tab page for determining when the with one . This example uses the method to get a `Rectangle` that represents the `tabPage1` tab area. The `myTabRect` `Rectangle` is drawn by the event. + The following code example creates a with one . This example uses the method to get a `Rectangle` that represents the `tabPage1` tab area. The `myTabRect` `Rectangle` is drawn by the event. Use the and namespaces with this example. @@ -1581,7 +1581,7 @@ The tab is considered part of the tab page for determining when the with two objects. The property is set to `true`, which highlights the tab `myTabPage1` or `myTabPage2` when the mouse passes over the tabs. + The following code example creates a with two objects. The property is set to `true`, which highlights the tab `myTabPage1` or `myTabPage2` when the mouse passes over the tabs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/HotTrack/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl/HotTrack/form1.cs" id="Snippet1"::: @@ -1641,7 +1641,7 @@ The tab is considered part of the tab page for determining when the property of that . The acts as the index into the . + To display an image on a tab, set the property of that . The acts as the index into the . @@ -1791,7 +1791,7 @@ The tab is considered part of the tab page for determining when the is `false`, only one row of tabs is displayed, even if all the tabs do not fit in the available space. In that case, however, arrows are displayed that enable the user to navigate to the undisplayed tabs. + If is `false`, only one row of tabs is displayed, even if all the tabs do not fit in the available space. In that case, however, arrows are displayed that enable the user to navigate to the undisplayed tabs. If the property is changed to `false` while the property is set to `Left` or `Right`, the property is automatically reset to `Top`. @@ -1844,7 +1844,7 @@ The tab is considered part of the tab page for determining when the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1889,7 +1889,7 @@ The tab is considered part of the tab page for determining when the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1935,7 +1935,7 @@ The tab is considered part of the tab page for determining when the method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1986,7 +1986,7 @@ This method also raises the event of t Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2032,7 +2032,7 @@ This method also raises the event of t ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2139,7 +2139,7 @@ This method also raises the event of t ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2239,7 +2239,7 @@ This method also raises the event of t Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2352,7 +2352,7 @@ This method also raises the event of t ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2397,7 +2397,7 @@ This method also raises the event of t ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2443,7 +2443,7 @@ This method also raises the event of t ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2487,7 +2487,7 @@ This method also raises the event of t ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2571,7 +2571,7 @@ This method also raises the event of t with two objects. The property is used to create a cushion of 22 pixels around the tab `myTabPage1` and `myTabPage2`. + The following code example creates a with two objects. The property is used to create a cushion of 22 pixels around the tab `myTabPage1` and `myTabPage2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Padding/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl/Padding/form1.cs" id="Snippet1"::: @@ -2744,7 +2744,7 @@ This method also raises the event of t property is primarily useful for developing forms for worldwide audiences. Many containers are designed so that controls are laid out in the container in a left-to-right fashion. These containers are compatible with languages that follow this writing direction. However, when you display the same containers to users of right-to-left languages, it is often preferable to reverse the order of the controls on the form. If both the and properties are `true`, mirroring will be turned on for the container and control placement and text flow will be right-to-left. + The property is primarily useful for developing forms for worldwide audiences. Many containers are designed so that controls are laid out in the container in a left-to-right fashion. These containers are compatible with languages that follow this writing direction. However, when you display the same containers to users of right-to-left languages, it is often preferable to reverse the order of the controls on the form. If both the and properties are `true`, mirroring will be turned on for the container and control placement and text flow will be right-to-left. Changing the value of this property raises the event. @@ -2798,7 +2798,7 @@ This method also raises the event of t ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -2955,12 +2955,12 @@ This method also raises the event of t These events let you perform tasks such as canceling a tab change if a is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -3083,7 +3083,7 @@ This method also raises the event of t ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -3148,7 +3148,7 @@ This method also raises the event of t collection to make it the current tab page. + The tab page must be in the collection to make it the current tab page. @@ -3220,12 +3220,12 @@ This method also raises the event of t These events let you perform tasks such as canceling a tab change if a is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -3648,7 +3648,7 @@ This method also raises the event of t ## Examples - The following code example creates a with one . This example uses the method to add a single tab page to the `tabControl1` tab control. Notice the property is used to get the `tabControl1` controls collection to add the `tabPage1` to this collection. + The following code example creates a with one . This example uses the method to add a single tab page to the `tabControl1` tab control. Notice the property is used to get the `tabControl1` controls collection to add the `tabPage1` to this collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPageCollection.Add/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabControl+TabPageCollection/Add/form1.cs" id="Snippet1"::: @@ -3787,7 +3787,7 @@ This method also raises the event of t property of the control. If there is at least one control on the , this method returns a string that includes the string returned by the method for the first . + The string includes the type and the property of the control. If there is at least one control on the , this method returns a string that includes the string returned by the method for the first . ]]> @@ -3836,7 +3836,7 @@ This method also raises the event of t is visible. If you want the tab control to set the property to `true` for the next in the tab order, call this method with `updateFocus` set to `true`. + This method ensures the appropriate is visible. If you want the tab control to set the property to `true` for the next in the tab order, call this method with `updateFocus` set to `true`. ]]> diff --git a/xml/System.Windows.Forms/TabControlCancelEventArgs.xml b/xml/System.Windows.Forms/TabControlCancelEventArgs.xml index af9f89f5eb8..15e465d539b 100644 --- a/xml/System.Windows.Forms/TabControlCancelEventArgs.xml +++ b/xml/System.Windows.Forms/TabControlCancelEventArgs.xml @@ -35,7 +35,7 @@ ## Remarks Use the property to determine which event is occurring. This enables you to handle multiple event types with one event handler. - Use the and properties to determine which the event is occurring for. + Use the and properties to determine which the event is occurring for. To cancel a tab change in a , set the property to `true`. @@ -44,7 +44,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -156,7 +156,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -207,7 +207,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -255,7 +255,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/TabControlEventArgs.xml b/xml/System.Windows.Forms/TabControlEventArgs.xml index 2f7ced446db..9b43d8fb5aa 100644 --- a/xml/System.Windows.Forms/TabControlEventArgs.xml +++ b/xml/System.Windows.Forms/TabControlEventArgs.xml @@ -35,14 +35,14 @@ ## Remarks Use the property to determine which event is occurring. This enables you to handle multiple event types with one event handler. - Use the and properties to determine which the event is occurring for. + Use the and properties to determine which the event is occurring for. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -149,7 +149,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -200,7 +200,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. @@ -248,7 +248,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TabControl1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/TabDrawMode.xml b/xml/System.Windows.Forms/TabDrawMode.xml index 231f95a2e6b..ed9ba5947ea 100644 --- a/xml/System.Windows.Forms/TabDrawMode.xml +++ b/xml/System.Windows.Forms/TabDrawMode.xml @@ -24,13 +24,13 @@ Specifies whether the tabs in a tab control are owner-drawn (drawn by the parent window), or drawn by the operating system. - . - - The class and its derived classes support owner-draw functionality, but only one type, in which you can draw the tabs individually. - + . + + The class and its derived classes support owner-draw functionality, but only one type, in which you can draw the tabs individually. + ]]> diff --git a/xml/System.Windows.Forms/TabPage+TabPageControlCollection.xml b/xml/System.Windows.Forms/TabPage+TabPageControlCollection.xml index 94564c1ce84..6702596fa26 100644 --- a/xml/System.Windows.Forms/TabPage+TabPageControlCollection.xml +++ b/xml/System.Windows.Forms/TabPage+TabPageControlCollection.xml @@ -109,7 +109,7 @@ ## Examples - The following code example creates a with one . This example uses the method to add a single control, `button1`, to the `tabPage1`. The property is used to get the `tabPage1` controls collection to add controls to the collection. + The following code example creates a with one . This example uses the method to add a single control, `button1`, to the `tabPage1`. The property is used to get the `tabPage1` controls collection to add controls to the collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPageControlCollection.Add/CPP/add.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabPage+TabPageControlCollection/Add/add.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/TabPage.xml b/xml/System.Windows.Forms/TabPage.xml index 14d51505981..4eaed40ada7 100644 --- a/xml/System.Windows.Forms/TabPage.xml +++ b/xml/System.Windows.Forms/TabPage.xml @@ -70,21 +70,21 @@ controls represent the tabbed pages in a control. The order of tab pages in the collection reflects the order of tabs in the control. To change the order of tabs in the control, you must change their positions in the collection by removing them and inserting them at new indexes. + controls represent the tabbed pages in a control. The order of tab pages in the collection reflects the order of tabs in the control. To change the order of tabs in the control, you must change their positions in the collection by removing them and inserting them at new indexes. - controls are constrained by their container, so some of the properties inherited from the base class will have no effect, including , , , , , and . + controls are constrained by their container, so some of the properties inherited from the base class will have no effect, including , , , , , and . - The tabs in a are part of the but not parts of the individual controls. Members of the class, such as the property, affect only the client rectangle of the tab page, but not the tabs. Additionally, the method of the will not hide the tab. To hide the tab, you must remove the control from the collection. + The tabs in a are part of the but not parts of the individual controls. Members of the class, such as the property, affect only the client rectangle of the tab page, but not the tabs. Additionally, the method of the will not hide the tab. To hide the tab, you must remove the control from the collection. > [!NOTE] > The tab is considered part of the tab page for determining when the and events of the occur. - For more information about how this control responds to the and methods, see the following members: , , , , , . + For more information about how this control responds to the and methods, see the following members: , , , , , . > [!NOTE] > Controls contained in a are not created until the tab page is shown, and any data bindings in these controls are not activated until the tab page is shown. -The property lets you indicate whether the background of the tab page should render using the current visual style. This occurs only when the and property values are both `true` and the property of the parent is . Otherwise, the background is painted normally. +The property lets you indicate whether the background of the tab page should render using the current visual style. This occurs only when the and property values are both `true` and the property of the parent is . Otherwise, the background is painted normally. ## Examples The following code example creates a with one . @@ -136,7 +136,7 @@ The property lets yo with one . The constructor instantiates `tabPage1`. + The following code example creates a with one . The constructor instantiates `tabPage1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPage_constructor/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabPage/.ctor/form1.cs" id="Snippet1"::: @@ -183,7 +183,7 @@ The property lets yo ## Examples - This example creates a with a . The constructor accepts the `myTabPage` string as for `tabPage1`. + This example creates a with a . The constructor accepts the `myTabPage` string as for `tabPage1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPage_withText/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabPage/.ctor/form11.cs" id="Snippet1"::: @@ -399,9 +399,9 @@ The property lets yo property is the value of the property unless the and property values are both `true` and the property of the parent has a value of , in which case the default value of the property is . Child controls that you place on the inherit the value by default, so this behavior causes the background of the child controls to render with the current visual style. + The default value of the property is the value of the property unless the and property values are both `true` and the property of the parent has a value of , in which case the default value of the property is . Child controls that you place on the inherit the value by default, so this behavior causes the background of the child controls to render with the current visual style. - Changing the value of the property automatically sets the property to `false`. If you want the background to render using visual styles but you want the child controls to inherit a value that you specify, set the property after you set the property. + Changing the value of the property automatically sets the property to `false`. If you want the background to render using visual styles but you want the child controls to inherit a value that you specify, set the property after you set the property. ]]> @@ -711,7 +711,7 @@ The property lets yo with two objects, each containing one component. The parameter `button2` is passed to the method, which retrieves the containing `button2`. To verify that the correct tab page is retrieved, the property sets the containing `button2` to the currently selected tab page. + The following code example creates a with two objects, each containing one component. The parameter `button2` is passed to the method, which retrieves the containing `button2`. To verify that the correct tab page is retrieved, the property sets the containing `button2` to the currently selected tab page. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/GetTabPageOfComponent/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabPage/GetTabPageOfComponent/form1.cs" id="Snippet1"::: @@ -782,10 +782,10 @@ The property lets yo points to an image in the associated of the . + The points to an image in the associated of the . - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ## Examples @@ -864,8 +864,8 @@ If you set the property, the property specifies the image from the image list to display on the control. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -1080,7 +1080,7 @@ The tab is considered part of the tab page for determining when the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1132,7 +1132,7 @@ The tab is considered part of the tab page for determining when the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1175,7 +1175,7 @@ The tab is considered part of the tab page for determining when the . When the and property values are both `true` and the property of the parent is , this method paints the background using the current visual style. Otherwise, this method paints the background as usual. + The system calls this method to paint the background of the . When the and property values are both `true` and the property of the parent is , this method paints the background using the current visual style. Otherwise, this method paints the background as usual. ]]> @@ -1499,7 +1499,7 @@ The tab is considered part of the tab page for determining when the property value does not automatically center the new value on the tab if the has a property value of . You can work around this limitation by setting the property or by removing the from the collection and adding it back to the collection. Both of these actions will automatically center the text. + Changing the property value does not automatically center the new value on the tab if the has a property value of . You can work around this limitation by setting the property or by removing the from the collection and adding it back to the collection. Both of these actions will automatically center the text. @@ -1651,7 +1651,7 @@ The tab is considered part of the tab page for determining when the with a . The method creates a string that includes the value for `tabPage1` and returns it to the `tabPage1` property. + The following code example creates a with a . The method creates a string that includes the value for `tabPage1` and returns it to the `tabPage1` property. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TabPage.ToString/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabPage/ToString/form1.cs" id="Snippet1"::: @@ -1702,11 +1702,11 @@ The tab is considered part of the tab page for determining when the background uses the current visual style only when the and property values are both `true`. + The background uses the current visual style only when the and property values are both `true`. - When the and property values are both `true` and the property of the parent is , the default value of the property is . Child controls that you place on the inherit the value by default, so this behavior causes the background of the child controls to render with the current visual style. + When the and property values are both `true` and the property of the parent is , the default value of the property is . Child controls that you place on the inherit the value by default, so this behavior causes the background of the child controls to render with the current visual style. - Changing the value of the property automatically sets the property to `false`. If you want the background to render using visual styles but you want the child controls to inherit a value that you specify, set the property after you set the property. + Changing the value of the property automatically sets the property to `false`. If you want the background to render using visual styles but you want the child controls to inherit a value that you specify, set the property after you set the property. ]]> @@ -1760,7 +1760,7 @@ The tab is considered part of the tab page for determining when the , you must remove it from the control's collection. + To hide a tab in a , you must remove it from the control's collection. ]]> @@ -1809,7 +1809,7 @@ The tab is considered part of the tab page for determining when the property is not meaningful for this control, although you can change its value and handle the event to detect the change. - To hide a tab in a , you must remove it from the control's collection. + To hide a tab in a , you must remove it from the control's collection. ]]> diff --git a/xml/System.Windows.Forms/TabRenderer.xml b/xml/System.Windows.Forms/TabRenderer.xml index 778d63d241f..36f4fa18ca8 100644 --- a/xml/System.Windows.Forms/TabRenderer.xml +++ b/xml/System.Windows.Forms/TabRenderer.xml @@ -37,7 +37,7 @@ class provides a set of `static` methods that can be used to render a tab control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a tab control, use the method to draw the page, and use the method to draw each tab. + The class provides a set of `static` methods that can be used to render a tab control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a tab control, use the method to draw the page, and use the method to draw each tab. If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, the methods of this class will draw the tab control with the current visual style. Otherwise, the methods and properties of this class will throw an . To determine whether the members of this class can be used, check the value of the property. @@ -46,7 +46,7 @@ ## Examples - The following code example demonstrates how to create a custom control that uses the and methods to draw a basic tab control with two tabs. + The following code example demonstrates how to create a custom control that uses the and methods to draw a basic tab control with two tabs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TabRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabRenderer/Overview/form1.cs" id="Snippet0"::: @@ -366,7 +366,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a tab item. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a tab item. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TabRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabRenderer/Overview/form1.cs" id="Snippet2"::: @@ -658,7 +658,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a tab page. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a tab page. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TabRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabRenderer/Overview/form1.cs" id="Snippet2"::: @@ -708,12 +708,12 @@ and methods will throw an . + If this property is `false`, the and methods will throw an . ## Examples - The following code example uses the property to determine whether to use the and methods. This code example is part of a larger example provided for the class. + The following code example uses the property to determine whether to use the and methods. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TabRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TabRenderer/Overview/form1.cs" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/TabSizeMode.xml b/xml/System.Windows.Forms/TabSizeMode.xml index a24ca077193..30dff017e8f 100644 --- a/xml/System.Windows.Forms/TabSizeMode.xml +++ b/xml/System.Windows.Forms/TabSizeMode.xml @@ -24,11 +24,11 @@ Specifies how tabs in a tab control are sized. - . - + . + ]]> diff --git a/xml/System.Windows.Forms/TableLayoutColumnStyleCollection.xml b/xml/System.Windows.Forms/TableLayoutColumnStyleCollection.xml index 54624ce4680..3e1335839b6 100644 --- a/xml/System.Windows.Forms/TableLayoutColumnStyleCollection.xml +++ b/xml/System.Windows.Forms/TableLayoutColumnStyleCollection.xml @@ -30,19 +30,19 @@ A collection that stores objects. - class represents the collection of all the styles used to describe the columns in an associated . - - - -## Examples - The following example shows how to set for a . This code example is part of a larger example provided for the control. - + class represents the collection of all the styles used to describe the columns in an associated . + + + +## Examples + The following example shows how to set for a . This code example is part of a larger example provided for the control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet8"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet8"::: + ]]> @@ -81,13 +81,13 @@ Adds an item to the . The position into which the new element was inserted. - method reapplies the table layout to all the controls in the current container. - - The number of styles stored in a collection is limited only by available memory. - + method reapplies the table layout to all the controls in the current container. + + The number of styles stored in a collection is limited only by available memory. + ]]> @@ -164,11 +164,11 @@ Determines the index of a specific item in the . The index of if found in the ; otherwise, -1. - method begins searching at the first element of the and ends either when it finds a match or it reaches the last element. - + method begins searching at the first element of the and ends either when it finds a match or it reaches the last element. + ]]> @@ -208,15 +208,15 @@ The to insert into the . Inserts a into the at the specified position. - method reapplies the table layout to all the controls in the current container. - - The number of styles stored in a collection is limited only by available memory. - - In collections of contiguous elements, such as the class, the elements that follow the insertion point move down to accommodate the inserted element. The indexes of the elements that are moved are also updated. - + method reapplies the table layout to all the controls in the current container. + + The number of styles stored in a collection is limited only by available memory. + + In collections of contiguous elements, such as the class, the elements that follow the insertion point move down to accommodate the inserted element. The indexes of the elements that are moved are also updated. + ]]> @@ -291,13 +291,13 @@ The to remove from the . The value can be . Removes the first occurrence of a specific from the . - method reapplies the table layout to all the controls in the current container. - - In collections of contiguous elements, such as the class, the elements that follow the deletion point move up to occupy the vacated spot. The indexes of the elements that are moved are also updated. - + method reapplies the table layout to all the controls in the current container. + + In collections of contiguous elements, such as the class, the elements that follow the deletion point move up to occupy the vacated spot. The indexes of the elements that are moved are also updated. + ]]> diff --git a/xml/System.Windows.Forms/TableLayoutControlCollection.xml b/xml/System.Windows.Forms/TableLayoutControlCollection.xml index 5dc0e192436..4b5d4e419fb 100644 --- a/xml/System.Windows.Forms/TableLayoutControlCollection.xml +++ b/xml/System.Windows.Forms/TableLayoutControlCollection.xml @@ -45,7 +45,7 @@ class represents the collection of all the child controls in a control. This collection is exposed by the property of the class. You can manage and individually manipulate members of the table layout panel through the exposed by . + The class represents the collection of all the child controls in a control. This collection is exposed by the property of the class. You can manage and individually manipulate members of the table layout panel through the exposed by . The class is a minor specialization of the base class. @@ -135,7 +135,7 @@ , you can specify the cell position of `control`. You can assign `control` to a specific cell by providing both the `column` and `row` parameters, or you can specify only the column or row value and let the place `control` at the next open cell. This is known as letting the control *flow* to its position in the control. + With , you can specify the cell position of `control`. You can assign `control` to a specific cell by providing both the `column` and `row` parameters, or you can specify only the column or row value and let the place `control` at the next open cell. This is known as letting the control *flow* to its position in the control. Set `column` to -1 if you want `control` to occupy a fixed row position. @@ -143,9 +143,9 @@ If neither `column` nor `row` is -1, `control` will be added at the absolute position given by (`column`, `row`). - If you set both `column` and `row` to -1, `control` will flow to the first open position, with the specific flow behavior defined by the value. This is equivalent to using the method. + If you set both `column` and `row` to -1, `control` will flow to the first open position, with the specific flow behavior defined by the value. This is equivalent to using the method. - To get to the actual current position of a control, use the method. This method takes into account the entire control state, including column or row spanning and when the has placed a control with its `Column` and `Row` properties set to -1. + To get to the actual current position of a control, use the method. This method takes into account the entire control state, including column or row spanning and when the has placed a control with its `Column` and `Row` properties set to -1. ]]> @@ -191,7 +191,7 @@ constructor. + This property is set by the constructor. ]]> diff --git a/xml/System.Windows.Forms/TableLayoutPanel.xml b/xml/System.Windows.Forms/TableLayoutPanel.xml index 8884c4b2e07..ccc65431b02 100644 --- a/xml/System.Windows.Forms/TableLayoutPanel.xml +++ b/xml/System.Windows.Forms/TableLayoutPanel.xml @@ -93,26 +93,26 @@ Any Windows Forms control can be a child of the control, including other instances of . This allows you to construct sophisticated layouts that adapt to changes at runtime. - The control can expand to accommodate new controls when they are added, depending on the value of the , , and properties. Setting either the or property to a value of 0 specifies that the will be unbound in the corresponding direction. + The control can expand to accommodate new controls when they are added, depending on the value of the , , and properties. Setting either the or property to a value of 0 specifies that the will be unbound in the corresponding direction. You can also control the direction of expansion (horizontal or vertical) after the control is full of child controls. By default, the control expands downward by adding rows. - If you want rows and columns that behave differently from the default behavior, you can control the properties of rows and columns by using the and properties. You can set the properties of rows or columns individually. + If you want rows and columns that behave differently from the default behavior, you can control the properties of rows and columns by using the and properties. You can set the properties of rows or columns individually. The control adds the following properties to its child controls: `Cell`, `Column`, `Row`, `ColumnSpan`, and `RowSpan`. You can merge cells in the control by setting the `ColumnSpan` or `RowSpan` properties on a child control. > [!NOTE] -> To set the `Cell`, `Column`, `Row`, `ColumnSpan`, and `RowSpan` properties at run time, use the , , , , and methods. +> To set the `Cell`, `Column`, `Row`, `ColumnSpan`, and `RowSpan` properties at run time, use the , , , , and methods. > -> To read the `Cell`, `Column`, `Row`, `ColumnSpan`, and `RowSpan` properties at run time, use the , , , , and methods. +> To read the `Cell`, `Column`, `Row`, `ColumnSpan`, and `RowSpan` properties at run time, use the , , , , and methods. The docking behavior of child controls is the same as other container controls. - The anchoring behavior of child controls in a differs from the behavior in other container controls. If the value of the child control's property is set to or , the control will be placed against the left or right border of the cell, at a distance that is the sum of the control's property and the panel's property. If both the and values are set, the control will be sized to the width of the cell, with the and values taken into account. The behavior for and anchoring is analogous. For more information, see [How to: Anchor and Dock Child Controls in a TableLayoutPanel Control](/dotnet/desktop/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-tablelayoutpanel-control). + The anchoring behavior of child controls in a differs from the behavior in other container controls. If the value of the child control's property is set to or , the control will be placed against the left or right border of the cell, at a distance that is the sum of the control's property and the panel's property. If both the and values are set, the control will be sized to the width of the cell, with the and values taken into account. The behavior for and anchoring is analogous. For more information, see [How to: Anchor and Dock Child Controls in a TableLayoutPanel Control](/dotnet/desktop/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-tablelayoutpanel-control). - If you need a child control to mimic the default anchoring behavior in other container controls, you can adjust the and properties to maintain a constant distance between the control's border and the cell's border. + If you need a child control to mimic the default anchoring behavior in other container controls, you can adjust the and properties to maintain a constant distance between the control's border and the cell's border. Setting the values of both the `Column` and `Row` properties of a child control to -1 will cause the control to be moved to the first empty cell in the control. The empty cell will be chosen in a search that proceeds from left to right and from top to bottom. This order is dependent on the culture, so it will behave correctly in right-to-left (RTL) layouts. @@ -132,7 +132,7 @@ ## Examples - The following code example demonstrates how to override the method to create a custom appearance for a cell. + The following code example demonstrates how to override the method to create a custom appearance for a cell. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet100"::: @@ -174,7 +174,7 @@ , , , and properties to their default values. + This constructor sets the , , , and properties to their default values. ]]> @@ -376,7 +376,7 @@ Setting this value causes the panel to redraw itself and its contents. Setting this property causes the table to undergo another layout operation. - You can specify both the and the properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the property allows for such growth. If the value of is 0, the panel will grow by adding rows, and if the value of is 0, the panel will grow by adding columns. Specifying panel growth with the property is preferred to setting or to 0, however. + You can specify both the and the properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the property allows for such growth. If the value of is 0, the panel will grow by adding rows, and if the value of is 0, the panel will grow by adding columns. Specifying panel growth with the property is preferred to setting or to 0, however. Controls can be added or deleted from the table using the property. @@ -501,7 +501,7 @@ Setting this value causes the panel to redraw itself and its contents. property contains all of the controls associated with the table, including controls that may not be currently displayed because of , , or limitations. + The property contains all of the controls associated with the table, including controls that may not be currently displayed because of , , or limitations. @@ -652,18 +652,18 @@ Setting this value causes the panel to redraw itself and its contents. method will return the lowest column index. + If `control` spans two or more columns, the method will return the lowest column index. - The column position value is zero based, so you can use it as an index for the array returned by . + The column position value is zero based, so you can use it as an index for the array returned by . This method is called by the `Column` property, which the panel adds to its child controls at design time. - To get the actual position of `control`, even when its position is determined by , call the method. + To get the actual position of `control`, even when its position is determined by , call the method. ## Examples - The following code example enumerates all the child controls in the and finds the column index for each control using the method. + The following code example enumerates all the child controls in the and finds the column index for each control using the method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet3"::: @@ -730,7 +730,7 @@ Setting this value causes the panel to redraw itself and its contents. ## Examples - The following code example uses the and methods to set the width of a control in a . + The following code example uses the and methods to set the width of a control in a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet11"::: @@ -825,7 +825,7 @@ Setting this value causes the panel to redraw itself and its contents. ## Examples - The following code example enumerates all the cell positions in the by looping through the columns and rows given by and , and then calling the method to retrieve the control at each cell. + The following code example enumerates all the cell positions in the by looping through the columns and rows given by and , and then calling the method to retrieve the control at each cell. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet5"::: @@ -872,7 +872,7 @@ Setting this value causes the panel to redraw itself and its contents. method returns the actual current position of `control`, even if its position is determined by the . This method takes into account the entire control state, including column or row spanning and when the has placed a control with its `Column` and `Row` properties set to -1. This is equivalent to the situation in which and return -1. + The method returns the actual current position of `control`, even if its position is determined by the . This method takes into account the entire control state, including column or row spanning and when the has placed a control with its `Column` and `Row` properties set to -1. This is equivalent to the situation in which and return -1. ]]> @@ -926,18 +926,18 @@ Setting this value causes the panel to redraw itself and its contents. method will return the lowest row index. + If `control` spans two or more rows, the method will return the lowest row index. - The row position value is zero based, so you can use it as an index for the array returned by . + The row position value is zero based, so you can use it as an index for the array returned by . This method is called by the `Row` property, which the panel adds to its child controls at design time. - To get the actual position of `control`, even when its position is determined by , call the method. + To get the actual position of `control`, even when its position is determined by , call the method. ## Examples - The following code example enumerates all the child controls in the and finds the row index for each using the method. + The following code example enumerates all the child controls in the and finds the row index for each using the method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet4"::: @@ -1044,7 +1044,7 @@ Setting this value causes the panel to redraw itself and its contents. ## Examples - The following code example uses the and methods to set the width of a control in a . + The following code example uses the and methods to set the width of a control in a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet11"::: @@ -1096,12 +1096,12 @@ Setting this value causes the panel to redraw itself and its contents. By default, the control expands downward by adding rows. > [!NOTE] -> If an attempt is made to add a control to a full control, and the value of is , then an is thrown. +> If an attempt is made to add a control to a full control, and the value of is , then an is thrown. ## Examples - The following code example sets the value of the property depending on the selected . At run time, when the user clicks on the button labeled **Test GrowStyle**, a control is added to the control. If the control is full, it expands by adding a row or column, or it raises an exception, depending on the value of . + The following code example sets the value of the property depending on the selected . At run time, when the user clicks on the button labeled **Test GrowStyle**, a control is added to the control. If the control is full, it expands by adding a row or column, or it raises an exception, depending on the value of . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet7"::: @@ -1229,7 +1229,7 @@ Setting this value causes the panel to redraw itself and its contents. method to create a custom appearance for a cell. + The following code example demonstrates how to override the method to create a custom appearance for a cell. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet100"::: @@ -1359,7 +1359,7 @@ Setting this value causes the panel to redraw itself and its contents. Setting this property causes the table to undergo another layout operation. - You can specify both the and the properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the property allows for such growth. If the value of is 0, the panel will grow by adding rows, and if the value of is 0, the panel will grow by adding columns. Specifying panel growth with the property is preferred to setting or to 0, however. + You can specify both the and the properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the property allows for such growth. If the value of is 0, the panel will grow by adding rows, and if the value of is 0, the panel will grow by adding columns. Specifying panel growth with the property is preferred to setting or to 0, however. Controls can be added or deleted from the table using the property. @@ -1519,7 +1519,7 @@ Setting this value causes the panel to redraw itself and its contents. method uses the `dx` and `dy` parameter values to scale both the height and width of the panel independently. + The method uses the `dx` and `dy` parameter values to scale both the height and width of the panel independently. ]]> @@ -1594,7 +1594,7 @@ Setting this value causes the panel to redraw itself and its contents. method moves the control to another column in the . The columns and rows have zero-based indexes. Setting the column position to -1 specifies that the control will flow to the first empty cell. + The method moves the control to another column in the . The columns and rows have zero-based indexes. Setting the column position to -1 specifies that the control will flow to the first empty cell. This method reapplies the table layout to all controls in the . @@ -1603,7 +1603,7 @@ Setting this value causes the panel to redraw itself and its contents. ## Examples - The following code example uses the method to swap two controls contained within a control. The example assumes a control with at least two rows. + The following code example uses the method to swap two controls contained within a control. The example assumes a control with at least two rows. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet12"::: @@ -1657,7 +1657,7 @@ Setting this value causes the panel to redraw itself and its contents. ## Examples - The following code example uses the and methods to set the width of a control in a . + The following code example uses the and methods to set the width of a control in a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet11"::: @@ -1707,7 +1707,7 @@ Setting this value causes the panel to redraw itself and its contents. method moves the control to another row in the control. The columns and rows have zero-based indexes. Setting the row position to -1 specifies that the control will flow to the first empty cell. + The method moves the control to another row in the control. The columns and rows have zero-based indexes. Setting the row position to -1 specifies that the control will flow to the first empty cell. This method reapplies the table layout to all controls in the . @@ -1716,7 +1716,7 @@ Setting this value causes the panel to redraw itself and its contents. ## Examples - The following code example uses the method to swap two controls contained within a control. The example assumes a control with at least two rows. + The following code example uses the method to swap two controls contained within a control. The example assumes a control with at least two rows. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet13"::: @@ -1770,7 +1770,7 @@ Setting this value causes the panel to redraw itself and its contents. ## Examples - The following code example uses the and methods to set the width of a control in a . + The following code example uses the and methods to set the width of a control in a . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet11"::: diff --git a/xml/System.Windows.Forms/TableLayoutPanelCellBorderStyle.xml b/xml/System.Windows.Forms/TableLayoutPanelCellBorderStyle.xml index e8b9b363955..9ed917c27f6 100644 --- a/xml/System.Windows.Forms/TableLayoutPanelCellBorderStyle.xml +++ b/xml/System.Windows.Forms/TableLayoutPanelCellBorderStyle.xml @@ -23,19 +23,19 @@ Specifies the border style of a cell in a table layout control. - enumeration represents the different border style options for a cell in a . The width of the cell border for each style is determined by the class. The space for the border is taken from the control's . - - - -## Examples - The following example shows how to use the enumeration to set the for a control. This code example is part of a larger example provided for the control. - + enumeration represents the different border style options for a cell in a . The width of the cell border for each style is determined by the class. The space for the border is taken from the control's . + + + +## Examples + The following example shows how to use the enumeration to set the for a control. This code example is part of a larger example provided for the control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Windows.Forms/TableLayoutPanelCellPosition.xml b/xml/System.Windows.Forms/TableLayoutPanelCellPosition.xml index e91a9e44d54..b6ba1cb1331 100644 --- a/xml/System.Windows.Forms/TableLayoutPanelCellPosition.xml +++ b/xml/System.Windows.Forms/TableLayoutPanelCellPosition.xml @@ -291,7 +291,7 @@ if and are equal; otherwise, . - .]]> + .]]> @@ -330,7 +330,7 @@ if and differ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Windows.Forms/TableLayoutRowStyleCollection.xml b/xml/System.Windows.Forms/TableLayoutRowStyleCollection.xml index 95ffd3d4e1a..e76d8d288ca 100644 --- a/xml/System.Windows.Forms/TableLayoutRowStyleCollection.xml +++ b/xml/System.Windows.Forms/TableLayoutRowStyleCollection.xml @@ -30,19 +30,19 @@ A collection that stores objects. - class represents the collection of all the styles used to describe the rows in an associated . - - - -## Examples - The following example shows how to set for a . This code example is part of a larger example provided for the control. - + class represents the collection of all the styles used to describe the rows in an associated . + + + +## Examples + The following example shows how to set for a . This code example is part of a larger example provided for the control. + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ColumnStyle/Overview/form1.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet9"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ColumnStyle/Overview/form1.vb" id="Snippet9"::: + ]]> @@ -82,13 +82,13 @@ Adds a new to the . The position into which the new element was inserted. - method reapplies the table layout to all the controls in the current container. - - The number of styles stored in a collection is limited only by available memory. - + method reapplies the table layout to all the controls in the current container. + + The number of styles stored in a collection is limited only by available memory. + ]]> @@ -164,11 +164,11 @@ Determines the index of a specific item in the . The index of if found in the ; otherwise, -1. - method begins searching at the first element of the and ends either when it finds a match or it reaches the last element. - + method begins searching at the first element of the and ends either when it finds a match or it reaches the last element. + ]]> @@ -207,15 +207,15 @@ The to insert into the . The value can be . Inserts a into the at the specified position. - method reapplies the table layout to all the controls in the current container. - - The number of styles stored in a collection is limited only by available memory. - - In collections of contiguous elements, such as the class, the elements that follow the insertion point move down to accommodate the inserted element. The indexes of the elements that are moved are also updated. - + method reapplies the table layout to all the controls in the current container. + + The number of styles stored in a collection is limited only by available memory. + + In collections of contiguous elements, such as the class, the elements that follow the insertion point move down to accommodate the inserted element. The indexes of the elements that are moved are also updated. + ]]> @@ -286,13 +286,13 @@ The to remove from the . The value can be . Removes the first occurrence of a specific object from the . - method reapplies the table layout to all the controls in the current container. - - In collections of contiguous elements, such as the class, the elements that follow the deletion point move up to occupy the vacated spot. The indexes of the elements that are moved are also updated. - + method reapplies the table layout to all the controls in the current container. + + In collections of contiguous elements, such as the class, the elements that follow the deletion point move up to occupy the vacated spot. The indexes of the elements that are moved are also updated. + ]]> diff --git a/xml/System.Windows.Forms/TableLayoutStyleCollection.xml b/xml/System.Windows.Forms/TableLayoutStyleCollection.xml index 3c5aa448578..cd35fa4c4ad 100644 --- a/xml/System.Windows.Forms/TableLayoutStyleCollection.xml +++ b/xml/System.Windows.Forms/TableLayoutStyleCollection.xml @@ -103,7 +103,7 @@ method reapplies the table layout to all the controls in the current container. + The method reapplies the table layout to all the controls in the current container. The number of styles stored in a collection is limited only by available memory. @@ -148,7 +148,7 @@ ## Remarks This method cannot be overridden. - The method performs two main actions: + The method performs two main actions: - It disassociates the current from its container so that the styles are no longer applied to the layout of the controls contained within the panel. As a result, the table layout is reapplied to all the controls in the panel. diff --git a/xml/System.Windows.Forms/TextBox.xml b/xml/System.Windows.Forms/TextBox.xml index 4ed5207e9b3..3dedc73aa51 100644 --- a/xml/System.Windows.Forms/TextBox.xml +++ b/xml/System.Windows.Forms/TextBox.xml @@ -52,14 +52,14 @@ ## Remarks With the control, the user can enter text in an application. This control has additional functionality that is not found in the standard Windows text box control, including multiline editing and password character masking. - Typically, a control is used to display, or accept as input, a single line of text. You can use the and properties to enable multiple lines of text to be displayed or entered. Set the and properties to `true` to enable greater text manipulation in a multiline control. + Typically, a control is used to display, or accept as input, a single line of text. You can use the and properties to enable multiple lines of text to be displayed or entered. Set the and properties to `true` to enable greater text manipulation in a multiline control. > [!NOTE] > You must set the property to `true` to adjust the height of the control. You can adjust the height by setting the property. You can limit the amount of text entered into a control by setting the property to a specific number of characters. controls can also be used to accept passwords and other sensitive information. You can use the property to mask characters entered in a single-line version of the control. Use the property to enable the user to type only uppercase, only lowercase, or a combination of uppercase and lowercase characters into the control. - To scroll the contents of the until the cursor (caret) is within the visible region of the control, you can use the method. To select a range of text in the text box, you can use the method. + To scroll the contents of the until the cursor (caret) is within the visible region of the control, you can use the method. To select a range of text in the text box, you can use the method. To restrict text from being entered in a control, you can create an event handler for the event in order to validate each character entered in the control. You can also restrict all entry of data in a control by setting the property to `true`. @@ -71,7 +71,7 @@ ## Examples - The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextBox/Overview/source.vb" id="Snippet1"::: @@ -174,7 +174,7 @@ ## Examples - The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/AcceptsReturn/source.cs" id="Snippet1"::: @@ -240,11 +240,11 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to `CustomSource` in order to use . + The use of the property is optional, but you must set the property to `CustomSource` in order to use . - You must use the and properties together. + You must use the and properties together. > [!NOTE] > The operating system might limit the number of custom strings that it can display at once. @@ -329,11 +329,11 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to `CustomSource` in order to use . + The use of the property is optional, but you must set the property to `CustomSource` in order to use . - You must use the and properties together. + You must use the and properties together. > [!NOTE] > The operating system might limit the number of custom strings that it can display at once. @@ -411,14 +411,14 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to `CustomSource` in order to use . + The use of the property is optional, but you must set the property to `CustomSource` in order to use . - You must use the and properties together. + You must use the and properties together. > [!NOTE] -> does not work on multiline controls. +> does not work on multiline controls. > [!NOTE] > The operating system might limit the number of custom strings that can be displayed at once. @@ -663,7 +663,7 @@ method returns `true` when `keyData` includes the value and the property is `true`. + The method returns `true` when `keyData` includes the value and the property is `true`. ]]> @@ -700,14 +700,14 @@ does not work on multiline controls. + does not work on multiline controls. - When the font is changed, any indentation that you have defined does not appear. To get indentation, set to `true` and override WM_SETFONT without calling the base class so that SETMARGINS is not called. + When the font is changed, any indentation that you have defined does not appear. To get indentation, set to `true` and override WM_SETFONT without calling the base class so that SETMARGINS is not called. ## Examples - The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example creates a multiline control with vertical scroll bars. This example uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.AcceptsReturn Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/AcceptsReturn/source.cs" id="Snippet1"::: @@ -752,7 +752,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -796,7 +796,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -843,7 +843,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -920,7 +920,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1051,7 +1051,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1107,12 +1107,12 @@ property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. + The property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. When the property is set, cut and copy actions in the control using the keyboard cannot be performed. > [!IMPORTANT] -> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. +> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. @@ -1161,7 +1161,7 @@ , does not affect the Clipboard. + Unlike setting , does not affect the Clipboard. ]]> @@ -1241,7 +1241,7 @@ failed to select all text when the and properties were both set to `true`.. This method enables the Ctrl-A shortcut key to select all text when the and properties are both set to `true`. + New in 4.6.1. In previous versions, the **Ctrl**+**A** shortcut key in a failed to select all text when the and properties were both set to `true`.. This method enables the Ctrl-A shortcut key to select all text when the and properties are both set to `true`. Applications targeting .NET Framework versions 4.0 through 4.6 can take advantage of this method by adding the following to the `` section of the app.config file: @@ -1312,7 +1312,7 @@ ## Examples - The following code example creates a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline control useful for creating text documents. + The following code example creates a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBox.ScrollBars Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBox/ScrollBars/source.cs" id="Snippet1"::: @@ -1490,7 +1490,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you find out when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you find out when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TextBox1`. Then ensure that the event handler is associated with the event. @@ -1548,10 +1548,10 @@ property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. + The property has precedence over the property. Whenever the is set to `true`, the default system password character is used and any character set by is ignored. > [!IMPORTANT] -> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. +> When the is in password mode because , , or is `true`, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value. ]]> diff --git a/xml/System.Windows.Forms/TextBoxBase.xml b/xml/System.Windows.Forms/TextBoxBase.xml index d71c8d6cdbb..05b8184656b 100644 --- a/xml/System.Windows.Forms/TextBoxBase.xml +++ b/xml/System.Windows.Forms/TextBoxBase.xml @@ -67,7 +67,7 @@ ## Examples - The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.AcceptsTab Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Overview/source.cs" id="Snippet1"::: @@ -127,7 +127,7 @@ ## Examples - The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.AcceptsTab Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Overview/source.cs" id="Snippet1"::: @@ -174,7 +174,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `TextBoxBase1` and ensure that the event handler is associated with the event. @@ -226,7 +226,7 @@ ## Examples - The following code example demonstrates how to use the method and the property to copy text from one to another. This example requires that two controls named, `textBox1` and `textBox2`, have been added to a form and that `textBox1` has text assigned to its property. + The following code example demonstrates how to use the method and the property to copy text from one to another. This example requires that two controls named, `textBox1` and `textBox2`, have been added to a form and that `textBox1` has text assigned to its property. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TextBoxBase.AppendText/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/AppendText/form1.cs" id="Snippet1"::: @@ -294,14 +294,14 @@ property to `true` for a , when the changes, the expands or contracts the to accommodate the larger or smaller text. The of the does not change. + When you set the property to `true` for a , when the changes, the expands or contracts the to accommodate the larger or smaller text. The of the does not change. If you want to change the size of the control as the user enters text, you can use a control and use its event to change its size. ## Examples - This example assumes that you have a form with two text boxes, two buttons, and click events for each of the buttons. The example demonstrates the property by setting it to `true` for one text box and `false` for the other. When you click one button the text boxes are filled with a smaller text, and when you click the other button the text boxes are filled with larger text. The text box that has set to `true` expands in height to accommodate the larger text. The width does not change. + This example assumes that you have a form with two text boxes, two buttons, and click events for each of the buttons. The example demonstrates the property by setting it to `true` for one text box and `false` for the other. When you click one button the text boxes are filled with a smaller text, and when you click the other button the text boxes are filled with larger text. The text box that has set to `true` expands in height to accommodate the larger text. The width does not change. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/AutoSize/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextBoxBase/AutoSize/Form1.vb" id="Snippet1"::: @@ -396,7 +396,7 @@ ## Remarks You can use the property to change the background color of the text control to blend into the color scheme of your forms. - To change the color of the text within the control, use the property. When setting the property of your text control, ensure that the color you choose does not cause the text of the control to disappear. For example, if the and properties are both set to `Color.Black`, the text within your textbox control will not be visible. + To change the color of the text within the control, use the property. When setting the property of your text control, ensure that the color you choose does not cause the text of the control to disappear. For example, if the and properties are both set to `Color.Black`, the text within your textbox control will not be visible. This property might be over ridden if the property of the is set to `true`. @@ -645,7 +645,7 @@ ## Examples - The following code example uses , a derived class, to create a text box that can properly display text using 20-point Arial with a single border. This example uses the property to determine the appropriate height of the control after the font and have been assigned to the control. + The following code example uses , a derived class, to create a text box that can properly display text using 20-point Arial with a single border. This example uses the property to determine the appropriate height of the control after the font and have been assigned to the control. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.BorderStyle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/BorderStyle/source.cs" id="Snippet1"::: @@ -692,7 +692,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `TextBoxBase1` and ensure that the event handler is associated with the event. @@ -776,7 +776,7 @@ method to undo the last operation in a text box. You can use this method in the event of a , or in code that manages the state of buttons on a to enable or disable the ability to undo the previous operation in a text box control. + If this method returns `true`, you can call the method to undo the last operation in a text box. You can use this method in the event of a , or in code that manages the state of buttons on a to enable or disable the ability to undo the previous operation in a text box control. @@ -1225,7 +1225,7 @@ to configure a default cursor for your control. This is more efficient than setting the cursor in the control's constructor, and gives automatic support for certain cursor-related designer functions. + Override to configure a default cursor for your control. This is more efficient than setting the cursor in the control's constructor, and gives automatic support for certain cursor-related designer functions. ]]> @@ -1379,7 +1379,7 @@ ## Remarks You can use the property to change the color of the text within the control to match the text of other controls on your form. You can also use this property to highlight a specific text box that contains an invalid value. - To change the background color of the control, use the property. When setting the property of your text control, ensure that the color you choose does not cause the text of the control to disappear. For example, if the and properties are both set to `Color.Black`, the text within your textbox control will not be visible. + To change the background color of the control, use the property. When setting the property of your text control, ensure that the color you choose does not cause the text of the control to disappear. For example, if the and properties are both set to `Color.Black`, the text within your textbox control will not be visible. This property might be over ridden if the property of the is set to `true`. @@ -1516,9 +1516,9 @@ returns -1. + Line numbering in the text box starts at zero. If the `lineNumber` parameter is greater than the last line in the text box, returns -1. - returns the first character index of a physical line. The physical line is the displayed line, not the assigned line. The number of displayed lines can be greater than the number of assigned lines due to word wrap. For example, if you assign two long lines to a control and set and to `true`, the two long assigned lines result in four physical (or displayed lines). + returns the first character index of a physical line. The physical line is the displayed line, not the assigned line. The number of displayed lines can be greater than the number of assigned lines due to word wrap. For example, if you assign two long lines to a control and set and to `true`, the two long assigned lines result in four physical (or displayed lines). ]]> @@ -1593,7 +1593,7 @@ method returns the physical line number where the indexed character is located within the control. For example, if a portion of the first logical line of text in the control wraps to the next line, the method returns 1 if the character at the specified character index has wrapped to the second physical line. If is set to `false`, no portion of the line wraps to the next, and the method returns 0 for the specified character index. You can use this method to determine which line a specific character index is located within. For example, after calling the method to search for text, you can obtain the character index to where the search results are found. You can call this method with the character index returned by the method to determine which line the word was found. + This method enables you to determine the line number based on the character index specified in the `index` parameter of the method. The first line of text in the control returns the value zero. The method returns the physical line number where the indexed character is located within the control. For example, if a portion of the first logical line of text in the control wraps to the next line, the method returns 1 if the character at the specified character index has wrapped to the second physical line. If is set to `false`, no portion of the line wraps to the next, and the method returns 0 for the specified character index. You can use this method to determine which line a specific character index is located within. For example, after calling the method to search for text, you can obtain the character index to where the search results are found. You can call this method with the character index returned by the method to determine which line the word was found. > [!NOTE] > If the character index specified in the `index` parameter is beyond the available number of lines contained within the control, the last line number is returned. @@ -1739,7 +1739,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `TextBoxBase1` and ensure that the event handler is associated with the event. @@ -1817,7 +1817,7 @@ method returns `true` when the `keyData` parameter includes the value and the property is `true`. returns `false` if `keyData` contains both and . + The method returns `true` when the `keyData` parameter includes the value and the property is `true`. returns `false` if `keyData` contains both and . ]]> @@ -1892,7 +1892,7 @@ ## Examples - The following code example uses , a derived class, to extract all strings of text from a multiline text box control and displays them using the method. This example requires that a control has been created, named `textBox1`, and that it has been filled with lines of text. + The following code example uses , a derived class, to extract all strings of text from a multiline text box control and displays them using the method. This example requires that a control has been created, named `textBox1`, and that it has been filled with lines of text. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.Lines Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Lines/source.cs" id="Snippet1"::: @@ -2064,7 +2064,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `TextBoxBase1` and ensure that the event handler is associated with the event. @@ -2123,7 +2123,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `TextBoxBase1` and ensure that the event handler is associated with the event. @@ -2184,7 +2184,7 @@ The following can be used as newline characters: -- +- - ControlChars.CrLf @@ -2203,14 +2203,14 @@ For a control, the property affects whether or not the control will automatically resize, as follows: -- If is set to `true` and is set to `true`, will not automatically resize. +- If is set to `true` and is set to `true`, will not automatically resize. -- If is set to `true` and is set to `false`, will automatically resize. +- If is set to `true` and is set to `false`, will automatically resize. ## Examples - The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.AcceptsTab Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Overview/source.cs" id="Snippet1"::: @@ -2259,7 +2259,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `TextBoxBase1` and ensure that the event handler is associated with the event. @@ -2307,7 +2307,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2378,7 +2378,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2527,7 +2527,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2574,7 +2574,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2653,7 +2653,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2739,7 +2739,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2961,7 +2961,7 @@ method will only paste text into the control if text is currently stored in the **Clipboard**. + The method will only paste text into the control if text is currently stored in the **Clipboard**. @@ -3023,7 +3023,7 @@ ## Remarks The size returned by this property is based on the font height and border style of the text box. You can use this property to determine the appropriate size of the text box to ensure that text is properly displayed in the control. The value returned by this property is in pixels. - The value of represents the minimum height the text box must have in order to display a single line of text without clipping the text on the top or bottom. This value is the same whether the property is set to `true` or `false`. + The value of represents the minimum height the text box must have in order to display a single line of text without clipping the text on the top or bottom. This value is the same whether the property is set to `true` or `false`. ]]> @@ -3186,7 +3186,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `TextBoxBase1` and ensure that the event handler is associated with the event. @@ -3229,7 +3229,7 @@ method will scroll the contents of the control until the caret is visible at the bottom of the control. If the caret is positioned above the visible region of the control, this method scrolls the contents of the control until the caret is visible at the top of the control. You can use this method in a multiline text box to ensure that the current text entry point is within the visible region of the control. + This method enables you to scroll the contents of the control until the caret is within the visible region of the control. If the caret is positioned below the visible region of the control, the method will scroll the contents of the control until the caret is visible at the bottom of the control. If the caret is positioned above the visible region of the control, this method scrolls the contents of the control until the caret is visible at the top of the control. You can use this method in a multiline text box to ensure that the current text entry point is within the visible region of the control. > [!NOTE] > This method has no effect if the control does not have focus or if the caret is already positioned in the visible region of the control. @@ -3237,7 +3237,7 @@ ## Examples - The following code example demonstrates how to use the enumeration and the method to ensure that the text insertion point, represented by the caret, is always visible on the screen after the ENTER key has been pressed. To run the example, paste the following code in a form containing a control called `TextBox1` and a control called `RichTextBox1`. This example requires that the event-handling method has been associated with the event. + The following code example demonstrates how to use the enumeration and the method to ensure that the text insertion point, represented by the caret, is always visible on the screen after the ENTER key has been pressed. To run the example, paste the following code in a form containing a control called `TextBox1` and a control called `RichTextBox1`. This example requires that the event-handling method has been associated with the event. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TextBoxBaseScrolling/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Click/form1.cs" id="Snippet1"::: @@ -3289,12 +3289,12 @@ > You can programmatically move the caret within the text box by setting the `start` parameter to the position within the text box where you want the caret to move to and set the `length` parameter to a value of zero (0). The text box must have focus in order for the caret to be moved. > [!NOTE] -> If this method is called without any parameters, an alternative method is used. This alternative method inherits from the class. When called, it sets the input focus to the control and selects the contents of the control. For more information, see the method. +> If this method is called without any parameters, an alternative method is used. This alternative method inherits from the class. When called, it sets the input focus to the control and selects the contents of the control. For more information, see the method. ## Examples - The following code example uses , a derived class, to search the contents of the control for the instance of the word "fox". If found, the code selects the word in the control using the method. This example requires that a named `textBox1` has been created and its property contains the sentence "The quick brown fox jumps over the lazy dog." + The following code example uses , a derived class, to search the contents of the control for the instance of the word "fox". If found, the code selects the word in the control using the method. This example requires that a named `textBox1` has been created and its property contains the sentence "The quick brown fox jumps over the lazy dog." :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.Select Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Select/source.cs" id="Snippet1"::: @@ -3340,12 +3340,12 @@ method, which requires text to be selected in the control, to cut the entire contents of the control and paste them into the **Clipboard**. + This method enables you to select all text within the control. You can use this method in conjunction with the method, which requires text to be selected in the control, to cut the entire contents of the control and paste them into the **Clipboard**. ## Examples - The following code example uses , a derived class, to determine if any text is selected in the control. If no text is selected, a call is made to the method before copying the contents of the control to the **Clipboard**. This example requires that a has been created named `textBox1`. + The following code example uses , a derived class, to determine if any text is selected in the control. If no text is selected, a call is made to the method before copying the contents of the control to the **Clipboard**. This example requires that a has been created named `textBox1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.SelectAll Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/SelectAll/source.cs" id="Snippet1"::: @@ -3465,7 +3465,7 @@ You can use this property to determine if any characters are currently selected in the text box control before performing operations on the selected text. When the value of the property is set to a value that is larger than the number of characters within the text of the control, the value of the property is set to the entire length of text within the control minus the value of the property (if any value is specified for the property). > [!NOTE] -> You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). The text box must have focus in order for the caret to be moved. +> You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). The text box must have focus in order for the caret to be moved. @@ -3526,11 +3526,11 @@ ## Remarks If no text is selected in the control, this property indicates the insertion point, or caret, for new text. If you set this property to a location beyond the length of the text in the control, the selection start position will be placed after the last character. When text is selected in the text box control, changing this property might decrease the value of the property. If the remaining text in the control after the position indicated by the property is less than the value of the property, the value of the property is automatically decreased. The value of the property never causes an increase in the property. - You can programmatically move the selection within the text box by setting the and the properties. + You can programmatically move the selection within the text box by setting the and the properties. - You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). + You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). - The must have focus in order for the selection or the caret to be moved. You can set the property of a that is by giving it the first. + The must have focus in order for the selection or the caret to be moved. You can set the property of a that is by giving it the first. @@ -3545,7 +3545,7 @@ **Example 2** - The following example sets the property of a that is by giving it the first. + The following example sets the property of a that is by giving it the first. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/SelectionStart/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextBoxBase/SelectionStart/Form1.vb" id="Snippet1"::: @@ -3599,9 +3599,9 @@ ## Remarks The control uses the property to set the bounds if the property is `true` and the property is `false`. - Typically, the parameters that correspond to the bounds not included in the `specified` parameter are passed in with their current values. For example, the , , or the or properties of the property can be passed in with a reference to the current instance of the control. However all values passed in are honored and applied to the control. + Typically, the parameters that correspond to the bounds not included in the `specified` parameter are passed in with their current values. For example, the , , or the or properties of the property can be passed in with a reference to the current instance of the control. However all values passed in are honored and applied to the control. - The `specified` parameter represents the elements of the controls changed by your application. For example, if you change the of the control, the `specified` parameter value is the `Size` value of . However, if the is adjusted in response to the property being set, the `specified` parameter value is the `None` value of . + The `specified` parameter represents the elements of the controls changed by your application. For example, if you change the of the control, the `specified` parameter value is the `Size` value of . However, if the is adjusted in response to the property being set, the `specified` parameter value is the `None` value of . ]]> @@ -3735,7 +3735,7 @@ ## Examples - The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.AcceptsTab Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Overview/source.cs" id="Snippet1"::: @@ -3789,7 +3789,7 @@ ## Examples - The following code example demonstrates how to use the method and the property to copy text from one to another. This example requires that two controls named, `textBox1` and `textBox2`, have been added to a form and that `textBox1` has text assigned to its property. + The following code example demonstrates how to use the method and the property to copy text from one to another. This example requires that two controls named, `textBox1` and `textBox2`, have been added to a form and that `textBox1` has text assigned to its property. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TextBoxBase.AppendText/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/AppendText/form1.cs" id="Snippet1"::: @@ -3865,7 +3865,7 @@ This method will undo the last **Clipboard** or text change operation performed in the text box control if the property returns `true`. > [!NOTE] -> The method does not work with the or events. +> The method does not work with the or events. @@ -3969,7 +3969,7 @@ ## Examples - The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. + The following code example uses , a derived class, to create a multiline control with vertical scroll bars. This example also uses the , , and properties to make the multiline text box control useful for creating text documents. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic TextBoxBase.AcceptsTab Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxBase/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/TextBoxRenderer.xml b/xml/System.Windows.Forms/TextBoxRenderer.xml index 7b1a7fcfd34..e5665b92b30 100644 --- a/xml/System.Windows.Forms/TextBoxRenderer.xml +++ b/xml/System.Windows.Forms/TextBoxRenderer.xml @@ -37,16 +37,16 @@ class provides a set of `static` methods that can be used to render a text box control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a text box, use one of the methods. These methods provide a variety of options, such as applying text formatting or specifying text bounds. + The class provides a set of `static` methods that can be used to render a text box control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style. To draw a text box, use one of the methods. These methods provide a variety of options, such as applying text formatting or specifying text bounds. - If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, will draw the text box with the current visual style. Otherwise, will throw an . To determine whether the members of this class can be used, you can check the value of the property. + If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, will draw the text box with the current visual style. Otherwise, will throw an . To determine whether the members of this class can be used, you can check the value of the property. This class wraps the functionality of a that is set to one of the elements of the class. For more information, see [Rendering Controls with Visual Styles](/dotnet/desktop/winforms/controls/rendering-controls-with-visual-styles). ## Examples - The following code example demonstrates how to create a custom control that uses the method to draw a text box. The control also allows the user to select one of the values to apply to the text box text. + The following code example demonstrates how to create a custom control that uses the method to draw a text box. The control also allows the user to select one of the values to apply to the text box text. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TextBoxRenderer/cpp/form1.cpp" id="Snippet0"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxRenderer/Overview/form1.cs" id="Snippet0"::: @@ -385,7 +385,7 @@ ## Examples - The following code example demonstrates how to use the method in a custom control's method to draw a text box. This code example is part of a larger example provided for the class. + The following code example demonstrates how to use the method in a custom control's method to draw a text box. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TextBoxRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxRenderer/Overview/form1.cs" id="Snippet2"::: @@ -435,12 +435,12 @@ method will throw an . + If this property is `false`, the method will throw an . ## Examples - The following code example uses the property to determine whether to use the method. This code example is part of a larger example provided for the class. + The following code example uses the property to determine whether to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TextBoxRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextBoxRenderer/Overview/form1.cs" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/TextDataFormat.xml b/xml/System.Windows.Forms/TextDataFormat.xml index 381b73cad0f..12f8a5670bc 100644 --- a/xml/System.Windows.Forms/TextDataFormat.xml +++ b/xml/System.Windows.Forms/TextDataFormat.xml @@ -23,25 +23,25 @@ Specifies the formats used with text-related methods of the and classes. - type. - - This enumeration is used with the following methods: - -- - -- - -- - -- - -- - -- - + type. + + This enumeration is used with the following methods: + +- + +- + +- + +- + +- + +- + ]]> diff --git a/xml/System.Windows.Forms/TextRenderer.xml b/xml/System.Windows.Forms/TextRenderer.xml index 4f13088eec7..b08d1b79119 100644 --- a/xml/System.Windows.Forms/TextRenderer.xml +++ b/xml/System.Windows.Forms/TextRenderer.xml @@ -34,24 +34,24 @@ Provides methods used to measure and render text. This class cannot be inherited. - class provides a set of `static` methods that can be used for measuring and drawing text on a Windows Form control. - - You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . - + class provides a set of `static` methods that can be used for measuring and drawing text on a Windows Form control. + + You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . + > [!NOTE] -> The methods of are not supported for printing. You should always use the methods of the class. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText1` from the form's event handler, passing `e` as . - +> The methods of are not supported for printing. You should always use the methods of the class. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText1` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet2"::: + ]]> @@ -64,11 +64,11 @@ Draws the specified text at the specified location, using the specified device context, color, and font. - class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - + class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + ]]> @@ -220,26 +220,26 @@ The to apply to the drawn text. Draws the specified text at the specified location using the specified device context, font, and color. - overloads that takes a parameter. - - If `font` is `null` or `forecolor` is , the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - + overloads that takes a parameter. + + If `font` is `null` or `forecolor` is , the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + > [!NOTE] -> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText1` from the form's event handler, passing `e` as . - +> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText1` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet2"::: + ]]> @@ -293,23 +293,23 @@ The to apply to the drawn text. Draws the specified text within the specified bounds, using the specified device context, font, and color. - , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - This method will result in text that is horizontally and vertically centered in the rectangle specified by the `bounds` parameter. To change how the text is drawn, use a version of that takes a parameter type. - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText2` from the form's event handler, passing `e` as . - + , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + This method will result in text that is horizontally and vertically centered in the rectangle specified by the `bounds` parameter. To change how the text is drawn, use a version of that takes a parameter type. + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText2` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet3"::: + ]]> @@ -586,26 +586,26 @@ The to apply to the background area of the drawn text. Draws the specified text at the specified location, using the specified device context, font, color, and back color. - , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - You can manipulate how the text is drawn by using one of the overloads that takes a parameter. - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - + , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + You can manipulate how the text is drawn by using one of the overloads that takes a parameter. + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + > [!NOTE] -> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText3` from the form's event handler, passing `e` as . - +> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText3` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet4"::: + ]]> @@ -660,28 +660,28 @@ A bitwise combination of the values. Draws the specified text at the specified location using the specified device context, font, color, and formatting instructions. - overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . - - The `backColor` parameter is applied to the area within the `bounds` parameter. If `font` or `forecolor` is `null` or , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - - The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. - + overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . + + The `backColor` parameter is applied to the area within the `bounds` parameter. If `font` or `forecolor` is `null` or , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + + The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. + > [!NOTE] -> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText5` from the form's event handler, passing `e` as . - +> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText5` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet6"::: + ]]> @@ -736,23 +736,23 @@ The to apply to the area represented by . Draws the specified text within the specified bounds using the specified device context, font, color, and back color. - , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - This method will result in text that is horizontally and vertically centered in the rectangle specified by the `bounds` parameter. To change how the text is drawn, use a version of that takes a parameter type. - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText4` from the form's event handler, passing `e` as . - + , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + This method will result in text that is horizontally and vertically centered in the rectangle specified by the `bounds` parameter. To change how the text is drawn, use a version of that takes a parameter type. + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText4` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet5"::: + ]]> @@ -807,25 +807,25 @@ A bitwise combination of the values. Draws the specified text within the specified bounds using the specified device context, font, color, and formatting instructions. - , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - - The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText6` from the form's event handler, passing `e` as . - + , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + + The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText6` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet7"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet7"::: + ]]> @@ -1002,28 +1002,28 @@ A bitwise combination of the values. Draws the specified text at the specified location using the specified device context, font, color, back color, and formatting instructions. - , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - - The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. - + , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + + The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. + > [!NOTE] -> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText7` from the form's event handler, passing `e` as . - +> The methods that specify a as the upper-left corner of the drawn text do not render correctly on Windows 2000. If your application is intended for use on machines running Windows 2000, you should use one of the methods that specify a for the bounds of the drawn text. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText7` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet8"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet8"::: + ]]> @@ -1080,25 +1080,25 @@ A bitwise combination of the values. Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions. - , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. - - You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . - - The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. - - The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText8` from the form's event handler, passing `e` as . - + , respectively; the method will draw the text in the font or color currently selected in the device context specified by `dc`. If `forecolor` is , the text will not be drawn. + + You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . + + The text rendering offered by the class is based on GDI text rendering and is not supported for printing from Windows Forms. Instead, use the methods of the class. + + The does not support adding tab stops to drawn text, although you can expand existing tab stops using the flag. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `RenderText8` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet9"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet9"::: + ]]> @@ -1188,19 +1188,19 @@ Provides the size, in pixels, of the specified text when drawn with the specified font. The , in pixels, of drawn on a single line with the specified . You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . - method requires that the text is drawn on a single line. - - - -## Examples - The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `MeasureText1` from the form's event handler, passing `e` as . - + method requires that the text is drawn on a single line. + + + +## Examples + The following code example demonstrates how to use the method. To run this example, paste the code into a Windows Form and call `MeasureText1` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet1"::: + ]]> @@ -1299,19 +1299,19 @@ Provides the size, in pixels, of the specified text drawn with the specified font in the specified device context. The , in pixels, of drawn in a single line with the specified in the specified device context. - method requires that the text is drawn on a single line. - - - -## Examples - The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . - + method requires that the text is drawn on a single line. + + + +## Examples + The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: + ]]> @@ -1394,19 +1394,19 @@ Provides the size, in pixels, of the specified text when drawn with the specified font, using the specified size to create an initial bounding rectangle. The , in pixels, of drawn with the specified . - method uses the `proposedSize` parameter to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. - - - -## Examples - The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . - + method uses the `proposedSize` parameter to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. + + + +## Examples + The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: + ]]> @@ -1509,19 +1509,19 @@ Provides the size, in pixels, of the specified text when drawn with the specified font in the specified device context, using the specified size to create an initial bounding rectangle for the text. The , in pixels, of drawn with the specified . - method uses the `proposedSize` parameter to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. - - - -## Examples - The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . - + method uses the `proposedSize` parameter to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. + + + +## Examples + The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: + ]]> @@ -1612,24 +1612,24 @@ Provides the size, in pixels, of the specified text when drawn with the specified font and formatting instructions, using the specified size to create the initial bounding rectangle for the text. The , in pixels, of drawn with the specified and format. - uses the `proposedSize` and `flags` parameters to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. - - You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . - + uses the `proposedSize` and `flags` parameters to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. + + You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces you should use the versions of and that take a and parameter. For an example, see . + > [!NOTE] -> This overload of will ignore a value of or . If you are specifying a padding value other than the default, you should use the overload of that takes a object. - - - -## Examples - The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . - +> This overload of will ignore a value of or . If you are specifying a padding value other than the default, you should use the overload of that takes a object. + + + +## Examples + The following code example demonstrates how to use one of the methods. To run this example, paste the code into a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: + ]]> @@ -1738,21 +1738,21 @@ Provides the size, in pixels, of the specified text when drawn with the specified device context, font, and formatting instructions, using the specified size to create the initial bounding rectangle for the text. The , in pixels, of drawn with the specified and format. - method uses the `proposedSize` and `flags` parameters to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. - - You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces, use the versions of and that take a and parameter, as shown in the example. - - - -## Examples - The following example demonstrates how to use the and methods to draw a single line of text in different font styles. To run this example paste the following code in a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . - + method uses the `proposedSize` and `flags` parameters to indicate the relationship of height to width when determining the text size. When measuring text on a single line, if the `proposedSize` parameter represents a with a height dimension greater than , the returned will be adjusted to reflect the actual height of the text. + + You can manipulate how the text is drawn by using one of the overloads that takes a parameter. For example, the default behavior of the is to add padding to the bounding rectangle of the drawn text to accommodate overhanging glyphs. If you need to draw a line of text without these extra spaces, use the versions of and that take a and parameter, as shown in the example. + + + +## Examples + The following example demonstrates how to use the and methods to draw a single line of text in different font styles. To run this example paste the following code in a Windows Form and call `DrawALineOfText` from the form's event handler, passing `e` as . + :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TextFormatFlags/Overview/Form1.cs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TextFormatFlags/Overview/Form1.vb" id="Snippet11"::: + ]]> diff --git a/xml/System.Windows.Forms/Timer.xml b/xml/System.Windows.Forms/Timer.xml index 9467704c76d..36fbf4f990c 100644 --- a/xml/System.Windows.Forms/Timer.xml +++ b/xml/System.Windows.Forms/Timer.xml @@ -104,7 +104,7 @@ is set to `false`. To enable the timer, call the method or set to `true`. + When a new timer is created, it is disabled; that is, is set to `false`. To enable the timer, call the method or set to `true`. If the timer is disabled and the timer is out of scope, the timer will be disposed when garbage collection occurs. If the timer is enabled, even if it is out of scope, it is not subject to garbage collection. @@ -144,9 +144,9 @@ constructor enables you to associate a with any object. By associating the like this, you hand over control of the lifetime of the to the . This can be useful if you use a number of components in your application and want to dispose of all of them simultaneously. For example, if you associate a , an , and a with a , calling on the will force disposal of all of these components as well. + The constructor enables you to associate a with any object. By associating the like this, you hand over control of the lifetime of the to the . This can be useful if you use a number of components in your application and want to dispose of all of them simultaneously. For example, if you associate a , an , and a with a , calling on the will force disposal of all of these components as well. - When a new timer is created, it is disabled; that is, is set to `false`. To enable the timer, call the method or set to `true`. + When a new timer is created, it is disabled; that is, is set to `false`. To enable the timer, call the method or set to `true`. This instance will exist until its container releases it to garbage collection. @@ -189,10 +189,10 @@ when you are finished using the timer. The method leaves the timer in an unusable state. After you call , you must release all references to the timer so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the timer. The method leaves the timer in an unusable state. After you call , you must release all references to the timer so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> Always call before you release your last reference to the timer. Otherwise, the resources the timer is using will not be freed until garbage collection calls the destructor of the timer object. +> Always call before you release your last reference to the timer. Otherwise, the resources the timer is using will not be freed until garbage collection calls the destructor of the timer object. ]]> @@ -238,7 +238,7 @@ ## Remarks The timer is not subject to garbage collection when the value is `true`. - Calling the method is the same as setting to `true`. Likewise, calling the method is the same as setting to `false`. + Calling the method is the same as setting to `true`. Likewise, calling the method is the same as setting to `false`. @@ -446,10 +446,10 @@ ## Remarks You can also stop the timer by setting the property to `false`. A object may be enabled and disabled multiple times within the same application session. - Calling after you have disabled a by calling will cause the to restart the interrupted interval. If your is set for a 5000-millisecond interval, and you call at around 3000 milliseconds, calling will cause the to wait 5000 milliseconds before raising the event. + Calling after you have disabled a by calling will cause the to restart the interrupted interval. If your is set for a 5000-millisecond interval, and you call at around 3000 milliseconds, calling will cause the to wait 5000 milliseconds before raising the event. > [!NOTE] -> Calling Stop on any within a Windows Forms application can cause messages from other components in the application to be processed immediately, because all components operate on the main application thread. If you have two components, one set to 700 milliseconds and one set to 500 milliseconds, and you call on the first , your application may receive an event callback for the second component first. If this proves problematic, consider using the class in the namespace instead. +> Calling Stop on any within a Windows Forms application can cause messages from other components in the application to be processed immediately, because all components operate on the main application thread. If you have two components, one set to 700 milliseconds and one set to 500 milliseconds, and you call on the first , your application may receive an event callback for the second component first. If this proves problematic, consider using the class in the namespace instead. @@ -555,7 +555,7 @@ method on the class from within the event may not behave as expected, as displaying the assertion dialog box may cause Windows to raise the event repeatedly. We recommend that you refrain from testing assertions within this event, and use the , , , or methods instead. + Calling the method on the class from within the event may not behave as expected, as displaying the assertion dialog box may cause Windows to raise the event repeatedly. We recommend that you refrain from testing assertions within this event, and use the , , , or methods instead. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -604,7 +604,7 @@ method returns a string that includes the value of the property. + The method returns a string that includes the value of the property. ]]> diff --git a/xml/System.Windows.Forms/ToolBar+ToolBarButtonCollection.xml b/xml/System.Windows.Forms/ToolBar+ToolBarButtonCollection.xml index b5330eadfb1..de663a8065f 100644 --- a/xml/System.Windows.Forms/ToolBar+ToolBarButtonCollection.xml +++ b/xml/System.Windows.Forms/ToolBar+ToolBarButtonCollection.xml @@ -47,7 +47,7 @@ is a zero-based indexed collection used by the class to hold all the controls assigned to the toolbar. Use the method to add individual buttons and the method to delete them. Call the method to remove all the buttons from the collection. + The is a zero-based indexed collection used by the class to hold all the controls assigned to the toolbar. Use the method to add individual buttons and the method to delete them. Call the method to remove all the buttons from the collection. @@ -136,9 +136,9 @@ objects to the collection by using the or methods, or the other version of the method. + You can also add new objects to the collection by using the or methods, or the other version of the method. - To remove a that you have previously added, use the , or methods. + To remove a that you have previously added, use the , or methods. @@ -185,14 +185,14 @@ objects to the collection by using the or methods, or the other version of the method. + You can also add new objects to the collection by using the or methods, or the other version of the method. - To remove a that you have previously added, use the , or methods. + To remove a that you have previously added, use the , or methods. ## Examples - The following code example adds a new control to an existing with existing buttons. The toolbar button will be added to the end of the collection. + The following code example adds a new control to an existing with existing buttons. The toolbar button will be added to the end of the collection. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.ToolBarButtonCollection.Add Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/source.cs" id="Snippet1"::: @@ -235,9 +235,9 @@ ## Remarks The objects contained in the `nodes` array are appended to the end of the collection. - You can use method to quickly add a group of previously created objects to the collection instead of manually adding each to the collection using the method. + You can use method to quickly add a group of previously created objects to the collection instead of manually adding each to the collection using the method. - To remove a that you have previously added, use the , or methods. + To remove a that you have previously added, use the , or methods. @@ -283,16 +283,16 @@ method iterates through the collection and removes all toolbar buttons assigned to the . + The method iterates through the collection and removes all toolbar buttons assigned to the . - To remove an individual toolbar button from the collection, use the or methods. + To remove an individual toolbar button from the collection, use the or methods. - To add new objects to the collection, use the , or methods. + To add new objects to the collection, use the , or methods. ## Examples - The following code example displays the of the before and after the method is called. This code requires that a with at least one has been created. + The following code example displays the of the before and after the method is called. This code requires that a with at least one has been created. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.ToolBarButtonCollection.Count Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Clear/source.cs" id="Snippet1"::: @@ -384,7 +384,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `false`. ]]> @@ -430,7 +430,7 @@ ## Examples - The following code example displays the of the before and after the method is called. This code requires that a with at least one has been created. + The following code example displays the of the before and after the method is called. This code requires that a with at least one has been created. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic ToolBar.ToolBarButtonCollection.Count Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Clear/source.cs" id="Snippet1"::: @@ -512,7 +512,7 @@ in the collection. The index value allows you to easily determine which was clicked on the . The clicked can be determined by evaluating the value of the property. + This method gives you easy access to the index value of the in the collection. The index value allows you to easily determine which was clicked on the . The clicked can be determined by evaluating the value of the property. @@ -557,11 +557,11 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns -1. ]]> @@ -598,9 +598,9 @@ objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. - To remove a that you have previously added, use the , or methods. + To remove a that you have previously added, use the , or methods. @@ -750,7 +750,7 @@ ## Remarks The property corresponds to the key for a in the . - The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. + The key comparison is not case-sensitive. If the `key` parameter is `null` or an empty string, returns `null`. ]]> @@ -785,9 +785,9 @@ , or methods. + To remove toolbar buttons from the collection, use the , or methods. - To add new objects to the collection, use the , or methods. + To add new objects to the collection, use the , or methods. @@ -837,7 +837,7 @@ method removes the at the specified location in the . If you want to remove all controls from the collection, use the method. + The method removes the at the specified location in the . If you want to remove all controls from the collection, use the method. diff --git a/xml/System.Windows.Forms/ToolBar.xml b/xml/System.Windows.Forms/ToolBar.xml index 555946912f4..bf3dd527e74 100644 --- a/xml/System.Windows.Forms/ToolBar.xml +++ b/xml/System.Windows.Forms/ToolBar.xml @@ -76,7 +76,7 @@ This class is not available in .NET Core 3.1 and later versions. Use property, all buttons in the tool bar are restricted to the specified size. Otherwise, the buttons adjust their size depending on their content, and the property returns the initial size of the largest button. - To create a collection of controls to display on the , add the buttons individually by using the or methods of the property. + To create a collection of controls to display on the , add the buttons individually by using the or methods of the property. ## Examples The following code example creates a and three controls. The toolbar buttons are assigned to the button collection, the collection is assigned to the toolbar, and the toolbar is added to the form. On the event of the toolbar, the property of the is evaluated, and the appropriate dialog box opened. This code requires that a , an , a , and a have been created. @@ -238,7 +238,7 @@ This class is not available in .NET Core 3.1 and later versions. Use is set to `true`, the control sizes itself to accommodate the toolbar buttons, based upon the button size, the number of objects it contains, and the of the toolbar. + When is set to `true`, the control sizes itself to accommodate the toolbar buttons, based upon the button size, the number of objects it contains, and the of the toolbar. @@ -294,7 +294,7 @@ This class is not available in .NET Core 3.1 and later versions. Use event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolBar1`. Then ensure that the event handler is associated with the event. @@ -716,7 +716,7 @@ This class is not available in .NET Core 3.1 and later versions. Use property is a zero-based indexed collection used to hold all the controls assigned to the toolbar. Because the property is read-only, it can not be assigned a collection of toolbar buttons directly. Toolbar buttons can be added or removed by using the methods inherited from the class. Use the method to add individual buttons and the method to delete a button. Call the method to remove all the buttons from the collection. + The property is a zero-based indexed collection used to hold all the controls assigned to the toolbar. Because the property is read-only, it can not be assigned a collection of toolbar buttons directly. Toolbar buttons can be added or removed by using the methods inherited from the class. Use the method to add individual buttons and the method to delete a button. Call the method to remove all the buttons from the collection. @@ -768,7 +768,7 @@ This class is not available in .NET Core 3.1 and later versions. Use is not set, it is set to its default. Alternatively, a is computed to accommodate the largest and text assigned to the controls. + If the is not set, it is set to its default. Alternatively, a is computed to accommodate the largest and text assigned to the controls. @@ -1078,7 +1078,7 @@ This class is not available in .NET Core 3.1 and later versions. Use is set to `false`, no down arrows display on drop-down style toolbar buttons. When the user clicks the drop-down button on the toolbar, the menu drops down for selection. When the drop-down arrow is displayed, the user must press the down arrow to display the menu. + When is set to `false`, no down arrows display on drop-down style toolbar buttons. When the user clicks the drop-down button on the toolbar, the menu drops down for selection. When the drop-down arrow is displayed, the user must press the down arrow to display the menu. @@ -1374,7 +1374,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1416,7 +1416,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1454,7 +1454,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method resizes the toolbar buttons to fit the size of the new font. + The method resizes the toolbar buttons to fit the size of the new font. ]]> @@ -1719,7 +1719,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method ignores width if the property is set to or and the property is set to `true`. ignores height if the property is set to or and the property is set to `true`. + The method ignores width if the property is set to or and the property is set to `true`. ignores height if the property is set to or and the property is set to `true`. ]]> @@ -1893,7 +1893,7 @@ This class is not available in .NET Core 3.1 and later versions. Use can be aligned underneath or to the right of the image displayed on the controls. + The can be aligned underneath or to the right of the image displayed on the controls. @@ -1976,7 +1976,7 @@ This class is not available in .NET Core 3.1 and later versions. Use method returns a string that includes the type, the value of the property in the , and the string returned by the method of the toolbar's first button. + The method returns a string that includes the type, the value of the property in the , and the string returned by the method of the toolbar's first button. ]]> diff --git a/xml/System.Windows.Forms/ToolBarAppearance.xml b/xml/System.Windows.Forms/ToolBarAppearance.xml index 8add9f497b3..52b9e516f48 100644 --- a/xml/System.Windows.Forms/ToolBarAppearance.xml +++ b/xml/System.Windows.Forms/ToolBarAppearance.xml @@ -36,7 +36,7 @@ . + This enumeration is used by members such as . Set the property of the toolbar to `ToolBarAppearance.Flat` to give the toolbar and its buttons a flat appearance. As the mouse pointer moves over the buttons, their appearance changes to three-dimensional. Button separators appear as lines rather than spaces between the buttons when the toolbar has a flat appearance. diff --git a/xml/System.Windows.Forms/ToolBarButton.xml b/xml/System.Windows.Forms/ToolBarButton.xml index 018bd03a523..97c46b6235f 100644 --- a/xml/System.Windows.Forms/ToolBarButton.xml +++ b/xml/System.Windows.Forms/ToolBarButton.xml @@ -66,13 +66,13 @@ This class is not available in .NET Core 3.1 and later versions. Use has no default or assigned to it. The button's default style is `ToolBarButtonStyle.PushButton`. + A newly created has no default or assigned to it. The button's default style is `ToolBarButtonStyle.PushButton`. @@ -322,7 +322,7 @@ This class is not available in .NET Core 3.1 and later versions. Use property is set to `false`, the toolbar button cannot be clicked, and the button's appearance changes. The and assigned to the button appear grayed out. If the image or text has multiple colors, they display in a monochromatic gray. + When the property is set to `false`, the toolbar button cannot be clicked, and the button's appearance changes. The and assigned to the button appear grayed out. If the image or text has multiple colors, they display in a monochromatic gray. ]]> @@ -384,10 +384,10 @@ This class is not available in .NET Core 3.1 and later versions. Use value references the indexed value of the images in an assigned to the parent control. + The value references the indexed value of the images in an assigned to the parent control. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). @@ -457,10 +457,10 @@ If you set the property, the value indicates an image in the assigned to the parent control. + The value indicates an image in the assigned to the parent control. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -500,7 +500,7 @@ If you set the property, the from the collection of a control. + You can use the button name as a key to retrieve the from the collection of a control. ]]> @@ -575,12 +575,12 @@ If you set the property, the is set to `true`, the toolbar button appears to have its face grayed. This appearance is different from the dimmed appearance when the property is set to `false` since the partial-push appearance gives a haze to the entire button face. This property has no effect unless the is set to `ToggleButton`. + When is set to `true`, the toolbar button appears to have its face grayed. This appearance is different from the dimmed appearance when the property is set to `false` since the partial-push appearance gives a haze to the entire button face. This property has no effect unless the is set to `ToggleButton`. ## Examples - The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`.Call the `InitializeToolBar` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`.Call the `InitializeToolBar` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/PartialPush/form1.cs" id="Snippet1"::: @@ -624,12 +624,12 @@ If you set the property, the is set to `true`, the toolbar button appears sunken or inset relative to the other buttons. This property has no effect unless the is set to `ToggleButton`. + When is set to `true`, the toolbar button appears sunken or inset relative to the other buttons. This property has no effect unless the is set to `ToggleButton`. ## Examples - The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/PartialPush/form1.cs" id="Snippet1"::: @@ -666,7 +666,7 @@ If you set the property, the and the current button are both , then this property retrieves the bounding rectangle the button is currently contained in. + If the and the current button are both , then this property retrieves the bounding rectangle the button is currently contained in. ]]> @@ -714,7 +714,7 @@ If you set the property, the is set to you can specify a to be displayed when the drop-down button is pressed. If the style is set to `ToolBarButtonStyle.Separator`, the toolbar button appears as a button separator and not as a button. The `ToolBarButtonStyle.ToggleButton` style causes the toolbar button to act like a toggle button; it can be in an on or off state. + If the button is set to you can specify a to be displayed when the drop-down button is pressed. If the style is set to `ToolBarButtonStyle.Separator`, the toolbar button appears as a button separator and not as a button. The `ToolBarButtonStyle.ToggleButton` style causes the toolbar button to act like a toggle button; it can be in an on or off state. @@ -788,7 +788,7 @@ If you set the property, the ## Examples - The following code example demonstrates how to use the , , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the , , and properties. To run the example, paste the following code in a form containing a control called `RichTextBox1`. Call the `InitializeToolBar` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolBarButtonExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBarButton/PartialPush/form1.cs" id="Snippet1"::: @@ -835,7 +835,7 @@ If you set the property, the constructor that accepts the text string as a parameter. The orientation of the text on the toolbar button is determined by the property of the button's parent , which can be set to one of the enumeration values. The orientation is in relation to the image assigned to the button. If no image is assigned to the button, there will be space left for one on the surface of the toolbar button. + The default the Text property value is an empty string ("") unless you created the control with the constructor that accepts the text string as a parameter. The orientation of the text on the toolbar button is determined by the property of the button's parent , which can be set to one of the enumeration values. The orientation is in relation to the image assigned to the button. If no image is assigned to the button, there will be space left for one on the surface of the toolbar button. @@ -933,7 +933,7 @@ If you set the property, the method returns a string that includes the type and the value of the and properties. + The method returns a string that includes the type and the value of the and properties. ]]> diff --git a/xml/System.Windows.Forms/ToolBarButtonClickEventArgs.xml b/xml/System.Windows.Forms/ToolBarButtonClickEventArgs.xml index 18894a5ded9..b3b9c3c0a8f 100644 --- a/xml/System.Windows.Forms/ToolBarButtonClickEventArgs.xml +++ b/xml/System.Windows.Forms/ToolBarButtonClickEventArgs.xml @@ -129,7 +129,7 @@ property is initially set equal to the `button` parameter of the constructor. + The property is initially set equal to the `button` parameter of the constructor. diff --git a/xml/System.Windows.Forms/ToolBarButtonStyle.xml b/xml/System.Windows.Forms/ToolBarButtonStyle.xml index 13da8c6f3be..cf880e7b4f4 100644 --- a/xml/System.Windows.Forms/ToolBarButtonStyle.xml +++ b/xml/System.Windows.Forms/ToolBarButtonStyle.xml @@ -36,7 +36,7 @@ . + This enumeration is used by members such as . The toolbar button appearance is determined by the property of the toolbar. Setting the property to `Flat` will give the toolbar and its buttons a flat appearance. As the mouse pointer moves over the buttons, they take on a three-dimensional appearance. Also, when the toolbar has a flat appearance, button separators appear as a line rather than as a space between the buttons. diff --git a/xml/System.Windows.Forms/ToolBarTextAlign.xml b/xml/System.Windows.Forms/ToolBarTextAlign.xml index ec1a60cb062..667537cfd69 100644 --- a/xml/System.Windows.Forms/ToolBarTextAlign.xml +++ b/xml/System.Windows.Forms/ToolBarTextAlign.xml @@ -33,22 +33,22 @@ Specifies the alignment of text on the toolbar button control. - . - - Room is reserved for an image to be displayed on toolbar buttons. The alignment of text is in relation to the image displayed on the toolbar button. If no image is assigned to the button, the reserved space will appear to the left, or above the text displayed. - - - -## Examples - The following example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example assumes a named `toolBar1` and an named `imageList1` have been declared. - + . + + Room is reserved for an image to be displayed on toolbar buttons. The alignment of text is in relation to the image displayed on the toolbar button. If no image is assigned to the button, the reserved space will appear to the left, or above the text displayed. + + + +## Examples + The following example creates a control, sets some of its common properties, and adds it to a . Delegates are also added to the and events. This example assumes a named `toolBar1` and an named `imageList1` have been declared. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolBar/CPP/mytoolbar.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolBar+ToolBarButtonCollection/Add/mytoolbar.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStrip.xml b/xml/System.Windows.Forms/ToolStrip.xml index dabfaec244a..958a4c6513e 100644 --- a/xml/System.Windows.Forms/ToolStrip.xml +++ b/xml/System.Windows.Forms/ToolStrip.xml @@ -97,7 +97,7 @@ replaces and extends the control. ## Examples - The following code example demonstrates adding a and a to a Windows Forms, adding items to the , and adding the to the of the . + The following code example demonstrates adding a and a to a Windows Forms, adding items to the , and adding the to the of the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/Overview/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStrip/Overview/form1.vb" id="Snippet1"::: @@ -259,9 +259,9 @@ ## Remarks Set the property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. - Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. + Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. - Setting both and to `true` throws an exception. + Setting both and to `true` throws an exception. ## Examples The following code example demonstrates the syntax for setting common properties, including the property. @@ -322,9 +322,9 @@ ## Remarks Set the property to `true` and set the property to `false` to respond to drag-and-drop behavior you have defined in the , , and events. - Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. + Set to `false` and set to `true` to cause the class to handle drag-and-drop and item reordering automatically. Set to `true` for two objects to allow dragging of items from one to the other. To enable the default drag-and-drop, the ALT key must be pressed during the drag operation. - Setting both and to `true` throws an exception. + Setting both and to `true` throws an exception. ## Examples The following code example demonstrates the syntax for setting common properties, including the property. @@ -429,7 +429,7 @@ Use the property to define how a is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized. > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. ## Examples The following code example demonstrates the syntax for setting common properties, including the property. @@ -692,17 +692,17 @@ to `false` and the is embedded in a panel, the bounds of the are not translated when you move the to a different panel of the . To translate the bounds properly, synchronize the event, check the value of the property, and resize the . + If you set to `false` and the is embedded in a panel, the bounds of the are not translated when you move the to a different panel of the . To translate the bounds properly, synchronize the event, check the value of the property, and resize the . - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. ## Examples The following code example demonstrates the syntax for setting common properties, including the property. @@ -761,7 +761,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -804,7 +804,7 @@ ## Remarks The property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a will have the same as its parent by default. For more information about ambient properties, see the class or the class overview. ]]> @@ -900,7 +900,7 @@ ## Remarks The of a returns a single for all data-bound controls contained by the . The keeps all controls that are bound to the same data source synchronized. For example, setting the property of the specifies the item in the underlying list that all data-bound controls point to. - For more information about creating a new and assigning it to the property, see the constructor. + For more information about creating a new and assigning it to the property, see the constructor. ]]> @@ -1049,7 +1049,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -1433,7 +1433,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -1727,7 +1727,7 @@ ## Remarks Use the property to access only those items that are currently displayed. These are the items that are not currently in an overflow menu. - Use the collection to retrieve all the items of a . + Use the collection to retrieve all the items of a . ]]> @@ -1854,14 +1854,14 @@ property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their z-order, which is the visual layering of controls on a form along the form's z-axis (depth). + Use the property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their z-order, which is the visual layering of controls on a form along the form's z-axis (depth). A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. If the control is in a , the can be repositioned within the and across s. The property is ignored, and if the property is `false`, the size of the grows as items are added to the . Typically, the does not participate in the tab order. > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. ## Examples The following code example demonstrates the syntax for setting common properties, including the property. @@ -2029,7 +2029,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -2262,7 +2262,7 @@ method to get the next of a . The enumeration coordinates with the property. + Use the method to get the next of a . The enumeration coordinates with the property. ]]> @@ -2334,7 +2334,7 @@ property to get or set the space around the move handle. Because can take individual values for , , , and , you can adjust the space around the move handle as preferred. The margin can even be off the edge of the . + Use the property to get or set the space around the move handle. Because can take individual values for , , , and , you can adjust the space around the move handle as preferred. The margin can even be off the edge of the . ## Examples The following code example demonstrates the syntax for setting common properties, including the property. @@ -2429,7 +2429,7 @@ movable by putting it in a and ensuring that its is set to . + In a stack layout, make a movable by putting it in a and ensuring that its is set to . ]]> @@ -2582,15 +2582,15 @@ , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. ]]> @@ -2642,15 +2642,15 @@ ## Remarks Use the property to control the default size of an image. Use to make the size of the image on a to automatically adjust to fit on a while retaining the original image proportions. - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. ## Examples The following code example demonstrates the syntax for setting common properties, including the property. @@ -2777,7 +2777,7 @@ method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. + The method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. ]]> @@ -2856,7 +2856,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -2906,7 +2906,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -2956,7 +2956,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -3011,7 +3011,7 @@ collection to retrieve all the items that have been added to the , not just the items that are displayed. An item remains in the collection even if it is an overflow item and is therefore not currently visible. + Use the collection to retrieve all the items that have been added to the , not just the items that are displayed. An item remains in the collection even if it is an overflow item and is therefore not currently visible. Use the property to retrieve only the items that are currently displayed on the . @@ -3069,7 +3069,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -3261,7 +3261,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -3336,7 +3336,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3380,7 +3380,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3424,7 +3424,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3468,7 +3468,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3544,7 +3544,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3588,7 +3588,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3657,7 +3657,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3701,7 +3701,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3745,7 +3745,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3789,7 +3789,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3833,7 +3833,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3877,7 +3877,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3925,7 +3925,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3969,7 +3969,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4045,7 +4045,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4089,7 +4089,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4133,7 +4133,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4177,7 +4177,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4221,7 +4221,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4271,7 +4271,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4317,7 +4317,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4361,7 +4361,7 @@ ## Remarks For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4415,7 +4415,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4491,7 +4491,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4537,7 +4537,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4745,7 +4745,7 @@ method is called during message preprocessing to handle dialog characters such as TAB, RETURN, ESCAPE, and arrow keys. This method is called only if the method indicates that the control is not processing the key. The simply sends the character to the parent control's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or an ActiveX control. + The method is called during message preprocessing to handle dialog characters such as TAB, RETURN, ESCAPE, and arrow keys. This method is called only if the method indicates that the control is not processing the key. The simply sends the character to the parent control's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or an ActiveX control. ]]> @@ -4789,11 +4789,11 @@ method is called to give a control the opportunity to process a mnemonic character. This method should determine whether the control is in a state to process mnemonics and whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. + The method is called to give a control the opportunity to process a mnemonic character. This method should determine whether the control is in a state to process mnemonics and whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. - Implementations of this method often use the method to determine whether the given character matches a mnemonic in the control's text. + Implementations of this method often use the method to determine whether the given character matches a mnemonic in the control's text. - This default implementation of the method simply returns `false`, to indicate that the control has no mnemonic. + This default implementation of the method simply returns `false`, to indicate that the control has no mnemonic. ]]> @@ -4841,7 +4841,7 @@ ## Remarks Use the property and the class to customize the look and feel of any that does not have a window handle. - To do this, derive a class from , assign it to the property, and call the method. + To do this, derive a class from , assign it to the property, and call the method. ]]> @@ -4890,7 +4890,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. @@ -5073,7 +5073,7 @@ method to control where the focus returns to when the property is `false`. + Override the method to control where the focus returns to when the property is `false`. ]]> @@ -5118,7 +5118,7 @@ ## Remarks The `directed` and `forward` parameters are used by container-style controls. When the `directed` parameter is set to `true`, the `forward` parameter is evaluated to determine which control to select. When `forward` is set to `true`, the next control in the tab order is selected; when `false`, the previous control in the tab order is selected. - The method activates the control if the control's style bit is set to `true`, it is contained in another control, and all its parent controls are both visible and enabled. + The method activates the control if the control's style bit is set to `true`, it is contained in another control, and all its parent controls are both visible and enabled. ]]> @@ -5674,12 +5674,12 @@ Use the method after getting filtered through the method. + All messages are sent to the method after getting filtered through the method. - The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)). + The method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see the [WindowProc function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)). ## Examples - The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the Platform SDK documentation reference located at . Actual constant values can be found in the windows.h header file included in the Platform SDK (Core SDK section) download, which is also available on Docs. + The following code example demonstrates overriding the method to handle operating system messages identified in the structure. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available , , and values, see the Platform SDK documentation reference located at . Actual constant values can be found in the windows.h header file included in the Platform SDK (Core SDK section) download, which is also available on Docs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckedListBox/WndProc/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ToolStripButton.xml b/xml/System.Windows.Forms/ToolStripButton.xml index 2f31a6046cd..4b7e9bc40bc 100644 --- a/xml/System.Windows.Forms/ToolStripButton.xml +++ b/xml/System.Windows.Forms/ToolStripButton.xml @@ -37,7 +37,7 @@ to create a toolbar button that supports both text and images. Use the and properties to get or set the positioning of images and text. + Use to create a toolbar button that supports both text and images. Use the and properties to get or set the positioning of images and text. You can display a with various border styles, and you can use it to represent and activate operational states. You can also define it to have the focus by default. @@ -327,12 +327,12 @@ property to `false` to display custom on a . + Set the property to `false` to display custom on a . ## Examples - The following code example turns off the automatic text for a and sets custom . + The following code example turns off the automatic text for a and sets custom . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/ShowItemToolTips/Form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStrip/ShowItemToolTips/Form1.vb" id="Snippet1"::: @@ -554,7 +554,7 @@ to `Indeterminate` when you do not want to set a default state. + Set the to `Indeterminate` when you do not want to set a default state. ]]> @@ -596,7 +596,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripButton1`. Then ensure that the event handler is associated with the event. @@ -644,7 +644,7 @@ , it will be called when the property is referenced. + If you do not explicitly call , it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. @@ -752,7 +752,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -796,7 +796,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -840,7 +840,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -884,7 +884,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/ToolStripComboBox.xml b/xml/System.Windows.Forms/ToolStripComboBox.xml index c9ed03e010c..f388205785f 100644 --- a/xml/System.Windows.Forms/ToolStripComboBox.xml +++ b/xml/System.Windows.Forms/ToolStripComboBox.xml @@ -45,9 +45,9 @@ A displays an editing field combined with a , allowing the user to select from the list or to enter new text. By default, a displays an edit field with a hidden drop-down list. The property determines the style of combo box to display. You can enter a value that allows for a simple drop-down, where the list always displays, a drop-down list box, where the text portion is not editable and you must select an arrow to view the drop-down list box, or the default drop-down list box, where the text portion is editable and the user must press the arrow key to view the list. To always display a list that the user cannot edit, use a control. - To add objects to the list at run time, assign an array of object references with the method. The list then displays the default string value for each object. You can add individual objects with the method. + To add objects to the list at run time, assign an array of object references with the method. The list then displays the default string value for each object. You can add individual objects with the method. - In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. The and methods enable you to add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. + In addition to display and selection functionality, the also provides features that enable you to efficiently add items to the and to find text within the items of the list. The and methods enable you to add a large number of items to the without the control being repainted each time an item is added to the list. The and methods enable you to search for an item in the list that contains a specific search string. Use the property to get or set the current item in the drop-down list, and use the property to get or set a reference to the current item in the drop-down list. @@ -221,11 +221,11 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to in order to use . + The use of the property is optional, but you must set the property to in order to use . - You must use the and properties together. + You must use the and properties together. @@ -496,9 +496,9 @@ method is called. + This method prevents the control from painting until the method is called. - The preferred way to add items to the is to use the method through the property of the . This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. + The preferred way to add items to the is to use the method through the property of the . This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. ]]> @@ -740,7 +740,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripComboBox1`. Then ensure that the event handler is associated with the event. @@ -792,7 +792,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripComboBox1`. Then ensure that the event handler is associated with the event. @@ -956,7 +956,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripComboBox1`. Then ensure that the event handler is associated with the event. @@ -1081,7 +1081,7 @@ is to use the method through the property of the . This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. + The preferred way to add items to the is to use the method through the property of the . This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the method, you can use the method to prevent the control from repainting the each time an item is added to the list. Once you have completed the task of adding items to the list, call the method to enable the to repaint. This way of adding items can prevent flicker during the drawing of the when a large number of items are being added to the list. ]]> @@ -1131,7 +1131,7 @@ , use method to specify a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text, and returning the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , use method to specify a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. ]]> @@ -1174,7 +1174,7 @@ , use this method to specify a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , use this method to specify a starting index within the . If you want to perform a search for an exact word match instead of a partial match, use the method. ]]> @@ -1224,7 +1224,7 @@ , use method to specify a starting index within the . If you want to search for a partial match instead of the exact word, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of the text in the , use method to specify a starting index within the . If you want to search for a partial match instead of the exact word, use the method. ]]> @@ -1267,7 +1267,7 @@ , use this method to specify a starting index within the . If you want to search for a partial match instead of the exact word, use the method. + The search performed by this method is not case-sensitive. The `s` parameter is a substring to compare against the text associated with the items in the combo box list. The search performs a partial match starting from the beginning of the text at the specified index, and returns the first item in the list that matches the specified substring. You can then perform tasks, such as removing the item that contains the search text or changing the item's text. Once you have found the specified text, if you want to search for other instances of exact text in the , use this method to specify a starting index within the . If you want to search for a partial match instead of the exact word, use the method. ]]> @@ -1625,7 +1625,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1669,7 +1669,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1713,7 +1713,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1757,7 +1757,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1799,11 +1799,11 @@ is raised only when the user changes the combo box selection. Do not use or to capture user changes, because those events are also raised when the selection changes programmatically. This event is also raised when you set . + is raised only when the user changes the combo box selection. Do not use or to capture user changes, because those events are also raised when the selection changes programmatically. This event is also raised when you set . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1846,13 +1846,13 @@ method to add or prevent the synchronizing of control events. + Override the method to add or prevent the synchronizing of control events. - If you override and hook up events here, unhook them by using the method. + If you override and hook up events here, unhook them by using the method. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1896,7 +1896,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1939,11 +1939,11 @@ method to unsubscribe events subscribed in . + Override the method to unsubscribe events subscribed in . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2069,7 +2069,7 @@ ## Remarks This property indicates the zero-based index of the currently selected item in the combo box list. Setting a new index raises the event. - **Note** To deselect the currently selected item, set the to -1. + **Note** To deselect the currently selected item, set the to -1. ]]> @@ -2116,7 +2116,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripComboBox1`. Then ensure that the event handler is associated with the event. @@ -2412,7 +2412,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripComboBox1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ToolStripContainer.xml b/xml/System.Windows.Forms/ToolStripContainer.xml index 352ff126f9c..d0151c6609d 100644 --- a/xml/System.Windows.Forms/ToolStripContainer.xml +++ b/xml/System.Windows.Forms/ToolStripContainer.xml @@ -49,14 +49,14 @@ is similar to . It uses four docked side panels (instances of ) and one central panel (an instance of ) to create a typical arrangement. You cannot remove the side panels, but you can hide them by setting their respective , , , and properties to `false`. By default, each of these properties is `true` at design time. Also at design time, the appears with its top panel already expanded. You can neither remove nor hide the . You can arrange one or more , , or controls in the side panels, and you can use the central panel for other controls. The also provides a way to get renderer support into the body of your form for a consistent appearance. + is similar to . It uses four docked side panels (instances of ) and one central panel (an instance of ) to create a typical arrangement. You cannot remove the side panels, but you can hide them by setting their respective , , , and properties to `false`. By default, each of these properties is `true` at design time. Also at design time, the appears with its top panel already expanded. You can neither remove nor hide the . You can arrange one or more , , or controls in the side panels, and you can use the central panel for other controls. The also provides a way to get renderer support into the body of your form for a consistent appearance. does not support Multiple Document Interface (MDI) applications. Use for MDI applications. ## Examples - The following code example demonstrates adding a and a to a Windows Forms, adding items to the , and adding the to the of the . + The following code example demonstrates adding a and a to a Windows Forms, adding items to the , and adding the to the of the . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStrip/Overview/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStrip/Overview/form1.vb" id="Snippet1"::: @@ -1400,7 +1400,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/ToolStripContentPanel.xml b/xml/System.Windows.Forms/ToolStripContentPanel.xml index cefa888af83..d93d18fa3d6 100644 --- a/xml/System.Windows.Forms/ToolStripContentPanel.xml +++ b/xml/System.Windows.Forms/ToolStripContentPanel.xml @@ -720,7 +720,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripContentPanel1`. Then ensure that the event handler is associated with the event. @@ -1059,7 +1059,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1111,7 +1111,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1155,7 +1155,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1242,7 +1242,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripContentPanel1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ToolStripControlHost.xml b/xml/System.Windows.Forms/ToolStripControlHost.xml index 7fda26593a5..97a835dfdac 100644 --- a/xml/System.Windows.Forms/ToolStripControlHost.xml +++ b/xml/System.Windows.Forms/ToolStripControlHost.xml @@ -41,12 +41,12 @@ Use the class to host your customized controls or any other Windows Forms control. - To customize a , derive from and create a custom implementation. You can override methods such as to handle events raised by the hosted controls, and you can put custom functionality into properties to enhance the hosted control. + To customize a , derive from and create a custom implementation. You can override methods such as to handle events raised by the hosted controls, and you can put custom functionality into properties to enhance the hosted control. ## Examples - The following code example demonstrates constructing a with a control, using to handle events, and exposing some of its members to the . + The following code example demonstrates constructing a with a control, using to handle events, and exposing some of its members to the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripControlHost/CPP/form1.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripControlHost/Overview/form1.cs" id="Snippet13"::: @@ -498,7 +498,7 @@ property represents the of the control when it is initially created. If is `true`, the control is sized automatically in accordance with the orientation. You can manually adjust the size of the control by setting its property value to `false`. + The property represents the of the control when it is initially created. If is `true`, the control is sized automatically in accordance with the orientation. You can manually adjust the size of the control by setting its property value to `false`. > [!NOTE] > In order to maintain better performance, you should not set the of a control in its constructor. The preferred method is to override the property. @@ -780,7 +780,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. @@ -1277,7 +1277,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. @@ -1330,7 +1330,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. @@ -1383,7 +1383,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. @@ -1436,7 +1436,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. @@ -1541,7 +1541,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1586,7 +1586,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1630,7 +1630,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1674,7 +1674,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1718,7 +1718,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1762,7 +1762,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1806,7 +1806,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1882,7 +1882,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1926,7 +1926,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2037,13 +2037,13 @@ method to add or prevent the synchronizing of control events. + Override the method to add or prevent the synchronizing of control events. - If you override and hook up events here, unhook them by using the method. + If you override and hook up events here, unhook them by using the method. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -2095,11 +2095,11 @@ method to unsubscribe events subscribed in . + Override the method to unsubscribe events subscribed in . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. @@ -2152,7 +2152,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2196,7 +2196,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2834,7 +2834,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. @@ -2887,7 +2887,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripControlHost1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ToolStripDropDown.xml b/xml/System.Windows.Forms/ToolStripDropDown.xml index 8a7df0373dc..dda5dbb3feb 100644 --- a/xml/System.Windows.Forms/ToolStripDropDown.xml +++ b/xml/System.Windows.Forms/ToolStripDropDown.xml @@ -280,10 +280,10 @@ Use the to display drop-down lists that always stays open, set to `false`. + If you want a that always stays open, set to `false`. > [!NOTE] -> Consider handling the event instead of setting the property. Inspect the field in your handler to specify custom closing logic. +> Consider handling the event instead of setting the property. Inspect the field in your handler to specify custom closing logic. ## Examples The following code example demonstrates how to toggle the value of the property in response to a check box selection. @@ -374,7 +374,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -424,7 +424,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -474,7 +474,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -572,7 +572,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -654,10 +654,10 @@ Use the to display drop-down lists method to close a control under specific conditions, such as when an application is started or an item is selected by clicking the control, if the focus changes, or if specified keyboard action occurs. + Use the method to close a control under specific conditions, such as when an application is started or an item is selected by clicking the control, if the focus changes, or if specified keyboard action occurs. ## Examples - The following code example demonstrates how to specify a close reason when explicitly closing a control with the method. + The following code example demonstrates how to specify a close reason when explicitly closing a control with the method. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripDropDown/AutoClose/Form1.vb" id="Snippet8"::: @@ -700,7 +700,7 @@ Use the to display drop-down lists When you create a 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/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -1405,7 +1405,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -1501,7 +1501,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -1839,7 +1839,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -1890,7 +1890,7 @@ Use the to display drop-down lists event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -1984,7 +1984,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -2038,7 +2038,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -2092,7 +2092,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -2146,7 +2146,7 @@ Use the to display drop-down lists For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -2271,7 +2271,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2315,7 +2315,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2359,7 +2359,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2403,7 +2403,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2447,7 +2447,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2491,7 +2491,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2535,7 +2535,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2579,7 +2579,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2623,7 +2623,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2667,7 +2667,7 @@ Use the to display drop-down lists ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2763,7 +2763,7 @@ Use the to display drop-down lists When you create a 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/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -2995,7 +2995,7 @@ Use the to display drop-down lists method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. + This method is called during message preprocessing to handle dialog box keys, such as TAB, RETURN, ESCAPE, and arrow keys. This method is called only if the method indicates that the control is not processing the key. The simply sends the character to the parent's method, or returns `false` if the control has no parent. The class overrides this method to perform actual processing of dialog box keys. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control. ]]> @@ -3036,7 +3036,7 @@ Use the to display drop-down lists method to determine whether the given character matches a mnemonic in the control's text. + This method is called to give a control the opportunity to process a mnemonic character. The method should determine whether the control is in a state to process mnemonics and if whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. Implementations of this method often use the method to determine whether the given character matches a mnemonic in the control's text. For example: @@ -3046,10 +3046,10 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { } ``` - This default implementation of the method simply returns `false` to indicate that the control has no mnemonic. + This default implementation of the method simply returns `false` to indicate that the control has no mnemonic. ## Examples - The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example, paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. + The following code example demonstrates an extension of the button class that overrides the method to exhibit custom behavior. The example also demonstrates the use of the and properties. To run this example, paste the following code after a form class, in the same file. Add a button of type `MnemonicButton` to the form. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ProcessMnemonic/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/CheckBox/ProcessMnemonic/form1.cs" id="Snippet1"::: @@ -3144,7 +3144,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -3782,7 +3782,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. @@ -4096,7 +4096,7 @@ if (CanSelect && IsMnemonic(charCode, MyControl.Text) { . + For more information and a code example, see . ]]> diff --git a/xml/System.Windows.Forms/ToolStripDropDownButton.xml b/xml/System.Windows.Forms/ToolStripDropDownButton.xml index 8bef0559e6d..a1e30507825 100644 --- a/xml/System.Windows.Forms/ToolStripDropDownButton.xml +++ b/xml/System.Windows.Forms/ToolStripDropDownButton.xml @@ -478,7 +478,7 @@ For more information, see the [migration guide](/dotnet/framework/migration-guid ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -522,7 +522,7 @@ For more information, see the [migration guide](/dotnet/framework/migration-guid ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -598,7 +598,7 @@ For more information, see the [migration guide](/dotnet/framework/migration-guid ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/ToolStripDropDownClosedEventArgs.xml b/xml/System.Windows.Forms/ToolStripDropDownClosedEventArgs.xml index 46e40ade8a3..e067e0f8b54 100644 --- a/xml/System.Windows.Forms/ToolStripDropDownClosedEventArgs.xml +++ b/xml/System.Windows.Forms/ToolStripDropDownClosedEventArgs.xml @@ -24,21 +24,21 @@ Provides data for the event. - method to make decisions about actions to take when a drop-down control closes. - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - + method to make decisions about actions to take when a drop-down control closes. + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet177"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet177"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet177"::: + ]]> @@ -77,11 +77,11 @@ One of the values. Initializes a new instance of the class. - constructor to make decisions about actions to take when a drop-down control closes for the specified reason. - + constructor to make decisions about actions to take when a drop-down control closes for the specified reason. + ]]> @@ -119,16 +119,16 @@ Gets the reason that the closed. One of the values. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet177"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet177"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet177"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStripDropDownClosingEventArgs.xml b/xml/System.Windows.Forms/ToolStripDropDownClosingEventArgs.xml index 005b9936b44..f546474644c 100644 --- a/xml/System.Windows.Forms/ToolStripDropDownClosingEventArgs.xml +++ b/xml/System.Windows.Forms/ToolStripDropDownClosingEventArgs.xml @@ -24,21 +24,21 @@ Provides data for the event. - class to determine which actions to take when the user closes the drop-down list but before the list is closed. - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - + class to determine which actions to take when the user closes the drop-down list but before the list is closed. + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet178"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet178"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet178"::: + ]]> @@ -79,11 +79,11 @@ One of the values. Initializes a new instance of the class with the specified reason for closing. - class to determine which actions to take when the user closes the drop-down list but before the list is closed. - + class to determine which actions to take when the user closes the drop-down list but before the list is closed. + ]]> @@ -121,16 +121,16 @@ Gets the reason that the is closing. One of the values. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStripDropDown1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet178"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet178"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet178"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStripDropDownItem.xml b/xml/System.Windows.Forms/ToolStripDropDownItem.xml index 77222057c19..3960c044c0b 100644 --- a/xml/System.Windows.Forms/ToolStripDropDownItem.xml +++ b/xml/System.Windows.Forms/ToolStripDropDownItem.xml @@ -310,7 +310,7 @@ method is automatically called if the property finds no associated with the . + The method is automatically called if the property finds no associated with the . ]]> @@ -400,7 +400,7 @@ is associated with the , a call to creates a generic drop-down control. + If no is associated with the , a call to creates a generic drop-down control. > [!NOTE] > If a drop-down control is automatically generated, which means that items are added to the collection, and you then set the property to an explicit drop-down control, you might lose data. @@ -668,7 +668,7 @@ method. You can use this event to dynamically populate the . + This event occurs when the user clicks the drop down item or when you call the method. You can use this event to dynamically populate the . For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -725,7 +725,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripDropDownItem1` and ensure that the event handler is associated with the event. @@ -847,7 +847,7 @@ method to prevent the user from choosing one of the options available on the associated control. + Use the method to prevent the user from choosing one of the options available on the associated control. @@ -925,7 +925,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -969,7 +969,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1013,7 +1013,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1057,7 +1057,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1101,7 +1101,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1145,7 +1145,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1266,7 +1266,7 @@ ## Remarks This method is called during message preprocessing to handle command keys. Command keys are keys that always take precedence over regular input keys. Examples of command keys include accelerators and menu shortcuts. The method must return `true` to indicate that it has processed the command key, or `false` to indicate that the key is not a command key. - The implementation of this method calls the of the if there are items in the collection. Otherwise, this implementation calls the base class implementation. + The implementation of this method calls the of the if there are items in the collection. Otherwise, this implementation calls the base class implementation. ]]> @@ -1355,7 +1355,7 @@ method to display the drop-down controls that have been set by the property. + Use the method to display the drop-down controls that have been set by the property. diff --git a/xml/System.Windows.Forms/ToolStripDropDownItemAccessibleObject.xml b/xml/System.Windows.Forms/ToolStripDropDownItemAccessibleObject.xml index 034fa3ce8e8..a79c9e9266d 100644 --- a/xml/System.Windows.Forms/ToolStripDropDownItemAccessibleObject.xml +++ b/xml/System.Windows.Forms/ToolStripDropDownItemAccessibleObject.xml @@ -101,7 +101,7 @@ property. A client can use automation (if supported) instead of to perform an object's default action. However, provides an easy way to perform an object's most commonly used action. + Clients can retrieve the object's default action by inspecting an object's property. A client can use automation (if supported) instead of to perform an object's default action. However, provides an easy way to perform an object's most commonly used action. ]]> @@ -146,9 +146,9 @@ and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from , is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Therefore, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from , is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Therefore, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code demonstrates overriding the method. See the class overview for the complete code example. + This code demonstrates overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet4"::: @@ -190,9 +190,9 @@ and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from , is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Therefore, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from , is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Therefore, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code demonstrates shows overriding the method. See the class overview for the complete code example. + This code demonstrates shows overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet4"::: diff --git a/xml/System.Windows.Forms/ToolStripDropDownMenu.xml b/xml/System.Windows.Forms/ToolStripDropDownMenu.xml index dfbced76c46..23a20778d4d 100644 --- a/xml/System.Windows.Forms/ToolStripDropDownMenu.xml +++ b/xml/System.Windows.Forms/ToolStripDropDownMenu.xml @@ -49,7 +49,7 @@ is the base class for , providing necessary painting and layout properties and methods. The properties of this class that you are most likely to use directly are the and properties, which determine whether the shortcut menu will be able to display a check mark, an image, or both. + is the base class for , providing necessary painting and layout properties and methods. The properties of this class that you are most likely to use directly are the and properties, which determine whether the shortcut menu will be able to display a check mark, an image, or both. and replace and extend the control, which was removed in .NET Core 3.1. @@ -172,7 +172,7 @@ method to add a with commonly used characteristics to a . + Use the method to add a with commonly used characteristics to a . ]]> @@ -379,7 +379,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -423,7 +423,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/ToolStripGripStyle.xml b/xml/System.Windows.Forms/ToolStripGripStyle.xml index a938ebdcfdd..7e8fc42697d 100644 --- a/xml/System.Windows.Forms/ToolStripGripStyle.xml +++ b/xml/System.Windows.Forms/ToolStripGripStyle.xml @@ -23,11 +23,11 @@ Specifies visibility of a move handle (grip). - movable by putting it in a and ensuring that its is set to Visible. - + movable by putting it in a and ensuring that its is set to Visible. + ]]> diff --git a/xml/System.Windows.Forms/ToolStripItem.xml b/xml/System.Windows.Forms/ToolStripItem.xml index 95bccdce7ba..c89233ef62a 100644 --- a/xml/System.Windows.Forms/ToolStripItem.xml +++ b/xml/System.Windows.Forms/ToolStripItem.xml @@ -404,7 +404,7 @@ ## Remarks An object's property provides a textual description about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but can also be used for context searching or other applications. - The property is needed if the description is not obvious, or if it is not redundant based on the object's , , , and properties. For example, a button labeled **OK** would not need additional information, but a button that shows a picture of a cactus would. The and and, perhaps, properties for the cactus button would describe its purpose, but the property would convey information that is less tangible, such as "A button that shows a picture of a cactus." + The property is needed if the description is not obvious, or if it is not redundant based on the object's , , , and properties. For example, a button labeled **OK** would not need additional information, but a button that shows a picture of a cactus would. The and and, perhaps, properties for the cactus button would describe its purpose, but the property would convey information that is less tangible, such as "A button that shows a picture of a cactus." For more information about properties of accessible objects, see [Content of Descriptive Properties](/windows/desktop/winauto/content-of-descriptive-properties). @@ -577,7 +577,7 @@ If the property is , items marked as are aligned to the right side of the and items marked are aligned to the left. > [!NOTE] -> In flow and table layouts, the property is ignored. In flow or table layout, use the or property to align the items within the row or table cell. +> In flow and table layouts, the property is ignored. In flow or table layout, use the or property to align the items within the row or table cell. @@ -641,7 +641,7 @@ Set the property to `false` and set the property to `true` to cause the class to handle drag-and-drop and item reordering privately. - Setting both the and the properties to `true` throws an exception. + Setting both the and the properties to `true` throws an exception. @@ -704,7 +704,7 @@ Use the property to define how a is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized. > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. ]]> @@ -767,7 +767,7 @@ ## Examples - The following code example demonstrates how to set the , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + The following code example demonstrates how to set the , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: @@ -814,14 +814,14 @@ uses the property as the default source for the content. Set to `false` to use as the source for content. + uses the property as the default source for the content. Set to `false` to use as the source for content. - To use this property, you must also set to `true`. + To use this property, you must also set to `true`. ## Examples - The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: @@ -876,7 +876,7 @@ property is different from the property in that indicates whether the is shown, while indicates whether the and its parent are shown. Setting either or to `true` or `false` sets the other property to `true` or `false`. + The property is different from the property in that indicates whether the is shown, while indicates whether the and its parent are shown. Setting either or to `true` or `false` sets the other property to `true` or `false`. ]]> @@ -923,7 +923,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -966,7 +966,7 @@ ## Remarks The property does not support transparent colors unless the `SupportsTransparentBackColor` value of is set to `true`. - The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a has the same as its parent by default. For more information about ambient properties, see the class or the class overview. + The property is an ambient property. An ambient property is a control property that, if not set, is retrieved from the parent control. For example, a has the same as its parent by default. For more information about ambient properties, see the class or the class overview. @@ -1023,7 +1023,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -1180,7 +1180,7 @@ ## Remarks Use the property to determine the size and location of a . - Unlike other controls, a has no property that enables you to set the upper-left corner of a relative to the upper-left corner of the . If you need to set the absolute position of a , you must override the and define a custom implementation of the method. + Unlike other controls, a has no property that enables you to set the upper-left corner of a relative to the upper-left corner of the . If you need to set the absolute position of a , you must override the and define a custom implementation of the method. ]]> @@ -1262,7 +1262,7 @@ ## Examples - The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: @@ -1801,12 +1801,12 @@ to set the values of an item's Text and Image properties while displaying only what you want. This is typically used to change only the display style when showing the same item in a different context. + Use to set the values of an item's Text and Image properties while displaying only what you want. This is typically used to change only the display style when showing the same item in a different context. ## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripButton/Overview/Form1.vb" id="Snippet2"::: @@ -1854,7 +1854,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -1955,12 +1955,12 @@ ## Remarks This property applies only to flow layouts. - Use the property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). + Use the property to define how a is automatically resized as its parent control is resized. For example, setting to causes the to align itself with the left edges of its parent control and to resize as the parent control is resized. Controls are docked in their Z-order, which is the visual layering of controls on a form along the form's Z-axis (depth). A control can be docked to one edge of its parent container or can be docked to all edges and fill the parent container. > [!NOTE] -> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. +> The and properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence. ]]> @@ -2105,7 +2105,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -2192,12 +2192,12 @@ and properties of the are in screen coordinates, not client coordinates. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). + The and properties of the are in screen coordinates, not client coordinates. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. + The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet3"::: @@ -2250,7 +2250,7 @@ The following remarks describe how and when events related to drag-and-drop operations are raised. - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -2273,14 +2273,14 @@ - If the value of is , the event is raised. > [!NOTE] -> The and properties of the are in screen coordinates, not client coordinates. +> The and properties of the are in screen coordinates, not client coordinates. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. + The following code example shows how to convert the and properties to a client . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet3"::: @@ -2333,7 +2333,7 @@ The following remarks describe how and when events related to drag-and-drop operations are raised. - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -2358,7 +2358,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -2413,7 +2413,7 @@ The following remarks describe how and when events related to drag-and-drop operations are raised. - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -2438,7 +2438,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -2529,7 +2529,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -2665,7 +2665,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -2714,7 +2714,7 @@ is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. + is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. ]]> @@ -2797,7 +2797,7 @@ The following remarks describe how and when events related to drag-and-drop operations are raised. - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -2822,7 +2822,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -2913,20 +2913,20 @@ , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. ## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripButton/Overview/Form1.vb" id="Snippet2"::: @@ -2981,20 +2981,20 @@ ## Remarks Use the property to get or set image alignment on a . Use the property to get or set text alignment on a . - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. ## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripButton/Overview/Form1.vb" id="Snippet2"::: @@ -3070,21 +3070,21 @@ and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. -If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +If the property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. ]]> @@ -3156,18 +3156,18 @@ For example, consider a button control whose and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). - The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. @@ -3225,20 +3225,20 @@ If you set the property, the , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and is , no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and is , neither image nor scaling occurs. + - If is `false` and is , neither image nor scaling occurs. ## Examples - The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: @@ -3288,7 +3288,7 @@ If you set the property, the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: @@ -3337,7 +3337,7 @@ If you set the property, the method for custom rendering. This code example is part of a larger example provided for the class. + The following code example demonstrates how to use the method for custom rendering. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Overview/Form1.vb" id="Snippet15"::: @@ -3449,7 +3449,7 @@ If you set the property, the . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. + This method is called during window message preprocessing to determine whether the given input character should be preprocessed or sent directly to the . If the method returns `true`, the specified character is sent directly to the . However, if the method returns `false`, the character is preprocessed and only sent to the if it is not consumed by the preprocessing phase. The preprocessing of a character includes checking whether the character is a mnemonic of another control. ]]> @@ -3491,7 +3491,7 @@ If you set the property, the method during window-message preprocessing to determine whether the specified key is a regular input key that should be sent directly to the or a special key (such as PAGE UP, PAGE DOWN, ENTER, ESC, TAB, or arrow keys) that should be preprocessed. In the latter case, the key is sent to the only if it is not consumed by the preprocessing phase. + Call the method during window-message preprocessing to determine whether the specified key is a regular input key that should be sent directly to the or a special key (such as PAGE UP, PAGE DOWN, ENTER, ESC, TAB, or arrow keys) that should be preprocessed. In the latter case, the key is sent to the only if it is not consumed by the preprocessing phase. ]]> @@ -3621,7 +3621,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -3794,7 +3794,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -3858,7 +3858,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -3922,7 +3922,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -3986,7 +3986,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -4050,7 +4050,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -4114,7 +4114,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -4213,7 +4213,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4263,7 +4263,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4304,7 +4304,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4349,12 +4349,12 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Overview/Form1.vb" id="Snippet11"::: @@ -4521,7 +4521,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4565,12 +4565,12 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Overview/Form1.vb" id="Snippet14"::: @@ -4623,7 +4623,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4673,7 +4673,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4723,7 +4723,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4773,7 +4773,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4817,7 +4817,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4867,7 +4867,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4917,7 +4917,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4967,7 +4967,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5011,7 +5011,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5057,7 +5057,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5101,7 +5101,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5145,12 +5145,12 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Overview/Form1.vb" id="Snippet15"::: @@ -5197,7 +5197,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5241,12 +5241,12 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Overview/Form1.vb" id="Snippet16"::: @@ -5293,7 +5293,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5337,7 +5337,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5381,7 +5381,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5429,11 +5429,11 @@ If you set the property, the method to notify inheritors of the property that the font has changed. + Use the method to notify inheritors of the property that the font has changed. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -5477,12 +5477,12 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method for custom rendering. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method for custom rendering. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Overview/Form1.vb" id="Snippet12"::: @@ -5535,7 +5535,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5582,7 +5582,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5626,7 +5626,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5676,7 +5676,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5726,7 +5726,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5776,7 +5776,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5854,7 +5854,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5933,7 +5933,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -5977,7 +5977,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -6031,7 +6031,7 @@ If you set the property, the ## Examples - The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: @@ -6087,9 +6087,9 @@ If you set the property, the returns the whose Items collection contains the current . This is the best way to reference or other properties in the top-level without writing special code to handle overflow. + returns the whose Items collection contains the current . This is the best way to reference or other properties in the top-level without writing special code to handle overflow. - The remains the same even if the item falls into the . The can be `null` for certain elements that are in the collection but not in the collection. + The remains the same even if the item falls into the . The can be `null` for certain elements that are in the collection but not in the collection. @@ -6141,7 +6141,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -6193,7 +6193,7 @@ If you set the property, the of an **Open** would typically be a **File**. + For example, the of an **Open** would typically be a **File**. ]]> @@ -6329,7 +6329,7 @@ If you set the property, the is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. + is a read-only accessor to the property. A parent differs from an owner in that a parent denotes the returned current in which the item is displayed, which might be in the overflow area. The parent raises paint events and so on, while the owner contains shared data such as image lists. Typically, the property is set by the layout manager on the . @@ -6499,7 +6499,7 @@ If you set the property, the ## Remarks This method is called during message preprocessing to handle command keys. Command keys are keys that always take precedence over regular input keys. Examples of command keys include accelerators and menu shortcuts. The method must return `true` to indicate that it has processed the command key, or `false` to indicate that the key is not a command key. - The base-class implementation of method returns `false` in all cases. + The base-class implementation of method returns `false` in all cases. ]]> @@ -6543,7 +6543,7 @@ If you set the property, the event. This method is called only if the method indicates that the item is not processing the key. + This method is called during message preprocessing to handle the ENTER and SPACEBAR keys in order to raise the event. This method is called only if the method indicates that the item is not processing the key. ]]> @@ -6589,7 +6589,7 @@ If you set the property, the ## Remarks This method is called to give an item the opportunity to process a mnemonic character. The method should determine whether the item is in a state to process mnemonics and if whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. - This base-class implementation relies on the host control to call the method to determine whether the given character matches a mnemonic in the item's text. In this case, the method raises the event and returns `true`. + This base-class implementation relies on the host control to call the method to determine whether the given character matches a mnemonic in the item's text. In this case, the method raises the event and returns `true`. ]]> @@ -6632,7 +6632,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -6687,7 +6687,7 @@ If you set the property, the The following remarks describe how and when events related to drag-and-drop operations are raised. - The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. + The method determines the item under the current cursor location. It then checks to see if the item is a valid drop target. If the item is a valid drop target, the event is raised with the drag-and-drop effect specified. For a list of drag-and-drop effects, see the enumeration. @@ -6712,7 +6712,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -7265,7 +7265,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -7306,7 +7306,7 @@ If you set the property, the method. This code example is part of a larger example provided for the class. + The following code example demonstrates how to call the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Overview/Form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Overview/Form1.vb" id="Snippet3"::: @@ -7460,7 +7460,7 @@ If you set the property, the You typically override this method to change the visibility behavior of the control. > [!NOTE] -> When overriding in a derived class, be sure to call the base class's method to force the visibility of the control to change. +> When overriding in a derived class, be sure to call the base class's method to force the visibility of the control to change. ]]> @@ -7582,7 +7582,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -7635,7 +7635,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -7688,7 +7688,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -7741,7 +7741,7 @@ If you set the property, the ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -7851,12 +7851,12 @@ If you set the property, the ## Remarks You can create an access key to the item by adding an ampersand ("&") before a letter in the text value. For more information, see [How to: Create Access Keys for Windows Forms Controls](/dotnet/desktop/winforms/controls/how-to-create-access-keys-for-windows-forms-controls). - uses the property as the default source for the content. Set to `false` to use as the source for content. + uses the property as the default source for the content. Set to `false` to use as the source for content. ## Examples - The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + The following code example demonstrates how to set the , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: @@ -7915,7 +7915,7 @@ If you set the property, the ## Examples - The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. + The following code example demonstrates the , , , and properties for a . This example is part of a larger example available in the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Overview/Form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripButton/Overview/Form1.vb" id="Snippet2"::: @@ -7965,7 +7965,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. @@ -8006,7 +8006,7 @@ If you set the property, the , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. + The following code example demonstrates how to set the , , , and properties, and handle the event. To run this example, paste the following code into a form that contains a named `movingToolStrip` and call `InitializeMovingToolStrip` in the form's constructor or `Load` event handler. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet4"::: @@ -8115,12 +8115,12 @@ If you set the property, the works only if is set to `true`. If is set to `true`, the property for the item is used as the . + works only if is set to `true`. If is set to `true`, the property for the item is used as the . ## Examples - The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. + The following code example demonstrates how to set the , , and for a . In addition, it demonstrates how to set and show a custom ToolTip for the item. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.ToolStrip1/CPP/form1.cpp" id="Snippet20"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripButton/Checked/form1.cs" id="Snippet20"::: @@ -8239,7 +8239,7 @@ If you set the property, the ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `ToolStripItem1` and ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ToolStripItemClickedEventArgs.xml b/xml/System.Windows.Forms/ToolStripItemClickedEventArgs.xml index c2e33fc2ebd..afc33dcf820 100644 --- a/xml/System.Windows.Forms/ToolStripItemClickedEventArgs.xml +++ b/xml/System.Windows.Forms/ToolStripItemClickedEventArgs.xml @@ -30,16 +30,16 @@ Provides data for the event. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet92"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet92"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet92"::: + ]]> @@ -114,16 +114,16 @@ Gets the item that was clicked on the . The that was clicked. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet92"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet92"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet92"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStripItemCollection.xml b/xml/System.Windows.Forms/ToolStripItemCollection.xml index 219d65331dd..e280fcc7938 100644 --- a/xml/System.Windows.Forms/ToolStripItemCollection.xml +++ b/xml/System.Windows.Forms/ToolStripItemCollection.xml @@ -55,9 +55,9 @@ , , and methods enable you to add and remove individual controls from the collection. You can also use the or methods to add or remove all the controls from the collection. + The , , and methods enable you to add and remove individual controls from the collection. You can also use the or methods to add or remove all the controls from the collection. - You can determine whether a is a member of the collection by passing the control into the method. To get the index value of the location of a in the collection, pass the control into the method. The collection can be copied into an array by calling the method. + You can determine whether a is a member of the collection by passing the control into the method. To get the index value of the location of a in the collection, pass the control into the method. The collection can be copied into an array by calling the method. ]]> @@ -364,7 +364,7 @@ to copy a array to a . Use the overload of that takes a parameter to merge one with another. + Use this overload of to copy a array to a . Use the overload of that takes a parameter to merge one with another. ]]> @@ -405,9 +405,9 @@ to merge one with another. You typically use this method with , and you can easily use the , , and methods to modify the merged . + Use this overload of to merge one with another. You typically use this method with , and you can easily use the , , and methods to modify the merged . - Use the overload of that takes a array to copy an array of controls to a . + Use the overload of that takes a array to copy an array of controls to a . ]]> @@ -445,11 +445,11 @@ method to remove the entire collection of controls from a parent control. + Use the method to remove the entire collection of controls from a parent control. - To remove an individual control from the collection, use the or method. + To remove an individual control from the collection, use the or method. - To add new controls to the , use the or method. + To add new controls to the , use the or method. ]]> @@ -676,7 +676,7 @@ ## Remarks The `key` parameter value corresponds to the property. - If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. ]]> @@ -879,9 +879,9 @@ ## Remarks When a is removed from the , all subsequent controls are moved up one position in the collection. - You can also remove a by using the method, or remove all controls by using the method. + You can also remove a by using the method, or remove all controls by using the method. - To add new objects to the collection, use the or methods. + To add new objects to the collection, use the or methods. ]]> @@ -923,9 +923,9 @@ ## Remarks When a is removed from the , all subsequent controls are moved up one position in the collection. - You can also remove a by using the method, or remove all controls by using the method. + You can also remove a by using the method, or remove all controls by using the method. - To add new objects to the collection, use the or methods. + To add new objects to the collection, use the or methods. ]]>
diff --git a/xml/System.Windows.Forms/ToolStripItemEventArgs.xml b/xml/System.Windows.Forms/ToolStripItemEventArgs.xml index 3de2f27cf6a..31ddd507fea 100644 --- a/xml/System.Windows.Forms/ToolStripItemEventArgs.xml +++ b/xml/System.Windows.Forms/ToolStripItemEventArgs.xml @@ -30,16 +30,16 @@ Provides data for events. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet91"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet91"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet91"::: + ]]> @@ -114,16 +114,16 @@ Gets a for which to handle events. A for which to handle events. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `ToolStrip1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet91"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet91"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet91"::: + ]]> diff --git a/xml/System.Windows.Forms/ToolStripItemImageScaling.xml b/xml/System.Windows.Forms/ToolStripItemImageScaling.xml index 4c6d85b9eb8..6c9b788c04a 100644 --- a/xml/System.Windows.Forms/ToolStripItemImageScaling.xml +++ b/xml/System.Windows.Forms/ToolStripItemImageScaling.xml @@ -26,15 +26,15 @@ , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. + The , , , , and properties pertain to various aspects of image handling. Use images in controls by setting these properties directly or by setting the run-time-only property. Image scaling is determined by the interaction of properties in both and , as follows: -- is the scale of the final image as determined by the combination of the image's setting and the container's setting. +- is the scale of the final image as determined by the combination of the image's setting and the container's setting. - - If is `true` (the default) and `ToolStripItemImageScaling` is `SizeToFit`, no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. + - If is `true` (the default) and `ToolStripItemImageScaling` is `SizeToFit`, no image scaling occurs, and the size is that of the largest item, or a prescribed minimum size. - - If is `false` and `ToolStripItemImageScaling` is `None`, neither image nor scaling occurs. + - If is `false` and `ToolStripItemImageScaling` is `None`, neither image nor scaling occurs. To control the image size, use the property. diff --git a/xml/System.Windows.Forms/ToolStripItemRenderEventArgs.xml b/xml/System.Windows.Forms/ToolStripItemRenderEventArgs.xml index c356670e0cc..a40a360312d 100644 --- a/xml/System.Windows.Forms/ToolStripItemRenderEventArgs.xml +++ b/xml/System.Windows.Forms/ToolStripItemRenderEventArgs.xml @@ -51,22 +51,22 @@ In addition, it provides data for the following methods: -- +- -- +- -- +- -- +- -- +- -- +- -- +- ## Examples - The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet14"::: @@ -154,7 +154,7 @@ method to draw a border around a control's . This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet14"::: @@ -203,7 +203,7 @@ method to draw a border around a control's . This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet14"::: @@ -258,7 +258,7 @@ ## Examples - The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet14"::: diff --git a/xml/System.Windows.Forms/ToolStripLabel.xml b/xml/System.Windows.Forms/ToolStripLabel.xml index 64dae3e02eb..33199d3bce2 100644 --- a/xml/System.Windows.Forms/ToolStripLabel.xml +++ b/xml/System.Windows.Forms/ToolStripLabel.xml @@ -37,18 +37,18 @@ class to create a label that can render text and images that can implement the and properties. The also has many properties that enable it to display one or more hyperlinks, and other properties that modify the appearance and behavior of hyperlinks. + Use the class to create a label that can render text and images that can implement the and properties. The also has many properties that enable it to display one or more hyperlinks, and other properties that modify the appearance and behavior of hyperlinks. The is like a that does not get focus by default and that does not render as pushed or highlighted. as a hosted item supports access keys. - Use the , , and properties on a to support link control in a . + Use the , , and properties on a to support link control in a . ## Examples - The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. + The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Tag/form1.vb" id="Snippet1"::: @@ -341,7 +341,7 @@ ## Remarks An active link is a link that is in the process of being clicked. This is similar to the depressed state of a control. You can use this property to specify the color that the link is displayed in when the link is in the process of being clicked. - There are a number of colors associated with a link. The specifies the color of all links displayed in the control. The property enables you to specify the color of a link after it has been visited by the user. + There are a number of colors associated with a link. The specifies the color of all links displayed in the control. The property enables you to specify the color of a link after it has been visited by the user. > [!NOTE] > When setting this property, ensure that the color you are setting the property to does not conflict with the color of the control's background or the text does not display properly. For example, if the background color of the control is `Color.Red` and this property is set to `Color.Red`, the text is not shown properly when the link is in the process of being clicked. @@ -349,7 +349,7 @@ ## Examples - The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. + The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Tag/form1.vb" id="Snippet1"::: @@ -473,7 +473,7 @@ to contain a link by setting the , , , , and properties. + The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Tag/form1.vb" id="Snippet1"::: @@ -527,7 +527,7 @@ ## Examples - The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. + The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Tag/form1.vb" id="Snippet1"::: @@ -566,7 +566,7 @@ to contain a link by setting the , , , , and properties. + The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Tag/form1.vb" id="Snippet1"::: @@ -621,7 +621,7 @@ ## Examples - The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. + The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Tag/form1.vb" id="Snippet1"::: @@ -665,7 +665,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -709,7 +709,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -753,7 +753,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -797,7 +797,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -843,7 +843,7 @@ ## Remarks This method is called to give an item the opportunity to process a mnemonic character. The method should determine whether the item is in a state to process mnemonics and if whether the given character represents a mnemonic. If so, the method should perform the action associated with the mnemonic and return `true`. If not, the method should return `false`. - The implementation relies on the host control to call the method to determine whether the given character matches a mnemonic in the item's text. In this case, the method selects the item associated with the label, or raises the event if the item cannot be selected. + The implementation relies on the host control to call the method to determine whether the given character matches a mnemonic in the item's text. In this case, the method selects the item associated with the label, or raises the event if the item cannot be selected. ]]> @@ -887,7 +887,7 @@ ## Examples - The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. + The following code example demonstrates how to initialize a to contain a link by setting the , , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/Tag/form1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/Tag/form1.vb" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/ToolStripLayoutStyle.xml b/xml/System.Windows.Forms/ToolStripLayoutStyle.xml index abed293d443..89e354049ca 100644 --- a/xml/System.Windows.Forms/ToolStripLayoutStyle.xml +++ b/xml/System.Windows.Forms/ToolStripLayoutStyle.xml @@ -26,7 +26,7 @@ class and its derived classes by assigning a member of the enumeration to the control's `LayoutStyle` property, such as the or property. + You control the layout of the class and its derived classes by assigning a member of the enumeration to the control's `LayoutStyle` property, such as the or property. #### Stack Layouts Stacking arranges items beside each other at both ends of the tool strip. The following list describes the stack layouts. @@ -38,13 +38,13 @@ - HorizontalStackWithOverflow renders the `Orientation` items beside each other horizontally. #### Other Features of Stack Layouts - determines the end of the to which the item is aligned. + determines the end of the to which the item is aligned. When items do not fit within the , an overflow button automatically appears. The property setting determines whether an item appears in the overflow area always, as needed, or never. - In the event, you can inspect the property to determine whether an item was placed on the main , the overflow , or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main and its property was set to . + In the event, you can inspect the property to determine whether an item was placed on the main , the overflow , or if it is not currently showing at all. The typical reasons why an item is not displayed are that the item did not fit on the main and its property was set to . - Make a movable by putting it in a and setting its to . + Make a movable by putting it in a and setting its to . #### Other Layout Options The other layout options are Flow and Table. @@ -54,7 +54,7 @@ - All of the features of are exposed by the property. You must cast the class to a class. -- You can use the and properties in code to align the items within the row. +- You can use the and properties in code to align the items within the row. - The property is ignored. @@ -62,14 +62,14 @@ - The grip is not rendered, and therefore a in Flow layout style in a cannot be moved. -- The overflow button is not rendered, and is ignored. +- The overflow button is not rendered, and is ignored. #### Table Layout Table layout is the default for . It is similar to . The features of Table layout are as follows: - All of the features of are exposed by the property. You must cast the class to a class. -- You can use the and properties in code to align the items within the table cell. +- You can use the and properties in code to align the items within the table cell. - The property is ignored. @@ -77,7 +77,7 @@ - The grip is not rendered, and therefore a in Table layout style in a cannot be moved. -- The overflow button is not rendered, and is ignored. +- The overflow button is not rendered, and is ignored. ]]> diff --git a/xml/System.Windows.Forms/ToolStripManager.xml b/xml/System.Windows.Forms/ToolStripManager.xml index 923e54b793d..ccc7d11a675 100644 --- a/xml/System.Windows.Forms/ToolStripManager.xml +++ b/xml/System.Windows.Forms/ToolStripManager.xml @@ -37,7 +37,7 @@ supports -related tasks for entire applications, such as merging, settings, and renderer options. The overloaded method combines controls with each other, and the overloaded method undoes a merge operation. + supports -related tasks for entire applications, such as merging, settings, and renderer options. The overloaded method combines controls with each other, and the overloaded method undoes a merge operation. Use the class with the class to gain even more control and customizability over painting and layout style. @@ -104,12 +104,12 @@ method to search for a or an object derived from . Derived types of are , , , , and . If the object of the search is not specifically a but one of these derived types, cast the return type as required. + Use the method to search for a or an object derived from . Derived types of are , , , , and . If the object of the search is not specifically a but one of these derived types, cast the return type as required. ## Examples - The following code example demonstrates a use of the method. This example is part of a larger example provided for the property. + The following code example demonstrates a use of the method. This example is part of a larger example provided for the property. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet80"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet80"::: @@ -237,7 +237,7 @@ controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. + controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. ]]> @@ -280,7 +280,7 @@ controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. + controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. ]]> @@ -339,14 +339,14 @@ method to combine objects of identical type, such as objects with other objects, objects with other objects, and so on. + Use the method to combine objects of identical type, such as objects with other objects, objects with other objects, and so on. - Use the method to combine objects of different types. + Use the method to combine objects of different types. The property must be set to `true` for both objects, and the source and target types must be identical, or this method returns `false`. > [!NOTE] -> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. +> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. ]]> @@ -394,14 +394,14 @@ method to combine objects of different types. + Use the method to combine objects of different types. - Use the method to combine objects of identical type, such as objects with other objects, objects with other objects, and so on. + Use the method to combine objects of identical type, such as objects with other objects, objects with other objects, and so on. The property must be set to `true` for both objects, or this method returns `false`. > [!NOTE] -> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. +> If there are two controls on an MDI child form, setting to `true` for the parent form merges the contents of only one of the controls. Use to merge the contents of additional child controls on the MDI parent form. @@ -512,7 +512,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripManager1`. Then ensure that the event handler is associated with the event. @@ -764,7 +764,7 @@ controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. + controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. ]]> @@ -807,7 +807,7 @@ controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. + controls that are not on the form at design time when the settings are saved are removed from the when the settings are loaded. To reset the settings, comment out the line and leave the line. This will not load any settings and will persist the last state. When you remove the comment from the line, those settings will be applied. ]]> diff --git a/xml/System.Windows.Forms/ToolStripManagerRenderMode.xml b/xml/System.Windows.Forms/ToolStripManagerRenderMode.xml index 0c6b2eb3698..9077fe3b5e1 100644 --- a/xml/System.Windows.Forms/ToolStripManagerRenderMode.xml +++ b/xml/System.Windows.Forms/ToolStripManagerRenderMode.xml @@ -28,7 +28,7 @@ ## Remarks The `ToolStripManagerRenderMode` is used by the class and sets the painting style for objects that have their property set to . - You cannot explicitly set the to `Custom`. However, returns `Custom` when the is set to an extension of the class that is not or . + You cannot explicitly set the to `Custom`. However, returns `Custom` when the is set to an extension of the class that is not or . ]]> diff --git a/xml/System.Windows.Forms/ToolStripMenuItem.xml b/xml/System.Windows.Forms/ToolStripMenuItem.xml index fc6cdb025ce..2d02001b935 100644 --- a/xml/System.Windows.Forms/ToolStripMenuItem.xml +++ b/xml/System.Windows.Forms/ToolStripMenuItem.xml @@ -54,7 +54,7 @@ replaces and extends the control, which was removed in .NET Core 3.1. ## Examples - The following code example adds a to the specified menu items of a . This code example is part of a larger example available in the class overview. + The following code example adds a to the specified menu items of a . This code example is part of a larger example available in the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/MergeIndex/form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/MergeIndex/form1.vb" id="Snippet2"::: @@ -130,7 +130,7 @@ constructor to create a that displays an image in the margin alongside the text. + Use the constructor to create a that displays an image in the margin alongside the text. ]]> @@ -167,12 +167,12 @@ constructor to create a with the specified name. + Use the constructor to create a with the specified name. ## Examples - The following code example demonstrates a use of the constructor. + The following code example demonstrates a use of the constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet12"::: @@ -214,7 +214,7 @@ constructor to create a with the specified name and image. + Use the constructor to create a with the specified name and image. ]]> @@ -255,12 +255,12 @@ to create a that displays both text and an image and that does the specified action when the is clicked. + Use the to create a that displays both text and an image and that does the specified action when the is clicked. ## Examples - The following code example demonstrates a use of the constructor. + The following code example demonstrates a use of the constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet12"::: @@ -315,7 +315,7 @@ constructor to create a that displays text and an image and that contains the specified collection. + Use the constructor to create a that displays text and an image and that contains the specified collection. ]]> @@ -358,7 +358,7 @@ constructor. + The following code example demonstrates a use of the constructor. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet40"::: @@ -404,7 +404,7 @@ constructor to create a that displays text and an image, performs the specified action when clicked, and has the specified shortcut key. + Use the constructor to create a that displays text and an image, performs the specified action when clicked, and has the specified shortcut key. ]]> @@ -513,7 +513,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripMenuItem1`. Then ensure that the event handler is associated with the event. @@ -674,7 +674,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripMenuItem1`. Then ensure that the event handler is associated with the event. @@ -725,7 +725,7 @@ method to create an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates overriding the method to create an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Because the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. This code example is part of a complete code example that can be found at the class overview. @@ -770,7 +770,7 @@ method is automatically called if the property finds no associated with the . + The method is automatically called if the property finds no associated with the . ]]> @@ -870,7 +870,7 @@ in derived classes to configure a default size for a . This is more efficient than setting the size in the control's constructor. + Override in derived classes to configure a default size for a . This is more efficient than setting the size in the control's constructor. ]]> @@ -1035,7 +1035,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1079,7 +1079,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1123,7 +1123,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1167,7 +1167,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1211,7 +1211,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1287,7 +1287,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1331,7 +1331,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1375,7 +1375,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1419,7 +1419,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1463,7 +1463,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1507,7 +1507,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1707,7 +1707,7 @@ ## Examples - The following example assigns the specified text to the . This example is part of a larger example available in the class overview. + The following example assigns the specified text to the . This example is part of a larger example available in the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripItem/MergeIndex/form1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ToolStripItem/MergeIndex/form1.vb" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/ToolStripOverflow.xml b/xml/System.Windows.Forms/ToolStripOverflow.xml index 53421f3b1bd..33b48d7a6db 100644 --- a/xml/System.Windows.Forms/ToolStripOverflow.xml +++ b/xml/System.Windows.Forms/ToolStripOverflow.xml @@ -114,7 +114,7 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. @@ -122,9 +122,9 @@ ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code excerpt demonstrates overriding the method. See the class overview for the complete code example. + This code excerpt demonstrates overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet2"::: @@ -312,7 +312,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/ToolStripOverflowButton.xml b/xml/System.Windows.Forms/ToolStripOverflowButton.xml index bf2e7fa3549..9692e4dac75 100644 --- a/xml/System.Windows.Forms/ToolStripOverflowButton.xml +++ b/xml/System.Windows.Forms/ToolStripOverflowButton.xml @@ -74,7 +74,7 @@ method, it will be called when the property is referenced. + If you do not explicitly call the method, it will be called when the property is referenced. > [!NOTE] > To get or set the property, you must add a reference to the `Accessibility` assembly installed with the .NET Framework. @@ -82,9 +82,9 @@ ## Examples - The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. + The following code example demonstrates the creation of an accessibility-aware chart control, using the and classes to expose accessible information. The control plots two curves along with a legend. The `ChartControlAccessibleObject` class, which derives from `ControlAccessibleObject`, is used in the method to provide custom accessible information for the chart control. Since the chart legend is not an actual -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the `ChartControlAccessibleObject` class overrides the method to return the `CurveLegendAccessibleObject` that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information. - This code excerpt demonstrates overriding the method. See the class overview for the complete code example. + This code excerpt demonstrates overriding the method. See the class overview for the complete code example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.AccessibleObject/CPP/chartcontrol.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/AccessibleEvents/Overview/chartcontrol.cs" id="Snippet2"::: @@ -195,11 +195,11 @@ and methods; do not call this method directly. When you implement the dispose pattern, the parameter of the method should be used as follows: + This method is called only by the public and methods; do not call this method directly. When you implement the dispose pattern, the parameter of the method should be used as follows: -- The method of the current object should call with the parameter set to `true` to release both managed and unmanaged resources. +- The method of the current object should call with the parameter set to `true` to release both managed and unmanaged resources. -- The method of the current object should call with the parameter set to `false` to release only unmanaged resources. +- The method of the current object should call with the parameter set to `false` to release only unmanaged resources. For more information, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). @@ -305,7 +305,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/ToolStripPanel.xml b/xml/System.Windows.Forms/ToolStripPanel.xml index 8b216a6d0f7..41bc463e95e 100644 --- a/xml/System.Windows.Forms/ToolStripPanel.xml +++ b/xml/System.Windows.Forms/ToolStripPanel.xml @@ -405,7 +405,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripPanel1`. Then ensure that the event handler is associated with the event. @@ -722,7 +722,7 @@ constructor. This example is part of a larger example available in the class overview. + The following code example demonstrates the use of the constructor. This example is part of a larger example available in the class overview. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ContextMenuStrip/Overview/Program.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/ContextMenuStrip/Overview/Program.vb" id="Snippet11"::: @@ -950,11 +950,11 @@ method is called when a child control is added to the . + The method is called when a child control is added to the . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -996,11 +996,11 @@ is called when a child control is removed from the . + The is called when a child control is removed from the . Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1044,7 +1044,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1088,7 +1088,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1203,7 +1203,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1247,7 +1247,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1405,7 +1405,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripPanel1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ToolStripPanelRow.xml b/xml/System.Windows.Forms/ToolStripPanelRow.xml index 5a36f55a852..590bdee549f 100644 --- a/xml/System.Windows.Forms/ToolStripPanelRow.xml +++ b/xml/System.Windows.Forms/ToolStripPanelRow.xml @@ -442,7 +442,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -488,7 +488,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -534,7 +534,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -578,7 +578,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -619,7 +619,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
diff --git a/xml/System.Windows.Forms/ToolStripProfessionalRenderer.xml b/xml/System.Windows.Forms/ToolStripProfessionalRenderer.xml index 975bcbd8ae1..9cf5ca79e9b 100644 --- a/xml/System.Windows.Forms/ToolStripProfessionalRenderer.xml +++ b/xml/System.Windows.Forms/ToolStripProfessionalRenderer.xml @@ -679,7 +679,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -723,7 +723,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -767,7 +767,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
diff --git a/xml/System.Windows.Forms/ToolStripProgressBar.xml b/xml/System.Windows.Forms/ToolStripProgressBar.xml index 2627e4f56d3..2a33588c9dd 100644 --- a/xml/System.Windows.Forms/ToolStripProgressBar.xml +++ b/xml/System.Windows.Forms/ToolStripProgressBar.xml @@ -46,9 +46,9 @@ The control is typically used when an application performs tasks such as copying files or printing documents. Users of an application might consider an application unresponsive if there is no visual cue. Use the to notify the user that the application is performing a lengthy task and that the application is still responding. - The and properties define the range of values to represent the progress of a task. The property is typically set to a value of zero, and the property is typically set to a value indicating the completion of a task. For example, to display the progress properly when copying a group of files, the property could be set to the total number of files to be copied. The property represents the progress that the application has made toward completing the operation. Because the bar displayed in the control is a collection of blocks, the value displayed by the only approximates the property's current value. Based on the size of the , the property determines when to display the next block. + The and properties define the range of values to represent the progress of a task. The property is typically set to a value of zero, and the property is typically set to a value indicating the completion of a task. For example, to display the progress properly when copying a group of files, the property could be set to the total number of files to be copied. The property represents the progress that the application has made toward completing the operation. Because the bar displayed in the control is a collection of blocks, the value displayed by the only approximates the property's current value. Based on the size of the , the property determines when to display the next block. - There are a number of ways to modify the value displayed by the other than changing the property directly. You can use the property to specify a specific value to increment the property by, and then call the method to increment the value. To vary the increment value, you can use the method and specify a value by which to increment the property. + There are a number of ways to modify the value displayed by the other than changing the property directly. You can use the property to specify a specific value to increment the property by, and then call the method to increment the value. To vary the increment value, you can use the method and specify a value by which to increment the property. replaces the older control, which is nevertheless retained for backward compatibility. @@ -356,7 +356,7 @@ method enables you to increment the value of the progress bar by a specific amount. This method of incrementing the progress bar is similar to using the property with the method. The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in the `value` parameter, the property is less than the value of the property, the property remains at the value of the property. + The method enables you to increment the value of the progress bar by a specific amount. This method of incrementing the progress bar is similar to using the property with the method. The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in the `value` parameter, the property is less than the value of the property, the property remains at the value of the property. ]]> @@ -631,7 +631,7 @@ ## Remarks This property specifies the upper limit of the property. When the value of the property is changed, the control is redrawn to reflect the new range of the control. When the value of the property is equal to the value of the property, the progress bar is completely filled. - You can use this property to specify a value that the property must be set to (by setting the property or using the or methods) to indicate that an operation is complete. For example, you can set the value of the property to the total number of files in a file copy operation. Each time a file is copied, the property can be increased by one until the total number of files is copied. At that point, the progress bar would be completely filled. + You can use this property to specify a value that the property must be set to (by setting the property or using the or methods) to indicate that an operation is complete. For example, you can set the value of the property to the total number of files in a file copy operation. Each time a file is copied, the property can be increased by one until the total number of files is copied. At that point, the progress bar would be completely filled. @@ -685,7 +685,7 @@ property. When the value of the property is changed, the control is redrawn to reflect the new range of the control. When the value of the property is equal to the value of the property, the progress bar is empty. To change the value of the progress bar, use the property with the method, use the method, or set the value of the property directly. + This property specifies the lower limit of the property. When the value of the property is changed, the control is redrawn to reflect the new range of the control. When the value of the property is equal to the value of the property, the progress bar is empty. To change the value of the progress bar, use the property with the method, use the method, or set the value of the property directly. @@ -734,7 +734,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -887,9 +887,9 @@ method increments the value of the progress bar by the amount specified by the property. You can use the property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you might want to set the value of the property to 1 and the value of the property to the total number of files to copy. When each file is copied, you can call the method to increment the progress bar by the value of the property. If you want to have more flexible control of the value of the progress bar, you can use the method or set the value of the property directly. + The method increments the value of the progress bar by the amount specified by the property. You can use the property to specify the amount that each completed task in an operation changes the value of the progress bar. For example, if you are copying a group of files, you might want to set the value of the property to 1 and the value of the property to the total number of files to copy. When each file is copied, you can call the method to increment the progress bar by the value of the property. If you want to have more flexible control of the value of the progress bar, you can use the method or set the value of the property directly. - The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in the `value` parameter, the property is less than the value of the property, the property remains at the value of the property. + The property specifies the current position of the . If, after calling the method, the property is greater than the value of the property, the property remains at the value of the property. If, after calling the method with a negative value specified in the `value` parameter, the property is less than the value of the property, the property remains at the value of the property. ]]> @@ -1028,7 +1028,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripProgressBar1`. Then ensure that the event handler is associated with the event. @@ -1341,7 +1341,7 @@ property must be in the range specified by the and properties. + The property must be in the range specified by the and properties. diff --git a/xml/System.Windows.Forms/ToolStripRenderEventArgs.xml b/xml/System.Windows.Forms/ToolStripRenderEventArgs.xml index 547ec461891..d909491208f 100644 --- a/xml/System.Windows.Forms/ToolStripRenderEventArgs.xml +++ b/xml/System.Windows.Forms/ToolStripRenderEventArgs.xml @@ -33,12 +33,12 @@ class also provides data for the , , and methods. + The class also provides data for the , , and methods. ## Examples - The following code example demonstrates how to override the method to draw a custom border around a control. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a custom border around a control. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet12"::: @@ -162,7 +162,7 @@ method to draw a custom border around a control. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a custom border around a control. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet12"::: @@ -246,7 +246,7 @@ is not a or the is `null`, the property returns an empty . + If the is not a or the is `null`, the property returns an empty . @@ -298,7 +298,7 @@ method to draw a custom border around a control. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a custom border around a control. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet12"::: @@ -347,7 +347,7 @@ method to paint a gradient in the background of a control. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to paint a gradient in the background of a control. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet13"::: diff --git a/xml/System.Windows.Forms/ToolStripRenderMode.xml b/xml/System.Windows.Forms/ToolStripRenderMode.xml index e75c9525698..98c76626d38 100644 --- a/xml/System.Windows.Forms/ToolStripRenderMode.xml +++ b/xml/System.Windows.Forms/ToolStripRenderMode.xml @@ -23,11 +23,11 @@ Specifies the painting style applied to one contained in a form. - to Custom. However, the returns Custom when the is set to an extension of the class that is not or . - + to Custom. However, the returns Custom when the is set to an extension of the class that is not or . + ]]> diff --git a/xml/System.Windows.Forms/ToolStripRenderer.xml b/xml/System.Windows.Forms/ToolStripRenderer.xml index 016406c3b35..a682fc70892 100644 --- a/xml/System.Windows.Forms/ToolStripRenderer.xml +++ b/xml/System.Windows.Forms/ToolStripRenderer.xml @@ -166,7 +166,7 @@ method provides an entry point to the arrow rendering code. Use this method to draw an arrow when overriding the method, or to force an arrow to be drawn in a custom . To change the way an arrow is rendered, override the method in a class derived from . + The method provides an entry point to the arrow rendering code. Use this method to draw an arrow when overriding the method, or to force an arrow to be drawn in a custom . To change the way an arrow is rendered, override the method in a class derived from . ]]> @@ -205,7 +205,7 @@ method provides an entry point to the rendering code for the background of a . Use this method to draw the background of a button when overriding the method, or to force the background of a button to be drawn in a custom . To change the way the background is rendered, override the method in a class derived from . + The method provides an entry point to the rendering code for the background of a . Use this method to draw the background of a button when overriding the method, or to force the background of a button to be drawn in a custom . To change the way the background is rendered, override the method in a class derived from . ]]> @@ -244,7 +244,7 @@ method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a drop-down button when overriding the method, or to force the background of a drop-down button to be drawn in a custom . To change the way the background is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a drop-down button when overriding the method, or to force the background of a drop-down button to be drawn in a custom . To change the way the background is rendered, override the method in a class derived from . ]]> @@ -283,7 +283,7 @@ method provides an entry point to the rendering code for a move handle located on a . Use this method when overriding the method, or to force a move handle to be drawn in a custom . To change the way a move handle is rendered, override the method in a class derived from . + The method provides an entry point to the rendering code for a move handle located on a . Use this method when overriding the method, or to force a move handle to be drawn in a custom . To change the way a move handle is rendered, override the method in a class derived from . ]]> @@ -322,7 +322,7 @@ method provides the entry point to the rendering code for the image. Use this method to draw the image margin when overriding the method, or to force the image margin to be drawn in a custom . To change the way the image margin is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the image. Use this method to draw the image margin when overriding the method, or to force the image margin to be drawn in a custom . To change the way the image margin is rendered, override the method in a class derived from . ]]> @@ -361,7 +361,7 @@ method provides the entry point to the rendering code for the background of an item. Use this method to draw the background of an item when overriding the method, or to force the background of an item to be drawn in a custom . To change the way the background of an item is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the background of an item. Use this method to draw the background of an item when overriding the method, or to force the background of an item to be drawn in a custom . To change the way the background of an item is rendered, override the method in a class derived from . ]]> @@ -400,7 +400,7 @@ method provides the entry point to the rendering code for an image in a selected state. Use this method to draw a selected image when overriding the method, or to force a selected image to be drawn in a custom . To change the way a selected image is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for an image in a selected state. Use this method to draw a selected image when overriding the method, or to force a selected image to be drawn in a custom . To change the way a selected image is rendered, override the method in a class derived from . ]]> @@ -439,7 +439,7 @@ method provides the entry point to the rendering code for an image. Use this method to draw an image when overriding the method or to force the image to be drawn in a custom . To change the way the image is rendered, override the `OnDrawItem` method in a class derived from . + The method provides the entry point to the rendering code for an image. Use this method to draw an image when overriding the method or to force the image to be drawn in a custom . To change the way the image is rendered, override the `OnDrawItem` method in a class derived from . ]]> @@ -478,7 +478,7 @@ method provides the entry point to the rendering code for the text of a . Use this method to draw the item text when overriding the method, or to force the item text to be drawn in a custom . To change the way the item text is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the text of a . Use this method to draw the item text when overriding the method, or to force the item text to be drawn in a custom . To change the way the item text is rendered, override the method in a class derived from . ]]> @@ -517,7 +517,7 @@ method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a when overriding the method, or to force the background of a to be drawn in a custom . To change the way the background of a is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a when overriding the method, or to force the background of a to be drawn in a custom . To change the way the background of a is rendered, override the method in a class derived from . ]]> @@ -556,7 +556,7 @@ method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a when overriding the method, or to force the background of a to be drawn in a custom . To change the way the background for a is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a when overriding the method, or to force the background of a to be drawn in a custom . To change the way the background for a is rendered, override the method in a class derived from . ]]> @@ -595,7 +595,7 @@ method provides the entry point to the rendering code for the background of an overflow button. Use this method to draw the background of an overflow button when overriding the method, or to force the background for an overflow button to be drawn in a custom . To change the way the background for an overflow button is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the background of an overflow button. Use this method to draw the background of an overflow button when overriding the method, or to force the background for an overflow button to be drawn in a custom . To change the way the background for an overflow button is rendered, override the method in a class derived from . ]]> @@ -634,7 +634,7 @@ method provides the entry point to the rendering code for a . Use this method to draw the when overriding the method, or to force a to be drawn in a custom . To change the way the is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for a . Use this method to draw the when overriding the method, or to force a to be drawn in a custom . To change the way the is rendered, override the method in a class derived from . ]]> @@ -673,7 +673,7 @@ method provides the entry point to the rendering code for a . Use this method to draw a when overriding the method, or to force a to be drawn in a custom . To change the way the is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for a . Use this method to draw a when overriding the method, or to force a to be drawn in a custom . To change the way the is rendered, override the method in a class derived from . ]]> @@ -744,7 +744,7 @@ method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a when overriding the method, or to force the background of a to be drawn in a custom . To change the way the background of a is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the background of a . Use this method to draw the background of a when overriding the method, or to force the background of a to be drawn in a custom . To change the way the background of a is rendered, override the method in a class derived from . ]]> @@ -783,7 +783,7 @@ method provides the entry point to the rendering code for the border of a . Use this method to draw the border of a when overriding the method, or to force the border of a to be drawn in a custom . To change the way the border of a is rendered, override the method in a class derived from . + The method provides the entry point to the rendering code for the border of a . Use this method to draw the border of a when overriding the method, or to force the border of a to be drawn in a custom . To change the way the border of a is rendered, override the method in a class derived from . ]]> @@ -918,7 +918,7 @@ method to set properties, such as the or , when a is rendered. + Use the method to set properties, such as the or , when a is rendered. ]]> @@ -989,7 +989,7 @@ method to set properties, such as the or , when a is rendered. + Use the method to set properties, such as the or , when a is rendered. @@ -1125,7 +1125,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1170,10 +1170,10 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a border around a control's . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet14"::: @@ -1221,7 +1221,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1265,7 +1265,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1309,7 +1309,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1353,7 +1353,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1397,7 +1397,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1442,7 +1442,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1487,7 +1487,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1532,7 +1532,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1576,7 +1576,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1620,7 +1620,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1664,7 +1664,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1708,7 +1708,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1752,7 +1752,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1797,12 +1797,12 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method to paint a gradient in the background of a control. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to paint a gradient in the background of a control. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet13"::: @@ -1850,12 +1850,12 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ## Examples - The following code example demonstrates how to override the method to draw a custom border around a control. This code example is part of a larger example provided for the class. + The following code example demonstrates how to override the method to draw a custom border around a control. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/LayoutSettings/Overview/GridStrip.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/LayoutSettings/Overview/GridStrip.vb" id="Snippet12"::: @@ -1903,7 +1903,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1947,7 +1947,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1991,7 +1991,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
diff --git a/xml/System.Windows.Forms/ToolStripSeparator.xml b/xml/System.Windows.Forms/ToolStripSeparator.xml index ae228a63068..7e68f5f5446 100644 --- a/xml/System.Windows.Forms/ToolStripSeparator.xml +++ b/xml/System.Windows.Forms/ToolStripSeparator.xml @@ -39,7 +39,7 @@ ## Remarks Use a to group related items on a menu or . The is automatically spaced and oriented horizontally or vertically to accord with its container. - You can add a at design time by choosing it from a drop-down list. However, you can also automatically create a by typing a hyphen (-) in either the designer template node or in the method. + You can add a at design time by choosing it from a drop-down list. However, you can also automatically create a by typing a hyphen (-) in either the designer template node or in the method. ]]>
diff --git a/xml/System.Windows.Forms/ToolStripSplitButton+ToolStripSplitButtonAccessibleObject.xml b/xml/System.Windows.Forms/ToolStripSplitButton+ToolStripSplitButtonAccessibleObject.xml index 943871ff908..1ded260083c 100644 --- a/xml/System.Windows.Forms/ToolStripSplitButton+ToolStripSplitButtonAccessibleObject.xml +++ b/xml/System.Windows.Forms/ToolStripSplitButton+ToolStripSplitButtonAccessibleObject.xml @@ -97,7 +97,7 @@ property. A client can use automation (if supported) instead of to perform an object's default action. However, provides an easy way to perform an object's most commonly used action. + Clients can retrieve the object's default action by inspecting an object's property. A client can use automation (if supported) instead of to perform an object's default action. However, provides an easy way to perform an object's most commonly used action. ]]> diff --git a/xml/System.Windows.Forms/ToolStripSplitButton.xml b/xml/System.Windows.Forms/ToolStripSplitButton.xml index ed60530fa36..fa95e8aae34 100644 --- a/xml/System.Windows.Forms/ToolStripSplitButton.xml +++ b/xml/System.Windows.Forms/ToolStripSplitButton.xml @@ -413,7 +413,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripSplitButton1`. Then ensure that the event handler is associated with the event. @@ -465,7 +465,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripSplitButton1`. Then ensure that the event handler is associated with the event. @@ -689,7 +689,7 @@ has a , the ENTER key activates the button. Otherwise, the ENTER key activates the drop-down. + If a has a , the ENTER key activates the button. Otherwise, the ENTER key activates the drop-down. Use the property to synchronize the event of the chosen drop-down item with the item shown on the button. @@ -738,7 +738,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripSplitButton1`. Then ensure that the event handler is associated with the event. @@ -997,7 +997,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1041,7 +1041,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1085,7 +1085,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1129,7 +1129,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]>
@@ -1173,7 +1173,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1217,7 +1217,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1294,7 +1294,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1369,7 +1369,7 @@ ## Remarks This method is called during message preprocessing to handle the ENTER and SPACEBAR keys in order to raise the event. However, if the is not enabled, this method calls the base class implementation instead. - This method is called only if the method indicates that the item is not processing the key. + This method is called only if the method indicates that the item is not processing the key. ]]> diff --git a/xml/System.Windows.Forms/ToolStripStatusLabel.xml b/xml/System.Windows.Forms/ToolStripStatusLabel.xml index 55ea93fc97a..0fde761109a 100644 --- a/xml/System.Windows.Forms/ToolStripStatusLabel.xml +++ b/xml/System.Windows.Forms/ToolStripStatusLabel.xml @@ -46,7 +46,7 @@ is a version of designed specifically for use in . The special features include , , and . + is a version of designed specifically for use in . The special features include , , and . A can contain text or an icon that reflects the status of an application. Use the class to find, add, or remove objects. diff --git a/xml/System.Windows.Forms/ToolStripTextBox.xml b/xml/System.Windows.Forms/ToolStripTextBox.xml index 0be841b7b38..b84babe1596 100644 --- a/xml/System.Windows.Forms/ToolStripTextBox.xml +++ b/xml/System.Windows.Forms/ToolStripTextBox.xml @@ -41,7 +41,7 @@ The control allows the user to enter text in an application. This control has additional functionality that is not found in the standard Windows text box control, including multiline editing. - Typically, a control is used to display a single line of text or accept it as input. You can use the to enable multiple lines of text to be displayed or entered. Set the and properties to `true` to allow greater text manipulation in a multiline control. + Typically, a control is used to display a single line of text or accept it as input. You can use the to enable multiple lines of text to be displayed or entered. Set the and properties to `true` to allow greater text manipulation in a multiline control. You can limit the amount of text entered into a control by setting the property to a specific number of characters. Use the property to allow the user to type only uppercase, only lowercase, or a combination of uppercase and lowercase characters into the control. @@ -304,7 +304,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripTextBox1`. Then ensure that the event handler is associated with the event. @@ -406,11 +406,11 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to `CustomSource` in order to use . + The use of the property is optional, but you must set the property to `CustomSource` in order to use . - You must use the and properties together. + You must use the and properties together. @@ -470,11 +470,11 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to `CustomSource` in order to use . + The use of the property is optional, but you must set the property to `CustomSource` in order to use . - You must use the and properties together. + You must use the and properties together. @@ -534,11 +534,11 @@ , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. + Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered. - The use of the property is optional, but you must set the property to `CustomSource` in order to use . + The use of the property is optional, but you must set the property to `CustomSource` in order to use . - You must use the and properties together. + You must use the and properties together. @@ -754,7 +754,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripTextBox1`. Then ensure that the event handler is associated with the event. @@ -806,7 +806,7 @@ method to undo the last operation in a . + If this method returns `true`, you can call the method to undo the last operation in a . ]]> @@ -1276,9 +1276,9 @@ returns 0. If the `lineNum` parameter exceeds the number of lines in the control, returns the first character index for the last line in the control. + If the `lineNum` parameter is negative, returns 0. If the `lineNum` parameter exceeds the number of lines in the control, returns the first character index for the last line in the control. - returns the first character index of a physical line. The physical line is the displayed line, not the assigned line. The number of displayed lines can be greater than the number of assigned lines due to word wrap. For example, if you assign two long lines to a control and set and to `true`, the two long assigned lines result in four physical (or displayed lines). + returns the first character index of a physical line. The physical line is the displayed line, not the assigned line. The number of displayed lines can be greater than the number of assigned lines due to word wrap. For example, if you assign two long lines to a control and set and to `true`, the two long assigned lines result in four physical (or displayed lines). ]]> @@ -1352,7 +1352,7 @@ method returns the physical line number where the indexed character is located within the control. For example, if a portion of the first logical line of text in the control wraps to the next line, the method returns 1 if the character at the specified character index has wrapped to the second physical line. If is set to `false`, no portion of the line wraps to the next, and the method returns 0 for the specified character index. You can use this method to determine which line a specific character index is located within. For example, after calling the method to search for text, you can obtain the character index to where the search results are found. You can call this method with the character index returned by the method to determine which line the word was found. + This method enables you to determine the line number based on the character index specified in the `index` parameter of the method. The first line of text in the control returns the value zero. The method returns the physical line number where the indexed character is located within the control. For example, if a portion of the first logical line of text in the control wraps to the next line, the method returns 1 if the character at the specified character index has wrapped to the second physical line. If is set to `false`, no portion of the line wraps to the next, and the method returns 0 for the specified character index. You can use this method to determine which line a specific character index is located within. For example, after calling the method to search for text, you can obtain the character index to where the search results are found. You can call this method with the character index returned by the method to determine which line the word was found. > [!NOTE] > If the character index specified in the `index` parameter is beyond the available number of lines contained within the control, the last line number is returned. @@ -1535,7 +1535,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripTextBox1`. Then ensure that the event handler is associated with the event. @@ -1742,7 +1742,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripTextBox1`. Then ensure that the event handler is associated with the event. @@ -1897,7 +1897,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1941,7 +1941,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1985,7 +1985,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2029,7 +2029,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2073,7 +2073,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2117,7 +2117,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2224,7 +2224,7 @@ method will only paste text into the control if text is currently stored in the Clipboard. + The method will only paste text into the control if text is currently stored in the Clipboard. ]]> @@ -2319,7 +2319,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripTextBox1`. Then ensure that the event handler is associated with the event. @@ -2360,7 +2360,7 @@ method will scroll the contents of the control until the caret is visible at the bottom of the control. If the caret is positioned above the visible region of the control, this method scrolls the contents of the control until the caret is visible at the top of the control. You can use this method in a multiline text box to ensure that the current text entry point is within the visible region of the control. + This method enables you to scroll the contents of the control until the caret is within the visible region of the control. If the caret is positioned below the visible region of the control, the method will scroll the contents of the control until the caret is visible at the bottom of the control. If the caret is positioned above the visible region of the control, this method scrolls the contents of the control until the caret is visible at the top of the control. You can use this method in a multiline text box to ensure that the current text entry point is within the visible region of the control. > [!NOTE] > This method has no effect if the control does not have focus or if the caret is already positioned in the visible region of the control. @@ -2443,7 +2443,7 @@ method, which requires text to be selected in the control, to cut the entire contents of the control and paste them into the Clipboard. + This method enables you to select all text within the control. You can use this method with the method, which requires text to be selected in the control, to cut the entire contents of the control and paste them into the Clipboard. ]]> @@ -2540,7 +2540,7 @@ You can use this property to determine if any characters are currently selected in the text box control before performing operations on the selected text. When the value of the property is set to a value that is larger than the number of characters within the text of the control, the value of the property is set to the entire length of text within the control minus the value of the property (if any value is specified for the property). > [!NOTE] -> You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). The text box must have focus in order for the caret to be moved. +> You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). The text box must have focus in order for the caret to be moved. ]]> @@ -2591,7 +2591,7 @@ If no text is selected in the control, this property indicates the insertion point for new text. If you set this property to a location beyond the length of the text in the control, the selection start position will be placed after the last character. When text is selected in the text box control, changing this property might decrease the value of the property. If the remaining text in the control after the position indicated by the property is less than the value of the property, the value of the property is automatically decreased. The value of the property never causes an increase in the property. > [!NOTE] -> You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). The text box must have focus in order for the caret to be moved. +> You can programmatically move the caret within the text box by setting the to the position within the text box where you want the caret to move to and set the property to a value of zero (0). The text box must have focus in order for the caret to be moved. ]]> @@ -2794,7 +2794,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolStripTextBox1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/ToolTip.xml b/xml/System.Windows.Forms/ToolTip.xml index 0d1597ec154..06043107928 100644 --- a/xml/System.Windows.Forms/ToolTip.xml +++ b/xml/System.Windows.Forms/ToolTip.xml @@ -56,7 +56,7 @@ ## Remarks With the class, you can provide hints to a user when the user places the pointer on a control. The class is typically used to alert users to the intended use of a control. For example, you can specify ToolTip text for a control that accepts a name, specifying the format of the name to be typed into the control. In addition to providing hints, you can also use the class to provide run time status information. For example, you can use the class to display connection speed and line quality data when the user moves the pointer onto a control that displays Internet connection status. - The class can be used in any container. To explicitly specify a container, use the constructor. A single component typically is used to create ToolTips for multiple controls on a single form. After you create a , use a separate call to the method to associate ToolTip display text to an individual control. Then when the user moves the pointer on a control, the ToolTip with its text is displayed. You can call more than once for the same control to change the text that is associated with the control. To get the text that is associated with a control, use the method. To remove all ToolTip text associations with an instance of the class, use the method. + The class can be used in any container. To explicitly specify a container, use the constructor. A single component typically is used to create ToolTips for multiple controls on a single form. After you create a , use a separate call to the method to associate ToolTip display text to an individual control. Then when the user moves the pointer on a control, the ToolTip with its text is displayed. You can call more than once for the same control to change the text that is associated with the control. To get the text that is associated with a control, use the method. To remove all ToolTip text associations with an instance of the class, use the method. > [!NOTE] > ToolTip text is not displayed for controls that are disabled. Unless the property is set to `true`, ToolTips are not displayed when their container is inactive. @@ -65,19 +65,19 @@ |Category|Associated members| |--------------|------------------------| -|Manual display|, , , , , | -|ToolTip timing|, , , , | -|Content|, , , , , | -|Appearance|, , , , , | +|Manual display|, , , , , | +|ToolTip timing|, , , , | +|Content|, , , , , | +|Appearance|, , , , , | If you want to disable all ToolTip text so that it cannot be displayed in your application, you can use the property. Usually the ToolTip is drawn by the operating system, but to customize the appearance of the , you can set the property to `true` and handle the event. - The class implements the interface, which has a single method, . ToolTips extend controls on the same form at design time, adding a `ToolTip` property. For more information about extender providers, see [Extender Providers](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ms171835(v=vs.120)). + The class implements the interface, which has a single method, . ToolTips extend controls on the same form at design time, adding a `ToolTip` property. For more information about extender providers, see [Extender Providers](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ms171835(v=vs.120)). ## Examples - The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to always be display regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1`, and that the method is called from the constructor of the . + The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to always be display regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1`, and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolTip Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolTip/Overview/form1.cs" id="Snippet1"::: @@ -132,7 +132,7 @@ ## Examples - The following code example creates an instance of the class. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . + The following code example creates an instance of the class. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolTip Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolTip/Overview/form1.cs" id="Snippet1"::: @@ -175,7 +175,7 @@ constructor enables you to associate a with any object. By associating the in this manner, you hand over control of the lifetime of the ToolTip to the . This can be useful if you use several components in your application, and want to dispose of all of them at the same time. For example, if you associate a , an , and a with a , calling on the will also force disposal of all of these components. + The constructor enables you to associate a with any object. By associating the in this manner, you hand over control of the lifetime of the ToolTip to the . This can be useful if you use several components in your application, and want to dispose of all of them at the same time. For example, if you associate a , an , and a with a , calling on the will also force disposal of all of these components. ]]> @@ -275,15 +275,15 @@ property enables you to set a single delay value, which is then used to set the values of the , , and properties. Each time the property is set, the following values are set by default. + The property enables you to set a single delay value, which is then used to set the values of the , , and properties. Each time the property is set, the following values are set by default. |Property|Default Value| |--------------|-------------------| -||10 times the property value.| -||Equal to the property value.| -||1/5 of the property value.| +||10 times the property value.| +||Equal to the property value.| +||1/5 of the property value.| - These properties can also be set independently once the property has been set. For more information, see the , , and properties. This property is typically used to provide a consistent delay pattern for your ToolTip windows. + These properties can also be set independently once the property has been set. For more information, see the , , and properties. This property is typically used to provide a consistent delay pattern for your ToolTip windows. ]]> @@ -333,19 +333,19 @@ ## Remarks The property enables you to shorten or lengthen the time that the window is displayed when the pointer is on a control. For example, if you display extensive Help in a ToolTip window, you can increase the value of this property to ensure that the user has sufficient time to read the text. - If you want to have a consistent delay pattern for your ToolTip windows, you can set the property. The property sets the , , and properties to initial values based on a single value. Every time the property is set, the property is set to 10 times the property value. Once the property is set, you can independently set the property, overriding the default value. + If you want to have a consistent delay pattern for your ToolTip windows, you can set the property. The property sets the , , and properties to initial values based on a single value. Every time the property is set, the property is set to 10 times the property value. Once the property is set, you can independently set the property, overriding the default value. The behavior of this property varies by Windows version: - On Windows 10, the maximum time you can delay a popup is 5000 milliseconds. Values greater than 5000 ms are clamped to 5000 ms. - On Windows 11, the default value causes tooltips to remain visible indefinitely. When set to a custom value, there's no 5000 ms limit, and the tooltip displays for the specified duration. -For longer durations or precise control over when the ToolTip is displayed, use the method. +For longer durations or precise control over when the ToolTip is displayed, use the method. ## Examples - The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . + The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolTip Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolTip/Overview/form1.cs" id="Snippet1"::: @@ -451,7 +451,7 @@ For longer durations or precise control over when the ToolTip is displayed, use method is the only member of the interface. This method returns `true` if the `target` parameter is of type . + The method is the only member of the interface. This method returns `true` if the `target` parameter is of type . ]]> @@ -626,7 +626,7 @@ For longer durations or precise control over when the ToolTip is displayed, use . Application code should not call this method; an object's method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). + This method overrides . Application code should not call this method; an object's method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the method. For more information, see [Finalize Methods and Destructors](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0s71x931(v%3dvs.100)), [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged), and [Overriding the Finalize Method](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)). ]]> @@ -675,7 +675,7 @@ For longer durations or precise control over when the ToolTip is displayed, use and properties to modify the color scheme used by ToolTips. The system default font is automatically used and can only be overridden by owner-drawing the ToolTip. For more information, see the property. + Use the and properties to modify the color scheme used by ToolTips. The system default font is automatically used and can only be overridden by owner-drawing the ToolTip. For more information, see the property. ]]> @@ -743,7 +743,7 @@ For longer durations or precise control over when the ToolTip is displayed, use method, you can retrieve the ToolTip text for any control. If the ToolTip text changes dynamically in an application, you can use this method to find out what text is displayed at any point, depending on the state of the application. To change the text that a control is displaying, use the method. + With the method, you can retrieve the ToolTip text for any control. If the ToolTip text changes dynamically in an application, you can use this method to find out what text is displayed at any point, depending on the state of the application. To change the text that a control is displaying, use the method. ]]> @@ -787,9 +787,9 @@ For longer durations or precise control over when the ToolTip is displayed, use method hides the ToolTip for the specified if it is currently being displayed. It does not disable or otherwise prevent the same ToolTip from being displayed in the future. To instead disable all ToolTip windows associated with the current component, set the property to `false`. + The method hides the ToolTip for the specified if it is currently being displayed. It does not disable or otherwise prevent the same ToolTip from being displayed in the future. To instead disable all ToolTip windows associated with the current component, set the property to `false`. - Applications running in partial trust must assert the permission to use this method, as can hide the tip independent of user action. + Applications running in partial trust must assert the permission to use this method, as can hide the tip independent of user action. ]]> @@ -849,12 +849,12 @@ For longer durations or precise control over when the ToolTip is displayed, use The value for this property cannot exceed 32767. - If you want to have a consistent delay pattern for your ToolTip windows, you can set the property. The property sets the , , and properties to initial values based on a single time value. Every time the property is set, the property is set to the same value as the property. Once the property is set, you can independently set the property, overriding the default value. + If you want to have a consistent delay pattern for your ToolTip windows, you can set the property. The property sets the , , and properties to initial values based on a single time value. Every time the property is set, the property is set to the same value as the property. Once the property is set, you can independently set the property, overriding the default value. ## Examples - The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . + The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolTip Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolTip/Overview/form1.cs" id="Snippet1"::: @@ -1028,14 +1028,14 @@ For longer durations or precise control over when the ToolTip is displayed, use event is raised whenever a ToolTip is displayed, either through an explicit call to one of the methods or when the class implicitly displays a ToolTip. This event can be canceled. + The event is raised whenever a ToolTip is displayed, either through an explicit call to one of the methods or when the class implicitly displays a ToolTip. This event can be canceled. - Calling properties in this event that cause the underlying window handle to be recreated, such as , will result in an exception being thrown. + Calling properties in this event that cause the underlying window handle to be recreated, such as , will result in an exception being thrown. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `ToolTip1`. Then ensure that the event handler is associated with the event. @@ -1083,7 +1083,7 @@ For longer durations or precise control over when the ToolTip is displayed, use component for all associated controls. To disable the display of text instead, use the property. To change the text for a single associated control, use the method. + You can use this method to remove all ToolTip text that is associated with the component for all associated controls. To disable the display of text instead, use the property. To change the text for a single associated control, use the method. ]]> @@ -1135,12 +1135,12 @@ For longer durations or precise control over when the ToolTip is displayed, use ## Remarks With the property, you can shorten or lengthen the time that the waits before displaying a ToolTip window after a previous ToolTip window is displayed. The first time a ToolTip window is displayed, the value of the property is used to determine the delay to apply before initially showing the ToolTip window. When a ToolTip window is currently being displayed and the user moves the pointer to another control that displays a ToolTip window, the value of the property is used before showing the ToolTip for the new control. The ToolTip window from the previous control must still be displayed in order for the delay specified in the property to be used; otherwise the property value is used. - If you want to have a consistent delay pattern for ToolTip windows, you can set the property. The property sets the , , and properties to initial values based on a single time value. Every time the property is set, the property is set to 1/5 of the property value. Once the property is set, you can independently set the property, overriding the default value. + If you want to have a consistent delay pattern for ToolTip windows, you can set the property. The property sets the , , and properties to initial values based on a single time value. Every time the property is set, the property is set to 1/5 of the property value. Once the property is set, you can independently set the property, overriding the default value. ## Examples - The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . + The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1,` and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolTip Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolTip/Overview/form1.cs" id="Snippet1"::: @@ -1199,14 +1199,14 @@ For longer durations or precise control over when the ToolTip is displayed, use method more than once for a given control does not specify multiple ToolTip text to display for a control, but instead changes the current ToolTip text for the control. To determine the ToolTip text that is associated with a control at run time, use the method. + In addition to specifying the ToolTip text to display for a control, you can also use this method to modify the ToolTip text for a control. Calling the method more than once for a given control does not specify multiple ToolTip text to display for a control, but instead changes the current ToolTip text for the control. To determine the ToolTip text that is associated with a control at run time, use the method. As a general rule the text used should be short; however, you can insert line breaks by using the `\r\n` escape character sequence. Ampersands (&) in the text are handled as described by the property. ## Examples - The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . This example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1`, and that the method is called from the constructor of the . + The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . This example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1`, and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolTip Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolTip/Overview/form1.cs" id="Snippet1"::: @@ -1273,9 +1273,9 @@ For longer durations or precise control over when the ToolTip is displayed, use method displays the ToolTip for the specified control modally; that is, the ToolTip will be displayed until the method is called, or until the parent form is minimized, hidden, or closed. The ToolTip is positioned in the center of the associated control. + The version of the method displays the ToolTip for the specified control modally; that is, the ToolTip will be displayed until the method is called, or until the parent form is minimized, hidden, or closed. The ToolTip is positioned in the center of the associated control. - Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. + Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. ]]> @@ -1336,9 +1336,9 @@ For longer durations or precise control over when the ToolTip is displayed, use method displays the ToolTip for the specified control modally; that is, the ToolTip will be displayed until the method is called, or until the parent form is minimized, hidden, or dismissed. + The `pt` parameter can specify a position outside the bounds of the associated control, its parent form, or even the desktop. The version of the method displays the ToolTip for the specified control modally; that is, the ToolTip will be displayed until the method is called, or until the parent form is minimized, hidden, or dismissed. - Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. + Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. ]]> @@ -1399,9 +1399,9 @@ For longer durations or precise control over when the ToolTip is displayed, use overloaded version of this method instead. + The ToolTip is positioned in the center of the associated control represented by the `win` parameter. To display the ToolTip modally, call the overloaded version of this method instead. - Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. + Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. ]]> @@ -1466,9 +1466,9 @@ For longer durations or precise control over when the ToolTip is displayed, use overloaded version of this method instead. + The `pt` parameter can specify a position outside the bounds of the associated control, its parent form, or even the desktop. The ToolTip is positioned in the center of the associated control. To display the ToolTip modally, call the overloaded version of this method instead. - Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. + Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. ]]> @@ -1533,9 +1533,9 @@ For longer durations or precise control over when the ToolTip is displayed, use method operates identically to the version, except that the offset is specified as separate x- and y-coordinates instead of a . + This version of the overloaded method operates identically to the version, except that the offset is specified as separate x- and y-coordinates instead of a . - Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. + Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. ]]> @@ -1599,9 +1599,9 @@ For longer durations or precise control over when the ToolTip is displayed, use method operates identically to the version, except that the offset is specified as separate x and y coordinates instead of a . To display the ToolTip modally, call the overloaded version of this method instead. + This version of the overloaded method operates identically to the version, except that the offset is specified as separate x and y coordinates instead of a . To display the ToolTip modally, call the overloaded version of this method instead. - Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. + Applications running in partial trust must assert the permission to use this method, as can control the display and location of a ToolTip independent of user action. ]]> @@ -1670,7 +1670,7 @@ For longer durations or precise control over when the ToolTip is displayed, use ## Examples - The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1`, and that the method is called from the constructor of the . + The following code example creates an instance of the class and associates the instance with the that the instance is created within. The code then initializes the delay properties , , and . In addition the instance of the class sets the property to `true` to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a and a . The code example requires that the method defined in the example is located within a that contains a control named `button1` and a control named `checkBox1`, and that the method is called from the constructor of the . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/ToolTip Example/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolTip/Overview/form1.cs" id="Snippet1"::: @@ -1713,7 +1713,7 @@ For longer durations or precise control over when the ToolTip is displayed, use class has an internal timer that it uses to set the display duration for ToolTips. Set the duration of the timer through the property. The method stops this internal timer, causing any displayed ToolTip to be shown modally until the method is called or the parent form is minimized, hidden, or closed. + The class has an internal timer that it uses to set the display duration for ToolTips. Set the duration of the timer through the property. The method stops this internal timer, causing any displayed ToolTip to be shown modally until the method is called or the parent form is minimized, hidden, or closed. ]]> @@ -1994,7 +1994,7 @@ For longer durations or precise control over when the ToolTip is displayed, use method displays the class name, followed by the values of the and properties. + This overridden version of the method displays the class name, followed by the values of the and properties. ]]> diff --git a/xml/System.Windows.Forms/TrackBar.xml b/xml/System.Windows.Forms/TrackBar.xml index 24f8a1d3bc4..9dd40c047a9 100644 --- a/xml/System.Windows.Forms/TrackBar.xml +++ b/xml/System.Windows.Forms/TrackBar.xml @@ -79,7 +79,7 @@ ## Examples - The following code example displays a form containing a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. + The following code example displays a form containing a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBar/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Overview/source.cs" id="Snippet1"::: @@ -230,7 +230,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TrackBar1`. Then ensure that the event handler is associated with the event. @@ -462,7 +462,7 @@ method ends the initialization. Using and methods prevents the control from being used before it is fully initialized. + The Visual Studio design environment uses this method to start the initialization of a component that is used on a form or used by another component. The method ends the initialization. Using and methods prevents the control from being used before it is fully initialized. ]]> @@ -786,7 +786,7 @@ method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. + The Visual Studio design environment uses this method to end the initialization of a component that is used on a form or used by another component. The method starts the initialization. Using the and methods prevents the control from being used before it is fully initialized. ]]> @@ -1121,12 +1121,12 @@ property changes according to the value set in the property. You might consider setting the value to a percentage of the (for a vertically oriented track bar) or (for a horizontally oriented track bar) value. This keeps the distance your track bar moves proportionate to its size. + When the user presses the PAGE UP or PAGE DOWN key or clicks the track bar on either side of the scroll box, the property changes according to the value set in the property. You might consider setting the value to a percentage of the (for a vertically oriented track bar) or (for a horizontally oriented track bar) value. This keeps the distance your track bar moves proportionate to its size. ## Examples - The following code example displays a form containing a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. + The following code example displays a form containing a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBar/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Overview/source.cs" id="Snippet1"::: @@ -1182,12 +1182,12 @@ method to set both the and properties at the same time. + You can use the method to set both the and properties at the same time. ## Examples - The following code example displays a form containing a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. + The following code example displays a form containing a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBar/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Overview/source.cs" id="Snippet1"::: @@ -1242,12 +1242,12 @@ method to set both the and properties at the same time. + You can use the method to set both the and properties at the same time. ## Examples - The following code example demonstrates how to use the , , and members and how to handle the event. To run the example, paste the following code into a form that contains a control named `TrackBar1` and a control named `TextBox1`. Call the `InitializeTrackBar` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and members and how to handle the event. To run the example, paste the following code into a form that contains a control named `TrackBar1` and a control named `TextBox1`. Call the `InitializeTrackBar` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBarExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Minimum/form1.cs" id="Snippet1"::: @@ -1483,7 +1483,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1526,11 +1526,11 @@ event to update other controls as the position of the scroll box changes. + You can use the event to update other controls as the position of the scroll box changes. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1576,7 +1576,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1663,7 +1663,7 @@ property is set to , the scroll box moves from left to right as the increases. When the property is set to , the scroll box moves from bottom to top as the increases. + When the property is set to , the scroll box moves from left to right as the increases. When the property is set to , the scroll box moves from bottom to top as the increases. @@ -1904,7 +1904,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TrackBar1`. Then ensure that the event handler is associated with the event. @@ -1957,7 +1957,7 @@ :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/ISupportInitialize/Overview/form1.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/ISupportInitialize/Overview/form1.vb" id="Snippet3"::: - The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. + The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBar/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Overview/source.cs" id="Snippet1"::: @@ -2045,7 +2045,7 @@ at the same time. To set the minimum or maximum values individually, use the and properties. If the `minValue` parameter is greater than the `maxValue` parameter, `maxValue` is set equal to `minValue`. + You can use this method to set the entire range for the at the same time. To set the minimum or maximum values individually, use the and properties. If the `minValue` parameter is greater than the `maxValue` parameter, `maxValue` is set equal to `minValue`. ]]> @@ -2096,12 +2096,12 @@ ## Remarks When the user presses one of the arrow keys, the property changes according to the value set in the property. - You might consider setting the value of to a percentage of the value of the (for a vertically oriented track bar) or (for a horizontally oriented track bar) property. This sets the distance your track bar moves proportionate to its size. + You might consider setting the value of to a percentage of the value of the (for a vertically oriented track bar) or (for a horizontally oriented track bar) property. This sets the distance your track bar moves proportionate to its size. ## Examples - The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. + The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBar/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Overview/source.cs" id="Snippet1"::: @@ -2248,12 +2248,12 @@ with a large range of values between the and the properties, it might be impractical to draw all the ticks for values on the control. For example, if you have a control with a range of 100, passing in a value of 5 here causes the control to draw 20 ticks. In this case, each tick represents five units in the range of values. + For a with a large range of values between the and the properties, it might be impractical to draw all the ticks for values on the control. For example, if you have a control with a range of 100, passing in a value of 5 here causes the control to draw 20 ticks. In this case, each tick represents five units in the range of values. ## Examples - The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. + The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBar/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Overview/source.cs" id="Snippet1"::: @@ -2309,7 +2309,7 @@ ## Examples - The following code example demonstrates how to use the , , and properties and how to handle the event. To run the example, paste the following code into a form that contains a control named `TrackBar1` and a control named `TextBox1`. Call the `InitializeTrackBar` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and properties and how to handle the event. To run the example, paste the following code into a form that contains a control named `TrackBar1` and a control named `TextBox1`. Call the `InitializeTrackBar` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBarExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Minimum/form1.cs" id="Snippet1"::: @@ -2353,7 +2353,7 @@ method returns a string that includes the type and the values for the , , and properties. + The method returns a string that includes the type and the values for the , , and properties. ]]> @@ -2405,7 +2405,7 @@ ## Examples - The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. + The following code example displays a form that contains a control and a control. The example demonstrates setting the , , , and properties and handling the event. The contents are updated to the property value when the event occurs. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBar/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Overview/source.cs" id="Snippet1"::: @@ -2458,7 +2458,7 @@ ## Examples - The following code example demonstrates how to use the , , and members and how to handle the event. To run the example, paste the following code into a form that contains a control name `TrackBar1` and a control named `TextBox1`. Call the `InitializeTrackBar` method from the form's constructor or event-handling method. + The following code example demonstrates how to use the , , and members and how to handle the event. To run the example, paste the following code into a form that contains a control name `TrackBar1` and a control named `TextBox1`. Call the `InitializeTrackBar` method from the form's constructor or event-handling method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBarExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBar/Minimum/form1.cs" id="Snippet1"::: diff --git a/xml/System.Windows.Forms/TrackBarRenderer.xml b/xml/System.Windows.Forms/TrackBarRenderer.xml index 89db04de850..164c9974d24 100644 --- a/xml/System.Windows.Forms/TrackBarRenderer.xml +++ b/xml/System.Windows.Forms/TrackBarRenderer.xml @@ -203,7 +203,7 @@ ## Remarks Before calling this method, you should verify that the value of the property is `true`. - If width or height of the bounding rectangle or the number of ticks is less than or equal to zero, or `g` is `null`, returns without rendering. + If width or height of the bounding rectangle or the number of ticks is less than or equal to zero, or `g` is `null`, returns without rendering. ]]> @@ -258,7 +258,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw a track bar. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw a track bar. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBarRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBarRenderer/Overview/form1.cs" id="Snippet4"::: @@ -423,7 +423,7 @@ ## Examples - The following code example uses the method in a custom control's method to draw an upward-pointing track bar slider. This code example is part of a larger example provided for the class. + The following code example uses the method in a custom control's method to draw an upward-pointing track bar slider. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBarRenderer/cpp/form1.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBarRenderer/Overview/form1.cs" id="Snippet4"::: @@ -533,7 +533,7 @@ returns without rendering. + If width or height of the bounding rectangle or the number of ticks is less than or equal to zero, or `g` is `null`, returns without rendering. Before calling this method, you should verify that the value of the property is `true`. @@ -802,7 +802,7 @@ ## Examples - The following code example uses the method to determine the size of the rectangle used by the method to draw the slider. This code example is part of a larger example provided for the class. + The following code example uses the method to determine the size of the rectangle used by the method to draw the slider. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TrackBarRenderer/cpp/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TrackBarRenderer/Overview/form1.cs" id="Snippet2"::: diff --git a/xml/System.Windows.Forms/TreeNode.xml b/xml/System.Windows.Forms/TreeNode.xml index ea31b3bc984..8e1a53af1ca 100644 --- a/xml/System.Windows.Forms/TreeNode.xml +++ b/xml/System.Windows.Forms/TreeNode.xml @@ -57,22 +57,22 @@ collection holds all the child objects assigned to the current . You can add, remove, or clone a ; when you do this, all child tree nodes are added, removed, or cloned. Each can contain a collection of other objects. This can make it difficult to determine where you are in the when iterating through the collection. To determine your location in a tree structure, use the property. The string can be parsed using the string value to determine where a label begins and ends. + The collection holds all the child objects assigned to the current . You can add, remove, or clone a ; when you do this, all child tree nodes are added, removed, or cloned. Each can contain a collection of other objects. This can make it difficult to determine where you are in the when iterating through the collection. To determine your location in a tree structure, use the property. The string can be parsed using the string value to determine where a label begins and ends. - The label is set by setting the property explicitly. The alternative is to create the tree node using one of the constructors that has a string parameter that represents the property. The label is displayed next to the image, if one is displayed. + The label is set by setting the property explicitly. The alternative is to create the tree node using one of the constructors that has a string parameter that represents the property. The label is displayed next to the image, if one is displayed. To display images next to the tree nodes, assign an to the property of the parent control and assign an by referencing its index value in the property. Set the property to the index value of the you want to display when the is in an unselected state. Likewise, set the property to the index value of the you want to display when the is selected. - Selecting specific tree nodes and iterating through the collection can be achieved by using the following property values: , , , , , . Assign the returned by one of aforementioned properties to the property to select that tree node in the control. + Selecting specific tree nodes and iterating through the collection can be achieved by using the following property values: , , , , , . Assign the returned by one of aforementioned properties to the property to select that tree node in the control. - Tree nodes can be expanded to display the next level of child tree nodes. The user can expand the by pressing the plus (+) button next to the , if one is displayed, or you can expand the by calling the method. To expand all child tree node levels in the collection, call the method. You can collapse the child level by calling the method, or the user can press the minus (-) button next to the , if one is displayed. You can also call the method to alternate the between the expanded and collapsed states. + Tree nodes can be expanded to display the next level of child tree nodes. The user can expand the by pressing the plus (+) button next to the , if one is displayed, or you can expand the by calling the method. To expand all child tree node levels in the collection, call the method. You can collapse the child level by calling the method, or the user can press the minus (-) button next to the , if one is displayed. You can also call the method to alternate the between the expanded and collapsed states. Tree nodes can optionally display a check box. To display the check boxes, set the property of the to `true`. The property is set to `true` for tree nodes that are in a checked state. ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -121,7 +121,7 @@ is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. + The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet1"::: @@ -176,7 +176,7 @@ ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -265,7 +265,7 @@ ## Examples - The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. + The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet1"::: @@ -428,7 +428,7 @@ ## Examples - The following code example highlights any objects a control that has its property set to `true` by setting its property to . This code requires that you have a control on a with a collection of objects. + The following code example highlights any objects a control that has its property set to `true` by setting its property to . This code requires that you have a control on a with a collection of objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Checked/CPP/treenode_checked.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/BackColor/treenode_checked.cs" id="Snippet1"::: @@ -473,7 +473,7 @@ A typical scenario to use this method is to call it on the event of a or . > [!NOTE] -> This method only works if the property of the is set to `true`. If is set to `false`, an exception is thrown and the tree node will not be put into an editable state. +> This method only works if the property of the is set to `true`. If is set to `false`, an exception is thrown and the tree node will not be put into an editable state. @@ -534,7 +534,7 @@ ## Examples - The following code example changes the size to the specified size and adjusts the of the tree node's parent control. This example requires that you have a that contains a control with a collection of objects, and a that contains font sizes. + The following code example changes the size to the specified size and adjusts the of the tree node's parent control. This example requires that you have a that contains a control with a collection of objects, and a that contains font sizes. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet2"::: @@ -586,7 +586,7 @@ objects a control that has its property set to `true` by setting its property to . This code requires that you have a control on a with a collection of objects. + The following code example highlights any objects a control that has its property set to `true` by setting its property to . This code requires that you have a control on a with a collection of objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Checked/CPP/treenode_checked.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/BackColor/treenode_checked.cs" id="Snippet1"::: @@ -634,7 +634,7 @@ ## Remarks The tree structure from the tree node being cloned and below is copied. Any child tree nodes assigned to the being cloned are included in the new tree node and subtree. - The method performs a shallow copy of the node. If the value of the property is a reference type, both the original and cloned copy will point to the same single instance of the value. + The method performs a shallow copy of the node. If the value of the property is a reference type, both the original and cloned copy will point to the same single instance of the value. @@ -696,15 +696,15 @@ method collapses the current and its child nodes. If you want to collapse only the current , use the overload, passing `true` to ignore its child nodes. + The method collapses the current and its child nodes. If you want to collapse only the current , use the overload, passing `true` to ignore its child nodes. > [!NOTE] -> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. +> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. ## Examples - The following code example toggles the selected node when a button is clicked. If the selected node is collapsed, it is expanded, if it is expanded by calling the method, it is collapsed by calling the method. This example requires that you have a with a control that has at least one with at least one child . + The following code example toggles the selected node when a button is clicked. If the selected node is collapsed, it is expanded, if it is expanded by calling the method, it is collapsed by calling the method. This example requires that you have a with a control that has at least one with at least one child . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_EnsureVisible_4/CPP/treenode_ensurevisible_4.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Clone/treenode_ensurevisible_4.cs" id="Snippet1"::: @@ -758,7 +758,7 @@ method, passing `true`, when you want to collapse a node but leave its child nodes in their expanded state. + Use the method, passing `true`, when you want to collapse a node but leave its child nodes in their expanded state. ]]> @@ -974,7 +974,7 @@ method is called, the tree is expanded and scrolled to ensure that the current tree node is visible in the . This method is useful if you are selecting a tree node in code based on certain criteria. By calling this method after you select the node, the user can see and interact with the selected node. + When the method is called, the tree is expanded and scrolled to ensure that the current tree node is visible in the . This method is useful if you are selecting a tree node in code based on certain criteria. By calling this method after you select the node, the user can see and interact with the selected node. > [!NOTE] > If the property is set to a value that is larger than the height of the tree view control, calling this method has unexpected results. @@ -1026,15 +1026,15 @@ method expands the current down to the next level of nodes. + The method expands the current down to the next level of nodes. > [!NOTE] -> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. +> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. ## Examples - The following code example toggles the selected node when a button is clicked. If the selected node is collapsed, it is expanded, if it is expanded by calling the method, it is collapsed by calling the method. This example requires that you have a with a control that has at least one with at least one child . + The following code example toggles the selected node when a button is clicked. If the selected node is collapsed, it is expanded, if it is expanded by calling the method, it is collapsed by calling the method. This example requires that you have a with a control that has at least one with at least one child . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_EnsureVisible_4/CPP/treenode_ensurevisible_4.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Clone/treenode_ensurevisible_4.cs" id="Snippet1"::: @@ -1079,15 +1079,15 @@ method expands all the child tree nodes assigned to the collection. + The method expands all the child tree nodes assigned to the collection. > [!NOTE] -> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. +> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. ## Examples - The following code example expands all the tree nodes in a control when a is checked, and collapses the when the is cleared. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + The following code example expands all the tree nodes in a control when a is checked, and collapses the when the is cleared. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet1"::: @@ -1143,7 +1143,7 @@ is the first child in the stored in the property of the current tree node. If the has no child tree node, the property returns `null`. + The is the first child in the stored in the property of the current tree node. If the has no child tree node, the property returns `null`. @@ -1194,7 +1194,7 @@ ## Examples - The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. + The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet1"::: @@ -1243,7 +1243,7 @@ collection, the control sends an NM_CUSTOMDRAW notification before the node handle is available. If you override the method of the to provide custom drawing in response to this notification, you should always check the return value of this method for `null` before you attempt to access the node. + When a node is added to the collection, the control sends an NM_CUSTOMDRAW notification before the node handle is available. If you override the method of the to provide custom drawing in response to this notification, you should always check the return value of this method for `null` before you attempt to access the node. @@ -1302,7 +1302,7 @@ ## Examples - The following code example sets the property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + The following code example sets the property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: @@ -1350,7 +1350,7 @@ property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + The following code example sets the property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: @@ -1475,16 +1475,16 @@ value is the index value of an stored in the assigned to the property. + The value is the index value of an stored in the assigned to the property. > [!NOTE] > The default value of the property is the same as the property of the control that the is assigned to. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). -**.NET 5 and later versions:** If the associated property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +**.NET 5 and later versions:** If the associated property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. ## Examples The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that is displayed when the tree node is in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. It also requires that the `Customer` and `Order` objects are defined. @@ -1563,10 +1563,10 @@ For example, consider a button control whose property of the containing control. - The is case-insensitive. + The is case-insensitive. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -1609,7 +1609,7 @@ If you set the property, the and property values of the represented by the property of the . This example requires that you have a with a control on it. The should have at least two root nodes, each having at least one child node. + The following code example displays the and property values of the represented by the property of the . This example requires that you have a with a control on it. The should have at least two root nodes, each having at least one child node. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.TreeNode/CPP/treenode.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/FromHandle/treenode.cs" id="Snippet2"::: @@ -1707,7 +1707,7 @@ If you set the property, the method, it is collapsed by calling the method. This example requires that you have a with a control that has at least one with at least one child . + The following code example toggles the selected node when a button is clicked. If the selected node is collapsed, it is expanded, if it is expanded by calling the method, it is collapsed by calling the method. This example requires that you have a with a control that has at least one with at least one child . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_EnsureVisible_4/CPP/treenode_ensurevisible_4.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Clone/treenode_ensurevisible_4.cs" id="Snippet1"::: @@ -1860,7 +1860,7 @@ If you set the property, the is the last child in the stored in the property of the current tree node. If the has no child tree node, the property returns `null`. + The is the last child in the stored in the property of the current tree node. If the has no child tree node, the property returns `null`. @@ -1956,7 +1956,7 @@ If you set the property, the of a is also the node's key, when the node is part of a . If the node does not have a name, returns an empty string (""). + The of a is also the node's key, when the node is part of a . If the node does not have a name, returns an empty string (""). ]]> @@ -2004,7 +2004,7 @@ If you set the property, the is the next sibling in the stored in the property of the tree node's parent . If there is no next tree node, the property returns `null`. + The is the next sibling in the stored in the property of the tree node's parent . If there is no next tree node, the property returns `null`. @@ -2064,7 +2064,7 @@ If you set the property, the can be a child, sibling, or a tree node from another branch. If there is no next tree node, the property returns `null`. + The can be a child, sibling, or a tree node from another branch. If there is no next tree node, the property returns `null`. @@ -2135,7 +2135,7 @@ If you set the property, the to the specified size and adjusts the of the tree node's parent control. This example requires that you have a with a control that contains a collection of objects, and a that contains font sizes. + The following code example changes the size of to the specified size and adjusts the of the tree node's parent control. This example requires that you have a with a control that contains a collection of objects, and a that contains font sizes. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet2"::: @@ -2193,7 +2193,7 @@ If you set the property, the and adds it to another if both tree node collections are not read-only. When a is clicked, the is deleted from one using the method and added to the other using the method. This example requires that you have two controls named `treeView1` and `treeView2`, and a on a . + The following code example removes the selected tree node from one and adds it to another if both tree node collections are not read-only. When a is clicked, the is deleted from one using the method and added to the other using the method. This example requires that you have two controls named `treeView1` and `treeView2`, and a on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection/CPP/treenodecollection.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Nodes/treenodecollection.cs" id="Snippet1"::: @@ -2252,7 +2252,7 @@ If you set the property, the and property values of the represented by the property of the . This example requires that you have a with a control on it. The should have at least two root nodes, each having at least one child node. + The following code example displays the and property values of the represented by the property of the . This example requires that you have a with a control on it. The should have at least two root nodes, each having at least one child node. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Windows.Forms.TreeNode/CPP/treenode.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/FromHandle/treenode.cs" id="Snippet2"::: @@ -2304,7 +2304,7 @@ If you set the property, the is the previous sibling in the stored in the property of the tree node's parent . If there is no previous tree node, the property returns `null`. + The is the previous sibling in the stored in the property of the tree node's parent . If there is no previous tree node, the property returns `null`. @@ -2364,7 +2364,7 @@ If you set the property, the can be a child, sibling, or a tree node from another branch. If there is no previous tree node, the property returns `null`. + The can be a child, sibling, or a tree node from another branch. If there is no previous tree node, the property returns `null`. @@ -2418,7 +2418,7 @@ If you set the property, the method is called, the tree node, and any child tree nodes that are assigned to the , are removed from the . The removed child nodes are removed from the but are still attached to this tree node. + When the method is called, the tree node, and any child tree nodes that are assigned to the , are removed from the . The removed child nodes are removed from the but are still attached to this tree node. @@ -2496,13 +2496,13 @@ If you set the property, the value is the index value of an stored in the assigned to the property. + The value is the index value of an stored in the assigned to the property. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). -**.NET 5 and later versions:** If the associated property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. -For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. +**.NET 5 and later versions:** If the associated property value is changed to `null`, the property returns its default value, -1. However, the assigned value is retained internally and used when another object is assigned to the property. If the new assigned to the property has an property value that is less than or equal to the value assigned to the property minus one (to account for the collection being a zero-based index), the property value is adjusted to one less than the property value. +For example, consider a button control whose has three images and whose property is set to 2. If a new that has only two images is assigned to the button, the value changes to 1. > [!NOTE] > The default value of the property is the same as the property of the control that the is assigned to. @@ -2685,9 +2685,9 @@ If you set the property, t ## Remarks The image index that is returned by this property is contained in the property of the parent control. - If the parent has check boxes enabled, the is ignored and the node will display the first or second image in the set on the parent to indicate an unchecked or checked state, respectively. Toggling the property does not affect the value of the . + If the parent has check boxes enabled, the is ignored and the node will display the first or second image in the set on the parent to indicate an unchecked or checked state, respectively. Toggling the property does not affect the value of the . - The returns -1 when not set. The and properties are mutually exclusive, meaning if one is set, the other is ignored. If you set the property, the property is automatically set to -1. Alternatively, if you set , is automatically set to an empty string (""). + The returns -1 when not set. The and properties are mutually exclusive, meaning if one is set, the other is ignored. If you set the property, the property is automatically set to -1. Alternatively, if you set , is automatically set to an empty string (""). ]]> @@ -2757,9 +2757,9 @@ If you set the property, t ## Remarks The image key that is returned by this property is contained in the property of the parent control. - If the parent has check boxes enabled, the is ignored and the node will display the first or second image in the set on the parent to indicate an unchecked or checked state, respectively. Toggling the property does not affect the value of the . + If the parent has check boxes enabled, the is ignored and the node will display the first or second image in the set on the parent to indicate an unchecked or checked state, respectively. Toggling the property does not affect the value of the . - The and properties are mutually exclusive, meaning if one is set, the other is ignored. If you set the property, the property is automatically set to -1. Alternatively, if you set , is automatically set to an empty string (""). You should set the to an image with a corresponding index between 0 and 14. You can set the to an image with an index value greater than 14 (an exception will not be thrown), but the image may not be displayed + The and properties are mutually exclusive, meaning if one is set, the other is ignored. If you set the property, the property is automatically set to -1. Alternatively, if you set , is automatically set to an empty string (""). You should set the to an image with a corresponding index between 0 and 14. You can set the to an image with an index value greater than 14 (an exception will not be thrown), but the image may not be displayed ]]> @@ -2875,12 +2875,12 @@ If you set the property, t Any derived type can be assigned to this property. If this property is being set through the Windows Forms designer, only text can be assigned. > [!CAUTION] -> The method performs a shallow copy of the node. If the value of the property is a reference type, both the original and cloned copy will point to the same single instance of the value. +> The method performs a shallow copy of the node. If the value of the property is a reference type, both the original and cloned copy will point to the same single instance of the value. ## Examples - The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. + The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet1"::: @@ -2930,12 +2930,12 @@ If you set the property, t ## Remarks The maximum number of characters that a can display is 259. If a that has more than 259 characters is assigned to this property, only the first 259 characters are displayed. - This property cannot be set by the user if the property of the parent is set to `false`. The alternative to explicitly setting this property is to create the tree node by using one of the constructors that has a string parameter that represents the property. The label is displayed next to the image, if one is displayed. + This property cannot be set by the user if the property of the parent is set to `false`. The alternative to explicitly setting this property is to create the tree node by using one of the constructors that has a string parameter that represents the property. The label is displayed next to the image, if one is displayed. ## Examples - The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. + The following code example creates a root tree node to assign child tree nodes to. A child tree node for each `Customer` object in an is added to the root tree node as well as a child tree node for each `Order` object assigned to the `Customer` object. The `Customer` object is assigned to the property, and the tree nodes representing `Customer` objects are displayed with text. This example requires that you have a `Customer` and `Order` object defined, a control on a , and an named `customerArray` that contains `Customer` objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet1"::: @@ -2982,7 +2982,7 @@ If you set the property, t The tree node is toggled to the state opposite its current state, either expanded or collapsed. > [!NOTE] -> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. +> The state of a is persisted. For example, if the next level of child nodes was not collapsed previously, when the method is called, the child nodes appear in their previously expanded state. @@ -3049,14 +3049,14 @@ If you set the property, t property of the parent to `true` for the to be visible at run time. + You must set the property of the parent to `true` for the to be visible at run time. If the control has a ToolTip and also contains a that has a , only the for the node will be shown. ## Examples - The following code example demonstrates how to use the and properties. To run this example, paste the following code into a Windows Form and call `InitializeTreeViewWithToolTips` from the form's constructor or event handler. + The following code example demonstrates how to use the and properties. To run this example, paste the following code into a Windows Form and call `InitializeTreeViewWithToolTips` from the form's constructor or event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TreeNode/ToolTipText/Form1.vb" id="Snippet7"::: diff --git a/xml/System.Windows.Forms/TreeNodeCollection.xml b/xml/System.Windows.Forms/TreeNodeCollection.xml index 622faa5718e..95c3043296e 100644 --- a/xml/System.Windows.Forms/TreeNodeCollection.xml +++ b/xml/System.Windows.Forms/TreeNodeCollection.xml @@ -56,19 +56,19 @@ , , and methods enable you to add and remove individual tree nodes from the collection. + The , , and methods enable you to add and remove individual tree nodes from the collection. > [!NOTE] > Enumerating the collection and removing nodes is not supported. - You can also use the or methods to add or remove all the tree nodes from the collection. + You can also use the or methods to add or remove all the tree nodes from the collection. Classes cannot inherit from the class. ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -132,14 +132,14 @@ objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. - To remove a that you previously added, use the , , or methods. + To remove a that you previously added, use the , , or methods. ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -192,11 +192,11 @@ method allows you to add previously created objects to the end of the tree node collection. + This version of the method allows you to add previously created objects to the end of the tree node collection. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. - To remove a that you previously added, use the , , or methods. + To remove a that you previously added, use the , , or methods. > [!NOTE] > A can be assigned to only one control at a time. To add the tree node to a new tree view control, you must remove it from the other tree view first or clone it. @@ -204,7 +204,7 @@ ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -256,7 +256,7 @@ ## Remarks The property corresponds to the key for a in the . - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. ]]> @@ -305,7 +305,7 @@ The `imageIndex` parameter refers to an image in the property of the parent . - The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. + The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. ]]> @@ -352,7 +352,7 @@ ## Remarks The property corresponds to the key for a in the . - The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. + The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. The `imageKey` parameter refers to an image in the property of the parent . @@ -403,7 +403,7 @@ ## Remarks The property corresponds to the key for a in the . - The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. + The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. The `imageIndex` parameter refers to an image in the property of the parent . @@ -456,7 +456,7 @@ ## Remarks The property corresponds to the key for a in the . - The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. + The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. The `imageKey` parameter refers to an image in the property of the parent . @@ -512,14 +512,14 @@ ## Remarks The objects contained in the `nodes` array are appended to the end of the collection. - You can use the method to quickly add a group of previously created objects to the collection instead of manually adding each to the collection using the method. + You can use the method to quickly add a group of previously created objects to the collection instead of manually adding each to the collection using the method. - To remove a that you previously added, use the , , or methods. + To remove a that you previously added, use the , , or methods. ## Examples - The following code example copies the from a to a temporary , and then adds the contents of the array to another using the method. The from the source is cleared using the method. This example requires that you have two controls, one with a collection of objects. + The following code example copies the from a to a temporary , and then adds the contents of the array to another using the method. The from the source is cleared using the method. This example requires that you have two controls, one with a collection of objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection_Clear/CPP/treenodecollection_clear.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNodeCollection/AddRange/treenodecollection_clear.cs" id="Snippet1"::: @@ -571,14 +571,14 @@ ## Remarks You can use this method to clear the entire collection of tree nodes from a tree view. - To remove an individual tree node from the collection, use the or methods. + To remove an individual tree node from the collection, use the or methods. - To add new objects to the collection, use the , , or methods. + To add new objects to the collection, use the , , or methods. ## Examples - The following code example copies the from a to a temporary , and then adds the contents of the array to another using the method. The from the source is cleared using the method. This example requires that you have two controls, one with a collection of objects. + The following code example copies the from a to a temporary , and then adds the contents of the array to another using the method. The from the source is cleared using the method. This example requires that you have two controls, one with a collection of objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection_Clear/CPP/treenodecollection_clear.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNodeCollection/AddRange/treenodecollection_clear.cs" id="Snippet1"::: @@ -631,7 +631,7 @@ This method checks for reference equality only. You cannot use it to determine whether an equivalent but different node is in the collection. > [!NOTE] -> One implication of the reference-equality requirement is that you cannot customize the behavior of this method for derived types by overriding the method of the class. +> One implication of the reference-equality requirement is that you cannot customize the behavior of this method for derived types by overriding the method of the class. @@ -932,7 +932,7 @@ This method checks for reference equality only. You cannot use it to retrieve the index of an equivalent but different node in the collection. > [!NOTE] -> One implication of the reference-equality requirement is that you cannot customize the behavior of this method for derived types by overriding the method of the class. +> One implication of the reference-equality requirement is that you cannot customize the behavior of this method for derived types by overriding the method of the class. @@ -982,7 +982,7 @@ is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. + If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. The property corresponds to the key for a in the . @@ -1047,7 +1047,7 @@ ## Remarks If the property is set to `true`, the `index` parameter value is ignored. The is inserted into the tree view and the is sorted again. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. ]]> @@ -1091,9 +1091,9 @@ ## Remarks If the property is set to `true`, the `index` parameter value is ignored. The is inserted into the tree view, and the resorted. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. - To remove a that you previously added, use the , , or methods. + To remove a that you previously added, use the , , or methods. > [!NOTE] > A can be assigned to only one control at a time. To add the tree node to a new tree view control, you must remove it from the other tree view first or clone it. @@ -1101,7 +1101,7 @@ ## Examples - The following code example removes the selected tree node from one and adds it to another if both tree node collections are not read-only. When a is clicked, the represented by the property is deleted from one using the method and added to the other using the method. This example requires that you have a that contains two controls and a . The controls should be named `treeView1` and `treeView2`. + The following code example removes the selected tree node from one and adds it to another if both tree node collections are not read-only. When a is clicked, the represented by the property is deleted from one using the method and added to the other using the method. This example requires that you have a that contains two controls and a . The controls should be named `treeView1` and `treeView2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection/CPP/treenodecollection.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Nodes/treenodecollection.cs" id="Snippet1"::: @@ -1153,7 +1153,7 @@ ## Remarks If the property is set to `true`, the `index` parameter value is ignored. The is inserted into the tree view and the is sorted again. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . @@ -1204,7 +1204,7 @@ ## Remarks If the property is set to `true`, the `index` parameter value is ignored. The is inserted into the tree view and the is sorted again. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . @@ -1257,7 +1257,7 @@ ## Remarks If the property is set to `true`, the `index` parameter value is ignored. The is inserted into the tree view and the is sorted again. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . @@ -1312,7 +1312,7 @@ ## Remarks If the property is set to `true`, the `index` parameter value is ignored. The is inserted into the tree view and the is sorted again. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . @@ -1369,7 +1369,7 @@ ## Remarks If the property is set to `true`, the `index` parameter value is ignored. The is inserted into the tree view and the is sorted again. - You can also add new objects to the collection by using the or methods. + You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . @@ -1416,7 +1416,7 @@ and adds it to another if both tree node collections are not read-only. When a is clicked, the represented by the property is deleted from one using the method and added to the other using the method. This example requires that you have a that contains two controls and a . The controls should be named `treeView1` and `treeView2`. + The following code example removes the selected tree node from one and adds it to another if both tree node collections are not read-only. When a is clicked, the represented by the property is deleted from one using the method and added to the other using the method. This example requires that you have a that contains two controls and a . The controls should be named `treeView1` and `treeView2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection/CPP/treenodecollection.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Nodes/treenodecollection.cs" id="Snippet1"::: @@ -1480,7 +1480,7 @@ To assign objects to a specific location, or to retrieve them from the , you can reference the collection object with a specific index value. The index value of the is a zero-based index. ## Examples - The following code example removes the first from a if its property is set to "Node0". When a is clicked, the first in the is deleted using the method. This example requires that you have created a and a on a . The first in your should have a text property of "Node0." + The following code example removes the first from a if its property is set to "Node0". When a is clicked, the first in the is deleted using the method. This example requires that you have created a and a on a . The first in your should have a text property of "Node0." :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection/CPP/treenodecollection.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Nodes/treenodecollection.cs" id="Snippet2"::: @@ -1573,17 +1573,17 @@ To assign objects to a specific location, o ## Remarks When a is removed from the tree node collection, all subsequent tree nodes are moved up one position in the collection. - You can also remove a that you previously added by using the or methods. + You can also remove a that you previously added by using the or methods. > [!NOTE] > Enumerating the collection and removing nodes is not supported. - To add new objects to the collection, use the , , or methods. + To add new objects to the collection, use the , , or methods. ## Examples - The following code example removes the selected tree node from one and adds it to another if both tree node collections are not read-only. When a is clicked, the represented by the property is deleted from one using the method and added to the other using the method. This example requires that you have a that contains two controls and a . The controls should be named `treeView1` and `treeView2`. + The following code example removes the selected tree node from one and adds it to another if both tree node collections are not read-only. When a is clicked, the represented by the property is deleted from one using the method and added to the other using the method. This example requires that you have a that contains two controls and a . The controls should be named `treeView1` and `treeView2`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection/CPP/treenodecollection.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Nodes/treenodecollection.cs" id="Snippet1"::: @@ -1633,17 +1633,17 @@ To assign objects to a specific location, o ## Remarks When a is removed from the tree node collection, all subsequent tree nodes are moved up one position in the collection. - You can also remove a that you previously added by using the or methods. + You can also remove a that you previously added by using the or methods. > [!NOTE] > Enumerating the collection and removing nodes is not supported. - To add new objects to the collection, use the , , or methods. + To add new objects to the collection, use the , , or methods. ## Examples - The following code example removes the first from a if its property is set to "Node0". When a is clicked, the first in the is deleted using the method. This example requires that you have created a and a on a . The first in your should have a text property of "Node0." + The following code example removes the first from a if its property is set to "Node0". When a is clicked, the first in the is deleted using the method. This example requires that you have created a and a on a . The first in your should have a text property of "Node0." :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNodeCollection/CPP/treenodecollection.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/Nodes/treenodecollection.cs" id="Snippet2"::: @@ -1820,7 +1820,7 @@ This member is an explicit interface member implementation. It can be used only , the method will use the string returned by the method of the class. + If `node` is not a , the method will use the string returned by the method of the class. ]]> @@ -1870,7 +1870,7 @@ This member is an explicit interface member implementation. It can be used only , the method returns `false`. Therefore, you cannot pass in a string to determine if the collection contains a node that has the value of the string as its property. + If `node` is not a , the method returns `false`. Therefore, you cannot pass in a string to determine if the collection contains a node that has the value of the string as its property. ]]> @@ -1915,7 +1915,7 @@ This member is an explicit interface member implementation. It can be used only , the method returns -1. Therefore, you cannot pass in a string to find the node that has the value of the string as its property. + If `node` is not a , the method returns -1. Therefore, you cannot pass in a string to find the node that has the value of the string as its property. ]]> diff --git a/xml/System.Windows.Forms/TreeNodeConverter.xml b/xml/System.Windows.Forms/TreeNodeConverter.xml index ea79dcd615d..a567da41bc5 100644 --- a/xml/System.Windows.Forms/TreeNodeConverter.xml +++ b/xml/System.Windows.Forms/TreeNodeConverter.xml @@ -31,14 +31,14 @@ Provides a type converter to convert objects to and from various other representations. - base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> You should never create an instance of a . Instead, call the method of . For more information, see the examples in the base class. - +> You should never create an instance of a . Instead, call the method of . For more information, see the examples in the base class. + ]]> @@ -113,11 +113,11 @@ if this converter can perform the conversion; otherwise, . - diff --git a/xml/System.Windows.Forms/TreeNodeMouseHoverEventArgs.xml b/xml/System.Windows.Forms/TreeNodeMouseHoverEventArgs.xml index 10dbb3391dc..65b8b02afff 100644 --- a/xml/System.Windows.Forms/TreeNodeMouseHoverEventArgs.xml +++ b/xml/System.Windows.Forms/TreeNodeMouseHoverEventArgs.xml @@ -34,16 +34,16 @@ Provides data for the event. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet634"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet634"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet634"::: + ]]> @@ -118,16 +118,16 @@ Gets the node the mouse pointer is currently resting on. The the mouse pointer is currently resting on. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet634"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet634"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet634"::: + ]]> diff --git a/xml/System.Windows.Forms/TreeView.xml b/xml/System.Windows.Forms/TreeView.xml index 7eb06825a24..36290e8be37 100644 --- a/xml/System.Windows.Forms/TreeView.xml +++ b/xml/System.Windows.Forms/TreeView.xml @@ -66,7 +66,7 @@ collection holds all the objects that are assigned to the control. The tree nodes in this collection are referred to as the root tree nodes. Any tree node that is subsequently added to a root tree node is referred to as a child node. Because each can contain a collection of other objects, you might find it difficult to determine your location in the tree structure when you iterate through the collection. You can parse the string by using the string value to determine where a label begins and ends. + The collection holds all the objects that are assigned to the control. The tree nodes in this collection are referred to as the root tree nodes. Any tree node that is subsequently added to a root tree node is referred to as a child node. Because each can contain a collection of other objects, you might find it difficult to determine your location in the tree structure when you iterate through the collection. You can parse the string by using the string value to determine where a label begins and ends. You can display images next to the tree nodes by assigning an to the property and referencing the index value of an in the to assign that . Use the following properties to assign images: @@ -74,9 +74,9 @@ - Set the property to the index value of the that you want to display when a tree node is selected. - The images referenced by the and property values are the default images displayed by all the tree nodes that are assigned to the collection. Individual tree nodes can override the default images by setting the and properties. + The images referenced by the and property values are the default images displayed by all the tree nodes that are assigned to the collection. Individual tree nodes can override the default images by setting the and properties. - The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: + The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: ```xml @@ -84,17 +84,17 @@ ``` - Tree nodes can be expanded to display the next level of child tree nodes. The user can expand the by clicking the plus-sign (+) button, if one is displayed next to the , or you can expand the by calling the method. To expand all the child tree node levels in the collection, call the method. You can collapse the child level by calling the method, or the user can press the minus-sign (-) button, if one is displayed next to the . You can also call the method to alternate between the expanded and collapsed states. + Tree nodes can be expanded to display the next level of child tree nodes. The user can expand the by clicking the plus-sign (+) button, if one is displayed next to the , or you can expand the by calling the method. To expand all the child tree node levels in the collection, call the method. You can collapse the child level by calling the method, or the user can press the minus-sign (-) button, if one is displayed next to the . You can also call the method to alternate between the expanded and collapsed states. Tree nodes can optionally display check boxes. To display the check boxes, set the property of the to `true`. The property is set to `true` for tree nodes that are in a checked state. > [!NOTE] > Setting the property from within the or event causes the event to be raised multiple times and can result in unexpected behavior. For example, you might set the property in the event handler when you are recursively updating the child nodes so that the user does not have to expand and check each one individually. To prevent the event from being raised multiple times, add logic to your event handler that only executes your recursive code if the property of the is not set to . For an example of how to do this, see the Example section of the or events. - You can change the appearance of the control by setting some of its display and style properties. Setting to `true` displays a plus-sign or minus-sign button next to each that can be expanded or collapsed, respectively. Setting the property to `true` causes the to display lines that join all the root tree nodes together. You can display lines that connect child tree nodes to their root node by setting the property to `true`. Setting the property to `true` changes the appearance of the tree node labels as the mouse pointer passes over them. When hot-tracked, the tree node labels take on the appearance of a hyperlink. You can also completely customize the appearance of the control. To do this, set the property to a value other than and handle the event. + You can change the appearance of the control by setting some of its display and style properties. Setting to `true` displays a plus-sign or minus-sign button next to each that can be expanded or collapsed, respectively. Setting the property to `true` causes the to display lines that join all the root tree nodes together. You can display lines that connect child tree nodes to their root node by setting the property to `true`. Setting the property to `true` changes the appearance of the tree node labels as the mouse pointer passes over them. When hot-tracked, the tree node labels take on the appearance of a hyperlink. You can also completely customize the appearance of the control. To do this, set the property to a value other than and handle the event. > [!NOTE] -> When setting the , , , and properties at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . +> When setting the , , , and properties at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . @@ -104,7 +104,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/Overview/form1.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TreeView/Overview/form1.vb" id="Snippet10"::: - The following, more complex code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . + The following, more complex code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -292,7 +292,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. @@ -706,7 +706,7 @@ This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - For the complete example, see the constructor reference topic. + For the complete example, see the constructor reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes2/CPP/treeviewshowcheckednodes2.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/.ctor/treeviewshowcheckednodes2.cs" id="Snippet2"::: @@ -759,7 +759,7 @@ This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - For the complete example, see the reference topic. + For the complete example, see the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/CPP/treeviewshowcheckednodes1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.cs" id="Snippet2"::: @@ -808,7 +808,7 @@ ## Examples - The following code example demonstrates how to use the and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet1"::: @@ -860,7 +860,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. @@ -905,14 +905,14 @@ , call the method. The method prevents the control from painting until the method is called. + To maintain performance while items are added one at a time to the , call the method. The method prevents the control from painting until the method is called. - The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow the control to resume painting, call the method when all the tree nodes have been added to the tree view. + The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow the control to resume painting, call the method when all the tree nodes have been added to the tree view. ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -973,7 +973,7 @@ ## Examples - The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet1"::: @@ -1025,10 +1025,10 @@ ## Remarks A check box is displayed to the left of both the tree node label and tree node , if any. Check boxes allow the user to select more than one tree node at a time. - When the property of a is set to `true`, and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. However, the displayed images may be different if the following situation occurs: If the of the node is set to a value other than 0 or 1, and the property of the parent is set to `false`, the will not automatically reset to -1 to indicate it is not set. In this case, the state image at the indicated index position is shown. If is set to `true` again, the first and second images of the are shown to indicate a checked or unchecked state, respectively. + When the property of a is set to `true`, and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. However, the displayed images may be different if the following situation occurs: If the of the node is set to a value other than 0 or 1, and the property of the parent is set to `false`, the will not automatically reset to -1 to indicate it is not set. In this case, the state image at the indicated index position is shown. If is set to `true` again, the first and second images of the are shown to indicate a checked or unchecked state, respectively. > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . @@ -1077,10 +1077,10 @@ method collapses all the objects, which includes all the child tree nodes, that are in the control. + The method collapses all the objects, which includes all the child tree nodes, that are in the control. > [!NOTE] -> The state of a persists. For example, suppose that you call the method for a root tree node. If the child tree nodes were not previously collapsed, they will appear in their previously-expanded state. Calling the method ensures that all the tree nodes appear in the collapsed state. +> The state of a persists. For example, suppose that you call the method for a root tree node. If the child tree nodes were not previously collapsed, they will appear in their previously-expanded state. Calling the method ensures that all the tree nodes appear in the collapsed state. @@ -1089,7 +1089,7 @@ This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - For the complete example, see the reference topic. + For the complete example, see the reference topic. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/CPP/treeviewshowcheckednodes1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.cs" id="Snippet2"::: @@ -1311,7 +1311,7 @@ property does not affect the control. If you want to reduce flicker when the is drawn, use the and methods. + Setting the property does not affect the control. If you want to reduce flicker when the is drawn, use the and methods. ]]> @@ -1357,7 +1357,7 @@ are typically drawn by the operating system. The property lets you customize the appearance of the nodes. To do this, set to or and provide a handler for the event. This is called owner drawing. + The nodes of a are typically drawn by the operating system. The property lets you customize the appearance of the nodes. To do this, set to or and provide a handler for the event. This is called owner drawing. @@ -1418,9 +1418,9 @@ ||The label area can be customized. All other elements are drawn automatically.| ||The appearance of the entire can be customized. Icons, check boxes, plus and minus signs, and lines connecting the nodes must be drawn manually if they are desired.| - The region that the value would occupy if it were drawn using the font specified by the control's property is the region in which a node can be clicked to select it. This is called the hit test region. If you draw outside this region, you should provide your own code that selects a node when its visible area is clicked. + The region that the value would occupy if it were drawn using the font specified by the control's property is the region in which a node can be clicked to select it. This is called the hit test region. If you draw outside this region, you should provide your own code that selects a node when its visible area is clicked. - The hit test region corresponds to the property when using . When using , however, the property encompasses the entire width of the . In this case, you can access the hit test region by getting the value and accessing its property. You can then draw the hit test region of the node within these bounds, or you can provide your own hit test code. Note that setting the property does not change the size of the hit test region, which is calculated using the font specified for the entire . + The hit test region corresponds to the property when using . When using , however, the property encompasses the entire width of the . In this case, you can access the hit test region by getting the value and accessing its property. You can then draw the hit test region of the node within these bounds, or you can provide your own hit test code. Note that setting the property does not change the size of the hit test region, which is calculated using the font specified for the entire . For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1478,14 +1478,14 @@ , call the method. The method prevents the control from painting until the method is called. + To maintain performance while items are added one at a time to the , call the method. The method prevents the control from painting until the method is called. - The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow control the control to resume painting, call the method when all the tree nodes have been added to the tree view. + The preferred way to add items to a tree view control is to use the method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the method to prevent the control from painting during the add operations. To allow control the control to resume painting, call the method when all the tree nodes have been added to the tree view. ## Examples - The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have a cursor file that is named `MyWait.cur` in the application directory and that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -1527,15 +1527,15 @@ method expands all the objects, which includes all the child tree nodes, that are in the control. + The method expands all the objects, which includes all the child tree nodes, that are in the control. > [!NOTE] -> The state of a persists. For example, suppose that you call the method, and then the individual root tree nodes are collapsed. The child tree nodes have not been collapsed, and will appear in their previously-expanded state when the root tree nodes are expanded again. Calling the method ensures that all the tree nodes appear in the collapsed state. +> The state of a persists. For example, suppose that you call the method, and then the individual root tree nodes are collapsed. The child tree nodes have not been collapsed, and will appear in their previously-expanded state when the root tree nodes are expanded again. Calling the method ensures that all the tree nodes appear in the collapsed state. ## Examples - The following code example expands all the tree nodes in a control when a is checked, and collapses the when the is cleared. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + The following code example expands all the tree nodes in a control when a is checked, and collapses the when the is cleared. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet1"::: @@ -1616,12 +1616,12 @@ is `true`, a selection highlight spans the entire width of the tree view, display instead of the width of just the tree node label. The property is ignored if is set to `true`. + When is `true`, a selection highlight spans the entire width of the tree view, display instead of the width of just the tree node label. The property is ignored if is set to `true`. ## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. @@ -1722,7 +1722,7 @@ and coordinates of the event as the and values of a new . + You can pass the and coordinates of the event as the and values of a new . ]]> @@ -1767,7 +1767,7 @@ and coordinates of the event as the `x` and `y` parameters. + You can pass the and coordinates of the event as the `x` and `y` parameters. @@ -1824,7 +1824,7 @@ ## Examples - The following code example sets the property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + The following code example sets the property of a and displays the number of child tree nodes that are contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: @@ -1982,7 +1982,7 @@ ## Examples - The following code example code demonstrates how to use the , , and members. To run this example, create a Windows Form that contains a named `treeView1` and populate it with several levels of nodes. Paste the following code into the form and associate the event of `treeView1` with the `treeView1_MouseDown` method in this example. + The following code example code demonstrates how to use the , , and members. To run this example, create a Windows Form that contains a named `treeView1` and populate it with several levels of nodes. Paste the following code into the form and associate the event of `treeView1` with the `treeView1_MouseDown` method in this example. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewWhidbeyMembers/cpp/Form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet3"::: @@ -2033,12 +2033,12 @@ If the property is set to `true`, the property has no effect. > [!NOTE] -> When the property is set to `true`, each tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it. The font style is applied to the and the is set to blue to make the label appear as a link. The appearance is not controlled by the Internet settings of the user's operating system. +> When the property is set to `true`, each tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it. The font style is applied to the and the is set to blue to make the label appear as a link. The appearance is not controlled by the Internet settings of the user's operating system. ## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to `false`, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. @@ -2123,13 +2123,13 @@ value is the index of an stored in the assigned to the property. + The value is the index of an stored in the assigned to the property. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . @@ -2213,8 +2213,8 @@ If you set the property, the does not have an image set, the image specified by the property will be shown when the node is not selected. When the node is selected, the first item in the will be shown. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -2266,7 +2266,7 @@ If you set the property, the property value is anything other than `null`, all the tree nodes display the first stored in the . You can specify which images from the list are displayed for selected and unselected nodes by setting the and properties. Individual objects can specify which image is displayed by setting their and properties. These individual settings will override the settings in the corresponding properties. + If the property value is anything other than `null`, all the tree nodes display the first stored in the . You can specify which images from the list are displayed for selected and unselected nodes by setting the and properties. Individual objects can specify which image is displayed by setting their and properties. These individual settings will override the settings in the corresponding properties. ## Examples The following code example creates and assigns an to a control and fills the control with objects. The tree nodes are assigned images from the that are displayed when in a selected or unselected state. This example requires that you have a that contains a , and an that contains `Customer` objects that each contain `Order` objects. @@ -2321,7 +2321,7 @@ If you set the property, the . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. @@ -2464,12 +2464,12 @@ If you set the property, the method will have unexpected results. + If the item height is set to a value larger than the height of the tree view control, calling the method will have unexpected results. ## Examples - The following code example changes the size to the specified size and adjusts the of the tree node's parent control. This example requires that you have a with a control with a collection of objects, and a that contains font sizes. + The following code example changes the size to the specified size and adjusts the of the tree node's parent control. This example requires that you have a with a control with a collection of objects, and a that contains font sizes. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_Bounds/CPP/treenode_bounds.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/.ctor/treenode_bounds.cs" id="Snippet2"::: @@ -2523,7 +2523,7 @@ If you set the property, the method works only if the property is `true`. If is `false` when you attempt to edit the label, an exception will be thrown and the tree node will not be put in to an editable state. + The method works only if the property is `true`. If is `false` when you attempt to edit the label, an exception will be thrown and the tree node will not be put in to an editable state. @@ -2719,7 +2719,7 @@ If you set the property, the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. @@ -2784,7 +2784,7 @@ If you set the property, the control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . + The following code example displays customer information in a control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the is suppressed by using the and methods, and a wait is displayed while the creates and paints the objects. This example requires that you have a `Customer` object that can hold a collection of `Order` objects. It also requires that you have created an instance of a control on a . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeView/CPP/treeview.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Cursor/Overview/treeview.cs" id="Snippet1"::: @@ -2832,7 +2832,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2884,7 +2884,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2932,7 +2932,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2980,7 +2980,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3028,7 +3028,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3076,7 +3076,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3128,7 +3128,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3176,7 +3176,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3224,7 +3224,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3272,7 +3272,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3319,7 +3319,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3395,7 +3395,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3440,7 +3440,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3485,7 +3485,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3529,11 +3529,11 @@ If you set the property, the property is set to `true` and the property is set to `false`, the method switches between selecting and clearing the check box when the user presses the SPACEBAR. + If the property is set to `true` and the property is set to `false`, the method switches between selecting and clearing the check box when the user presses the SPACEBAR. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3580,7 +3580,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3625,7 +3625,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3696,11 +3696,11 @@ If you set the property, the method performs a hit test to see whether the mouse is located over a , and if it is, raises the event. + The method performs a hit test to see whether the mouse is located over a , and if it is, raises the event. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3744,7 +3744,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3788,7 +3788,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3832,7 +3832,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3876,7 +3876,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3926,7 +3926,7 @@ If you set the property, the method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -4113,12 +4113,12 @@ If you set the property, the delimiter strings. The labels range from the root tree node to the tree node that you want. + The tree node path consists of a set of tree node labels separated by the delimiter strings. The labels range from the root tree node to the tree node that you want. ## Examples - The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: @@ -4174,7 +4174,7 @@ If you set the property, the property is for use with international applications where the language is read from right-to-left. If you set and to `true` the control's contents and text will be laid out from right-to-left. + The property is for use with international applications where the language is read from right-to-left. If you set and to `true` the control's contents and text will be laid out from right-to-left. ]]> @@ -4215,7 +4215,7 @@ If you set the property, the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. @@ -4267,12 +4267,12 @@ If you set the property, the when any is located outside the control's client region. > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, with the exception of the selected . ## Examples - The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet1"::: @@ -4351,13 +4351,13 @@ If you set the property, the value is the index of an stored in the assigned to the property. + The value is the index of an stored in the assigned to the property. > [!NOTE] -> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . +> When setting the property at run time, the handle is recreated (see ) to update the control's appearance. This causes all tree nodes to be collapsed, except for the selected . - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ## Examples @@ -4441,8 +4441,8 @@ If you set the property, t ## Remarks If a does not have a selected image set, the image specified by the property will be shown when the node is not selected. - and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. -If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). + and are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored. +If you set the property, the property is automatically set to -1. Alternatively, if you set the property, the is automatically set to an empty string (""). ]]> @@ -4499,7 +4499,7 @@ If you set the property, t ## Examples - The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). + The following code example sets the property of a and displays the number of child tree nodes that is contained in the of the . The percentage of child tree node to total tree nodes in the tree view control is also displayed. This example requires that you have a with a , and a control with a that has several objects (preferably with three or more levels). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeNode_ForeColor/CPP/treenode_forecolor.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ExpandAll/treenode_forecolor.cs" id="Snippet2"::: @@ -4548,12 +4548,12 @@ If you set the property, t is set to `true`, the property is ignored. + If is set to `true`, the property is ignored. ## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. @@ -4602,12 +4602,12 @@ If you set the property, t for a . + In order for ToolTips to be visible, you must set the for a . ## Examples - The following code example demonstrates how to use the and properties. To run this example, paste the following code into a Windows Form and call `InitializeTreeViewWithToolTips` from the form's constructor or event handler. + The following code example demonstrates how to use the and properties. To run this example, paste the following code into a Windows Form and call `InitializeTreeViewWithToolTips` from the form's constructor or event handler. :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeNode/ToolTipText/Form1.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TreeNode/ToolTipText/Form1.vb" id="Snippet7"::: @@ -4660,7 +4660,7 @@ If you set the property, t ## Examples - The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. + The following code example illustrates a customized . By inheriting the class, this custom version has all the functionality of a typical . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so that nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. @@ -4716,7 +4716,7 @@ If you set the property, t ## Examples - The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the enumeration and the , , , and properties. To run this example, paste the following code in a form and call the `InitializeTreeView` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewExample/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/BorderStyle/Overview/form1.cs" id="Snippet1"::: @@ -4760,7 +4760,7 @@ If you set the property, t This method reapplies the default sort, which is alphabetical by node text, or a custom sort specified by the property. You can use this method if the text of existing nodes is changed or nodes are moved by the user, and you want to sort the items again. > [!NOTE] -> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. +> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. ]]> @@ -4812,10 +4812,10 @@ If you set the property, t is set to `true`, the objects are sorted in alphabetical order by their property values. You should always use and to maintain performance when you add a large quantity of items to a sorted . When the text of an existing node is changed, you must call to resort the items. + When is set to `true`, the objects are sorted in alphabetical order by their property values. You should always use and to maintain performance when you add a large quantity of items to a sorted . When the text of an existing node is changed, you must call to resort the items. > [!NOTE] -> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. +> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. ]]> @@ -4862,9 +4862,9 @@ If you set the property, t , set the property and also set the or property for each . + To indicate the state of a , set the property and also set the or property for each . - The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: + The state images displayed in the are 16 x 16 pixels by default. Setting the property of the will have no effect on how the images are displayed. However, the state images are resized according to the system DPI setting when the app.config file contains the following entry: ```xml @@ -4872,7 +4872,7 @@ If you set the property, t ``` - When the property of a is set to `true` and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. You should set the property before you add nodes to the to prevent state images being shown at design time for nodes that do not have a state image set. + When the property of a is set to `true` and the property is set, each that is contained in the displays the first and second images from the to indicate an unchecked or checked state, respectively. You should set the property before you add nodes to the to prevent state images being shown at design time for nodes that do not have a state image set. @@ -5029,7 +5029,7 @@ If you set the property, t returns the first root tree node, which is located at the top of the . However, if the user has scrolled the contents, another tree node might be at the top. + Initially, the returns the first root tree node, which is located at the top of the . However, if the user has scrolled the contents, another tree node might be at the top. > [!NOTE] > Setting this property has no effect when the property value is `false`. @@ -5037,7 +5037,7 @@ If you set the property, t ## Examples - The following code example demonstrates how to use the and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. + The following code example demonstrates how to use the and members. To run this example, paste the following code in a form that contains a `TreeView` control that is named `TreeView1`. Call the `InitializeTreeView` method in the form's constructor or `Load` method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet1"::: @@ -5128,12 +5128,12 @@ If you set the property, t is set. + The custom sort is applied when the is set. - If a label is changed, you can call the method to sort the items again with the custom sorter specified by the property. + If a label is changed, you can call the method to sort the items again with the custom sorter specified by the property. > [!NOTE] -> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. +> The default sorter uses the method based on the specified by the application. This means that objects with equal value are kept in the order in which they were added to the control. This behavior may be different if a custom sort is applied. @@ -5190,7 +5190,7 @@ If you set the property, t value can be greater than the number of tree nodes in the tree view. The value is calculated by dividing the height of the client window by the height of a tree node item. The result is the total number of objects that the can display within its current dimensions. + The value can be greater than the number of tree nodes in the tree view. The value is calculated by dividing the height of the client window by the height of a tree node item. The result is the total number of objects that the can display within its current dimensions. ]]> diff --git a/xml/System.Windows.Forms/TreeViewAction.xml b/xml/System.Windows.Forms/TreeViewAction.xml index a5d34681c64..35773bb896f 100644 --- a/xml/System.Windows.Forms/TreeViewAction.xml +++ b/xml/System.Windows.Forms/TreeViewAction.xml @@ -24,20 +24,20 @@ Specifies the action that raised a event. - constructor. - - - -## Examples - The following code example demonstrates how to use the event and the enumeration. To run the example paste the following code in a form containing a TreeView control named TreeView1. This example assumes TreeView1 is populated with items and the event is connected to the event-handling method defined in the sample. - + constructor. + + + +## Examples + The following code example demonstrates how to use the event and the enumeration. To run the example paste the following code in a form containing a TreeView control named TreeView1. This example assumes TreeView1 is populated with items and the event is connected to the event-handling method defined in the sample. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.TreeViewAndPrintPreview/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/PrintPreviewDialog/Overview/form1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/PrintPreviewDialog/Overview/form1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/PrintPreviewDialog/Overview/form1.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Windows.Forms/TreeViewCancelEventArgs.xml b/xml/System.Windows.Forms/TreeViewCancelEventArgs.xml index e262cbfe3c8..c9153c253f2 100644 --- a/xml/System.Windows.Forms/TreeViewCancelEventArgs.xml +++ b/xml/System.Windows.Forms/TreeViewCancelEventArgs.xml @@ -31,24 +31,24 @@ Provides data for the , , , and events of a control. - so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added to the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow normal node expansion when the plus sign next to a node is clicked, the event handler is then removed. - - This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - - For the complete example, see the reference topic. - + so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added to the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow normal node expansion when the plus sign next to a node is clicked, the event handler is then removed. + + This behavior can also be implemented by handling the event, as illustrated in the example for that topic. + + For the complete example, see the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/CPP/treeviewshowcheckednodes1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.vb" id="Snippet2"::: + ]]> @@ -130,16 +130,16 @@ Gets the type of action that raised the event. One of the values. - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of type named `TreeView1`. Then ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet626"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet626"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet626"::: + ]]> @@ -180,19 +180,19 @@ Gets the tree node to be checked, expanded, collapsed, or selected. The to be checked, expanded, collapsed, or selected. - so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added to the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow normal node expansion when the plus sign next to a node is clicked, the event handler is then removed. - - This behavior can also be implemented by handling the event, as illustrated in the example for that topic. - - For the complete example, see the reference topic. - + so that all the checked nodes are visible. First, all the nodes are collapsed, and a handler is added to the event. Next, all the nodes are expanded. The event handler determines whether a given node has child nodes that are checked. If a node does not have checked children, the expansion is canceled for that node. In order to allow normal node expansion when the plus sign next to a node is clicked, the event handler is then removed. + + This behavior can also be implemented by handling the event, as illustrated in the example for that topic. + + For the complete example, see the reference topic. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/TreeViewShowCheckedNodes1/CPP/treeviewshowcheckednodes1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/TreeView/BeforeExpand/treeviewshowcheckednodes1.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Windows.Forms/TreeViewEventArgs.xml b/xml/System.Windows.Forms/TreeViewEventArgs.xml index ed83e270d0d..51f3ac4f36b 100644 --- a/xml/System.Windows.Forms/TreeViewEventArgs.xml +++ b/xml/System.Windows.Forms/TreeViewEventArgs.xml @@ -39,7 +39,7 @@ ## Examples - The following example illustrates a customized . By inheriting the class, this custom version has all the functionality of a normal . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. + The following example illustrates a customized . By inheriting the class, this custom version has all the functionality of a normal . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. @@ -175,7 +175,7 @@ . By inheriting the class, this custom version has all the functionality of a normal . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. + The following example illustrates a customized . By inheriting the class, this custom version has all the functionality of a normal . Changing various property values in the constructor provides a unique appearance. Because the property is set to false, the customized control also overrides the method so nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. @@ -226,7 +226,7 @@ . By inheriting the class, this custom version has all the functionality of a normal . A unique appearance is provided by changing various property values in the constructor. Because is set to false, the customized control also overrides so that nodes can be expanded and collapsed when they are clicked. + The following example illustrates a customized . By inheriting the class, this custom version has all the functionality of a normal . A unique appearance is provided by changing various property values in the constructor. Because is set to false, the customized control also overrides so that nodes can be expanded and collapsed when they are clicked. A control that is customized in this way can be used throughout an organization, making it easy to provide a consistent interface without requiring the control properties to be specified in each individual project. diff --git a/xml/System.Windows.Forms/TreeViewHitTestInfo.xml b/xml/System.Windows.Forms/TreeViewHitTestInfo.xml index 59942b09a99..8c3febe5e96 100644 --- a/xml/System.Windows.Forms/TreeViewHitTestInfo.xml +++ b/xml/System.Windows.Forms/TreeViewHitTestInfo.xml @@ -33,7 +33,7 @@ is returned by the class when the method is called. + The is returned by the class when the method is called. diff --git a/xml/System.Windows.Forms/TreeViewImageIndexConverter.xml b/xml/System.Windows.Forms/TreeViewImageIndexConverter.xml index 3be9b00ce5a..e9ce2e36438 100644 --- a/xml/System.Windows.Forms/TreeViewImageIndexConverter.xml +++ b/xml/System.Windows.Forms/TreeViewImageIndexConverter.xml @@ -31,14 +31,14 @@ Provides a type converter to convert data for an image index to and from one data type to another for use by the control. - base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> Typically, you do not directly create an instance of a . Instead, call the method of . For more information, see the examples in the base class. - +> Typically, you do not directly create an instance of a . Instead, call the method of . For more information, see the examples in the base class. + ]]> @@ -76,11 +76,11 @@ Initializes a new instance of the class. - class through the . - + class through the . + ]]> @@ -250,11 +250,11 @@ if is valid in the standard values collection; otherwise, . - diff --git a/xml/System.Windows.Forms/TreeViewImageKeyConverter.xml b/xml/System.Windows.Forms/TreeViewImageKeyConverter.xml index 98398e2ea7b..d18399c3216 100644 --- a/xml/System.Windows.Forms/TreeViewImageKeyConverter.xml +++ b/xml/System.Windows.Forms/TreeViewImageKeyConverter.xml @@ -24,14 +24,14 @@ Provides a type converter to convert data for an image key to and from another data type. - class is used to convert key values of an image associated with a control to and from other data types. For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + class is used to convert key values of an image associated with a control to and from other data types. For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> Typically, you do not directly create an instance of an . Instead, call the method of the class. For more information, see the examples in the base class. - +> Typically, you do not directly create an instance of an . Instead, call the method of the class. For more information, see the examples in the base class. + ]]> diff --git a/xml/System.Windows.Forms/TypeValidationEventArgs.xml b/xml/System.Windows.Forms/TypeValidationEventArgs.xml index fc190dde22d..ac6058994a8 100644 --- a/xml/System.Windows.Forms/TypeValidationEventArgs.xml +++ b/xml/System.Windows.Forms/TypeValidationEventArgs.xml @@ -40,7 +40,7 @@ ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -98,7 +98,7 @@ constructor are used to initialize the corresponding read-only properties of this class. + The parameters to the constructor are used to initialize the corresponding read-only properties of this class. ]]> @@ -156,7 +156,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -219,7 +219,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -271,12 +271,12 @@ property. The property contains a text description of the conversion process. is primarily useful when conversion fails, as indicated by an property value of `false`. + The validation process entails converting the formatted user input to the type defined by the property. The property contains a text description of the conversion process. is primarily useful when conversion fails, as indicated by an property value of `false`. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -326,12 +326,12 @@ property. The property represents the result of the conversion attempt, and is equivalent to the value returned by the method of the class. + The type validation process attempts to convert the formatted input string, not including prompt characters, to the type specified by the property. The property represents the result of the conversion attempt, and is equivalent to the value returned by the method of the class. ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. @@ -387,7 +387,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `MaskedTextBox1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/UICuesEventArgs.xml b/xml/System.Windows.Forms/UICuesEventArgs.xml index 8b5ca45c9e2..51f55bbf64f 100644 --- a/xml/System.Windows.Forms/UICuesEventArgs.xml +++ b/xml/System.Windows.Forms/UICuesEventArgs.xml @@ -25,25 +25,25 @@ Provides data for the event. - specifies which user interface feature changed and its new value. - - The event occurs when the user interface changes by showing or hiding focus indicators or keyboard cues. This is usually when the user presses the TAB, ALT, or F10 keys. - - For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). - - - -## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + specifies which user interface feature changed and its new value. + + The event occurs when the user interface changes by showing or hiding focus indicators or keyboard cues. This is usually when the user presses the TAB, ALT, or F10 keys. + + For information about the event model, see [Handling and Raising Events](/dotnet/standard/events/). + + + +## Examples + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet67"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: + ]]> @@ -115,16 +115,16 @@ Gets the bitwise combination of the values. A bitwise combination of the values. The default is . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet67"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: + ]]> @@ -159,16 +159,16 @@ if the state of the focus cues has changed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet67"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: + ]]> @@ -204,16 +204,16 @@ if the state of the keyboard cues has changed; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet67"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: + ]]> @@ -249,16 +249,16 @@ if focus rectangles are shown after the change; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet67"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: + ]]> @@ -294,16 +294,16 @@ if keyboard cues are underlined after the change; otherwise, . - event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . - - To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. - + event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + + To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `Control1` and ensure that the event handler is associated with the event. + :::code language="csharp" source="~/snippets/csharp/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.cs" id="Snippet67"::: - :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: - + :::code language="vb" source="~/snippets/visualbasic/System.ComponentModel/CollectionChangeEventArgs/Overview/EventExamples.vb" id="Snippet67"::: + ]]> diff --git a/xml/System.Windows.Forms/UnhandledExceptionMode.xml b/xml/System.Windows.Forms/UnhandledExceptionMode.xml index a80265af10e..5c5d81944db 100644 --- a/xml/System.Windows.Forms/UnhandledExceptionMode.xml +++ b/xml/System.Windows.Forms/UnhandledExceptionMode.xml @@ -23,25 +23,25 @@ Defines where a Windows Forms application should send unhandled exceptions. - . - + . + > [!NOTE] -> In the .NET Framework version 2.0, the common language runtime behavior changed to allow unhandled exceptions to propagate up the call stack. This behavior can be disabled via the application configuration file. For more information, see [Exceptions in Managed Threads](/dotnet/standard/threading/exceptions-in-managed-threads). - - - -## Examples - The following code example sets event handlers for both errors that occur on Windows Forms threads and errors that occur on other threads. It sets so that all errors are handled by the application, regardless of the settings in the application's user configuration file. It uses the event for the former, and the event for the latter. Since cannot prevent an application from terminating, the example simply logs the error in the system Event Log prior to termination. - - This sample assumes that you have defined two controls, `button1` and `button2`, on your class. - +> In the .NET Framework version 2.0, the common language runtime behavior changed to allow unhandled exceptions to propagate up the call stack. This behavior can be disabled via the application configuration file. For more information, see [Exceptions in Managed Threads](/dotnet/standard/threading/exceptions-in-managed-threads). + + + +## Examples + The following code example sets event handlers for both errors that occur on Windows Forms threads and errors that occur on other threads. It sets so that all errors are handled by the application, regardless of the settings in the application's user configuration file. It uses the event for the former, and the event for the latter. Since cannot prevent an application from terminating, the example simply logs the error in the system Event Log prior to termination. + + This sample assumes that you have defined two controls, `button1` and `button2`, on your class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic Application.ThreadException Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Application/SetUnhandledExceptionMode/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Application/SetUnhandledExceptionMode/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Application/SetUnhandledExceptionMode/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Windows.Forms/UpDownBase.xml b/xml/System.Windows.Forms/UpDownBase.xml index acb288cccb6..1e466f58c49 100644 --- a/xml/System.Windows.Forms/UpDownBase.xml +++ b/xml/System.Windows.Forms/UpDownBase.xml @@ -54,11 +54,11 @@ class links the two controls and allows the user to change the display in the text box by clicking the up or down buttons or by entering the appropriate type of value directly into the text box. Use the spin box in cases where you want to limit the list of values a user can select, similar to a list box or combo box. Depending upon the type of list you want to display, the advantage to using a spin box is that it allows you to quickly set a range of valid values, rather than adding items one at a time. Implementing a spin box requires less data validation than a text box, as you can limit the data type when you derive a class from . An example of this is the class, which limits the values to the numeric type and uses a and property to validate the data. + A spin box consists of a text box and a small vertical scroll bar, commonly referred to as a spin button control. The class links the two controls and allows the user to change the display in the text box by clicking the up or down buttons or by entering the appropriate type of value directly into the text box. Use the spin box in cases where you want to limit the list of values a user can select, similar to a list box or combo box. Depending upon the type of list you want to display, the advantage to using a spin box is that it allows you to quickly set a range of valid values, rather than adding items one at a time. Implementing a spin box requires less data validation than a text box, as you can limit the data type when you derive a class from . An example of this is the class, which limits the values to the numeric type and uses a and property to validate the data. To allow the user to use the arrow keys to change the contents of a spin box, set the property to `true`. To restrict the user to values you specify, set the property to `true`. To control the alignment of text in the spin box, set the property. To set the alignment of the up and down buttons in relation to the text box portion of the control, set the property to either or . - The and methods, when overridden, handle the clicking of the up or down buttons. When overridden, the and methods validate the value (either selected or entered) and update the text displayed in the spin box. If the value fails validation, use the method to select the text that is not valid. This allows the user to quickly correct the text by simply typing in a new value without having to manually select or delete the existing text. + The and methods, when overridden, handle the clicking of the up or down buttons. When overridden, the and methods validate the value (either selected or entered) and update the text displayed in the spin box. If the value fails validation, use the method to select the text that is not valid. This allows the user to quickly correct the text by simply typing in a new value without having to manually select or delete the existing text. Starting with the .NET Framework 4.6, the control will be resized based on the system DPI setting when the app.config file contains the following entry: @@ -365,7 +365,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of a type that inherits from , such as a or . Then name the instance `UpDownBase1` and ensure that the event handler is associated with the event. @@ -1155,7 +1155,7 @@ of the maximum size will always be 0. + Regardless of the specified value, the of the maximum size will always be 0. ]]> @@ -1445,7 +1445,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1490,7 +1490,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1534,7 +1534,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1579,7 +1579,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1625,7 +1625,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1667,11 +1667,11 @@ method will raise the event. + If a double-click occurs, the method will raise the event. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1714,11 +1714,11 @@ or method is called. + If the spin box (also known as an up-down control) has focus when this event occurs, the direction the user scrolled the mouse wheel is determined, and either the or method is called. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1764,7 +1764,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1817,11 +1817,11 @@ property is set to `true` and the user presses the UP ARROW key, the method is called. Likewise, if the user presses the DOWN ARROW key, the method is called. + If the property is set to `true` and the user presses the UP ARROW key, the method is called. Likewise, if the user presses the DOWN ARROW key, the method is called. Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1880,7 +1880,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1938,7 +1938,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -1996,7 +1996,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2052,7 +2052,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2112,7 +2112,7 @@ ## Examples - The following code example uses the derived class and sets some of its properties derived from . This code requires that you have a control, two controls, and three controls created on a form. Label the controls and . Label the controls , , and . The code allows you to change the property values at run time and see how each affects the appearance and behavior of the spin box. Add the following items to the combo box labeled BorderStyle: `None`, `Fixed3D`, and `FixedSingle`. Add the following items to the combo box labeled TextAlign: `Left`, `Right`, and `Center`. + The following code example uses the derived class and sets some of its properties derived from . This code requires that you have a control, two controls, and three controls created on a form. Label the controls and . Label the controls , , and . The code allows you to change the property values at run time and see how each affects the appearance and behavior of the spin box. Add the following items to the combo box labeled BorderStyle: `None`, `Fixed3D`, and `FixedSingle`. Add the following items to the combo box labeled TextAlign: `Left`, `Right`, and `Center`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic UpDownBase.BorderStyle Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/UpDownBase/PreferredHeight/source.cs" id="Snippet1"::: @@ -2161,15 +2161,15 @@ property to `true`, you will eliminate the need for much validation of the property. The user will be restricted to the use of the up and down buttons to change the values. It will only allow them to select values you specify. + By setting the property to `true`, you will eliminate the need for much validation of the property. The user will be restricted to the use of the up and down buttons to change the values. It will only allow them to select values you specify. > [!NOTE] -> In the derived class , the behavior described is slightly different. When is set to `true` and a key is pressed, the control selects the first item in the collection where the first character matches the key pressed. +> In the derived class , the behavior described is slightly different. When is set to `true` and a key is pressed, the control selects the first item in the collection where the first character matches the key pressed. ## Examples - The following code example uses the derived class and sets some of its properties derived from . This code requires that you have a control, two controls, and three controls created on a form. Label the controls and . Label the controls , , and . The code allows you to change the property values at run time and see how each affects the appearance and behavior of the spin box. Add the following items to the combo box labeled BorderStyle: `None`, `Fixed3D`, and `FixedSingle`. Add the following items to the combo box labeled TextAlign: `Left`, `Right`, and `Center`. + The following code example uses the derived class and sets some of its properties derived from . This code requires that you have a control, two controls, and three controls created on a form. Label the controls and . Label the controls , , and . The code allows you to change the property values at run time and see how each affects the appearance and behavior of the spin box. Add the following items to the combo box labeled BorderStyle: `None`, `Fixed3D`, and `FixedSingle`. Add the following items to the combo box labeled TextAlign: `Left`, `Right`, and `Center`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic UpDownBase Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/UpDownBase/Overview/source.cs" id="Snippet1"::: @@ -2249,12 +2249,12 @@ method can be used when the spin box gets focus, or when the property fails data validation. When adding the validation code for the method in a derived class, call the method when validation fails. + The method can be used when the spin box gets focus, or when the property fails data validation. When adding the validation code for the method in a derived class, call the method when validation fails. ## Examples - The following code example uses the derived class . This code requires that a control and a have been created on a form and the namespace has been added as a reference. On the event for the button, the point size of text in the control increases. This prompts the control to adjust its property so that all the text is visible in the control. After the user enters a new value and leaves the control, the text is converted to a numeric value from a string value and validated to be between the and values. If the value is not valid, a is displayed with the error, and the method will select the text so the user can enter a new value. + The following code example uses the derived class . This code requires that a control and a have been created on a form and the namespace has been added as a reference. On the event for the button, the point size of text in the control increases. This prompts the control to adjust its property so that all the text is visible in the control. After the user enters a new value and leaves the control, the text is converted to a numeric value from a string value and validated to be between the and values. If the value is not valid, a is displayed with the error, and the method will select the text so the user can enter a new value. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic UpDownBase.Text Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/UpDownBase/Select/source.cs" id="Snippet1"::: @@ -2334,12 +2334,12 @@ method is called if the property is set while the property is set to `true`. The method is called if the property is set while the property is set to `false`. + The method is called if the property is set while the property is set to `true`. The method is called if the property is set while the property is set to `false`. ## Examples - The following code example uses the derived class . This code requires that a control and a have been created on a form and the namespace has been added as a reference. On the event for the button, the point size of text in the control increases. This prompts the control to adjust its property so all the text is visible in the control. After the user enters a new value and leaves the control, the text is converted to a numeric value from a string value and validated to be between the and values. If the value is not valid, a is displayed with the error, and the method will select the text so the user can enter a new value. + The following code example uses the derived class . This code requires that a control and a have been created on a form and the namespace has been added as a reference. On the event for the button, the point size of text in the control increases. This prompts the control to adjust its property so all the text is visible in the control. After the user enters a new value and leaves the control, the text is converted to a numeric value from a string value and validated to be between the and values. If the value is not valid, a is displayed with the error, and the method will select the text so the user can enter a new value. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic UpDownBase.Text Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/UpDownBase/Select/source.cs" id="Snippet1"::: @@ -2577,7 +2577,7 @@ property is set while the property is set to `true`, the method is called. If the property is set while the property is set to `false`, the method is called. + If the property is set while the property is set to `true`, the method is called. If the property is set while the property is set to `false`, the method is called. ]]> diff --git a/xml/System.Windows.Forms/UpDownEventArgs.xml b/xml/System.Windows.Forms/UpDownEventArgs.xml index 5766bc3cbd1..afb27c68bfd 100644 --- a/xml/System.Windows.Forms/UpDownEventArgs.xml +++ b/xml/System.Windows.Forms/UpDownEventArgs.xml @@ -25,11 +25,11 @@ Provides data for controls that derive from the control. - is used when the user clicks a button on a control that derives from the control. The contains information on which button was clicked. - + is used when the user clicks a button on a control that derives from the control. The contains information on which button was clicked. + ]]> @@ -69,17 +69,17 @@ The button that was clicked on the control. Initializes a new instance of the class. - @@ -119,17 +119,17 @@ Gets a value that represents which button the user clicked. A value that represents which button the user clicked. - returns. - -|Value|Description| -|-----------|-----------------| -|0|Neither button was clicked.| -|1|The up button was clicked.| -|2|The down button was clicked.| - + returns. + +|Value|Description| +|-----------|-----------------| +|0|Neither button was clicked.| +|1|The up button was clicked.| +|2|The down button was clicked.| + ]]> diff --git a/xml/System.Windows.Forms/UserControl.xml b/xml/System.Windows.Forms/UserControl.xml index 06c7ae366c0..5fa73e51a85 100644 --- a/xml/System.Windows.Forms/UserControl.xml +++ b/xml/System.Windows.Forms/UserControl.xml @@ -269,7 +269,7 @@ property will function as though was set to . All controls that recognize the property will, by default, grow to fit available space, but will not shrink below the value specified by the property. + Controls that do not recognize the property will function as though was set to . All controls that recognize the property will, by default, grow to fit available space, but will not shrink below the value specified by the property. ]]> @@ -359,7 +359,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `UserControl1`. Then ensure that the event handler is associated with the event. @@ -529,17 +529,17 @@ You can use this event to perform tasks such as allocating resources used by the control. > [!NOTE] -> If the is part of an MDI child form, the event will occur each time the child form is shown. In this case, you should put any one-time initialization code in the instead of a event handler. +> If the is part of an MDI child form, the event will occur each time the child form is shown. In this case, you should put any one-time initialization code in the instead of a event handler. > [!CAUTION] -> The event occurs when the handle for the is created. In some circumstances, this can cause the event to occur more than one time. For example, the event occurs when the is loaded, and again if the handle is recreated. (One way that a handle is recreated is by calling the method.) To account for the event occurring more than one time, you should put any one time initialization code in the constructor instead of a event handler. In addition, you should not add data bindings to the in a event handler. +> The event occurs when the handle for the is created. In some circumstances, this can cause the event to occur more than one time. For example, the event occurs when the is loaded, and again if the handle is recreated. (One way that a handle is recreated is by calling the method.) To account for the event occurring more than one time, you should put any one time initialization code in the constructor instead of a event handler. In addition, you should not add data bindings to the in a event handler. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `UserControl1`. Then ensure that the event handler is associated with the event. @@ -591,7 +591,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -644,7 +644,7 @@ Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> diff --git a/xml/System.Windows.Forms/VScrollBar.xml b/xml/System.Windows.Forms/VScrollBar.xml index 81f804db388..709d85af0f8 100644 --- a/xml/System.Windows.Forms/VScrollBar.xml +++ b/xml/System.Windows.Forms/VScrollBar.xml @@ -44,7 +44,7 @@ ## Remarks Most controls that need scroll bars already provide them and do not require this control. This is true of a multiline control, a , and a , for example. - You can use this control to implement scrolling in containers that do not provide their own scroll bars such as a or for user input of numeric data. The numeric data can be displayed in a control or used in code. The and properties determine the range of values the user can select. The property determines the effect of clicking within the scroll bar but outside the scroll box. The property determines the effect of clicking the scroll arrows at each end of the control. + You can use this control to implement scrolling in containers that do not provide their own scroll bars such as a or for user input of numeric data. The numeric data can be displayed in a control or used in code. The and properties determine the range of values the user can select. The property determines the effect of clicking within the scroll bar but outside the scroll box. The property determines the effect of clicking the scroll arrows at each end of the control. diff --git a/xml/System.Windows.Forms/ValidationConstraints.xml b/xml/System.Windows.Forms/ValidationConstraints.xml index a355123733b..c8098dcae82 100644 --- a/xml/System.Windows.Forms/ValidationConstraints.xml +++ b/xml/System.Windows.Forms/ValidationConstraints.xml @@ -32,11 +32,11 @@ will validate all enabled controls in a container, such as a form. Use this enumeration to restrict the types of controls whose event is raised. + By default, will validate all enabled controls in a container, such as a form. Use this enumeration to restrict the types of controls whose event is raised. You can combine these enumerated values together with a bitwise OR operation. Combining parameters with a bitwise OR operator will result in a logical AND operation. For example, calling `ValidateChildren(ValidationConstraints.ImmediateChildren | ValidationConstraints.Enabled)` will only raise the event on controls that are both immediate children of the container AND are enabled. - If you do not specify ImmediateChildren when you call , the method will require that you validate all child controls in the control hierarchy. + If you do not specify ImmediateChildren when you call , the method will require that you validate all child controls in the control hierarchy. diff --git a/xml/System.Windows.Forms/WebBrowser+WebBrowserSite.xml b/xml/System.Windows.Forms/WebBrowser+WebBrowserSite.xml index 94f92d5da3c..48062fbf671 100644 --- a/xml/System.Windows.Forms/WebBrowser+WebBrowserSite.xml +++ b/xml/System.Windows.Forms/WebBrowser+WebBrowserSite.xml @@ -33,16 +33,16 @@ Represents the host window of a control. - control, which is a managed wrapper for the ActiveX control. You can use this extensibility, for example, to customize the browser shortcut menu and shortcut keys or to provide a custom security configuration for hosted documents. - - To use this feature, implement classes that inherit from the and classes. The unmanaged `WebBrowser` ActiveX control uses the protected method to retrieve extensibility interfaces implemented by the class. Override the method to return an instance of your own class that inherits from the class. The class provides a default implementations of the OLE `IDocHostUIHandler` interface. For more information, see [IDocHostUIHandler Interface](https://go.microsoft.com/fwlink/?LinkId=98895). You can provide your own implementation of this interface or implement any other `WebBrowser` ActiveX control interface in order to customize the behavior of the control. For more information, see [WebBrowser Control](https://go.microsoft.com/fwlink/?LinkID=98894). - + control, which is a managed wrapper for the ActiveX control. You can use this extensibility, for example, to customize the browser shortcut menu and shortcut keys or to provide a custom security configuration for hosted documents. + + To use this feature, implement classes that inherit from the and classes. The unmanaged `WebBrowser` ActiveX control uses the protected method to retrieve extensibility interfaces implemented by the class. Override the method to return an instance of your own class that inherits from the class. The class provides a default implementations of the OLE `IDocHostUIHandler` interface. For more information, see [IDocHostUIHandler Interface](https://go.microsoft.com/fwlink/?LinkId=98895). You can provide your own implementation of this interface or implement any other `WebBrowser` ActiveX control interface in order to customize the behavior of the control. For more information, see [WebBrowser Control](https://go.microsoft.com/fwlink/?LinkID=98894). + > [!NOTE] -> If you provide your own implementation for any `IDocHostUIHandler` members, you must implement all the members of that interface. - +> If you provide your own implementation for any `IDocHostUIHandler` members, you must implement all the members of that interface. + ]]> WebBrowser Control diff --git a/xml/System.Windows.Forms/WebBrowser.xml b/xml/System.Windows.Forms/WebBrowser.xml index d1eae654d77..a287b448680 100644 --- a/xml/System.Windows.Forms/WebBrowser.xml +++ b/xml/System.Windows.Forms/WebBrowser.xml @@ -74,18 +74,18 @@ The control has several properties, methods, and events related to navigation. The following members let you navigate the control to a specific URL, move backward and forward through the navigation history list, and load the home page and search page of the current user: -- -- -- -- -- -- +- +- +- +- +- +- If the navigation is unsuccessful, a page indicating the problem is displayed. Navigation with any of these members causes the , , and events to occur at different stages of navigation. - These and other members, such as the and methods, let you implement user interface controls in your application similar to those in Internet Explorer. Some members are useful even when you don't want to display the control on your form. For example, you can use the method to print the latest version of a Web page without displaying the page to the user. + These and other members, such as the and methods, let you implement user interface controls in your application similar to those in Internet Explorer. Some members are useful even when you don't want to display the control on your form. For example, you can use the method to print the latest version of a Web page without displaying the page to the user. - The control also lets you display content that you create in your application or you retrieve from a database or resource file. Use the or property to get or set the contents of the current document as a string or data stream. + The control also lets you display content that you create in your application or you retrieve from a database or resource file. Use the or property to get or set the contents of the current document as a string or data stream. You can also manipulate the contents of a Web page through the property, which contains an object that provides managed access to the HTML document object model (DOM) for the current page. This property is useful, when used in combination with the property, to implement two-way communication between your application code and dynamic HTML (DHTML) code in a Web page, letting you combine Web-based controls and Windows Forms controls in a single user interface. You can use the property to call scripting code methods from your application. Your scripting code can access your application through the `window.external` object, which is a built-in DOM object provided for host access, and which maps to the object that you specify for the property. @@ -189,7 +189,7 @@ , or property, but will prevent all subsequent navigation. + This property does not prevent you from loading an initial page by setting the , or property, but will prevent all subsequent navigation. ]]> @@ -234,7 +234,7 @@ ## Remarks By default, the control automatically navigates to documents that are dropped onto it. This behavior is useful when you use the control as a generic browser. If you use the control to display content designed specifically for your application, such as HTML-based user assistance, set the property to `false` to prevent the display of other content. This is particularly useful when you want to conceal the fact that you are using the control, for example to create a user interface that seamlessly combines Web-based controls with Windows Forms controls. - You can disable other standard browser features by setting the and properties to `false`. + You can disable other standard browser features by setting the and properties to `false`. > [!NOTE] > This property is not related to the property and does not cause drag-and-drop events such as the event to occur for the control. @@ -337,7 +337,7 @@ control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the previous page in this history, if one is available. Use the property to determine whether navigation history is available and contains a previous page. If this property is `true`, the method will succeed. Otherwise, calling the method will return a value of `false` and no navigation will occur. + The control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the previous page in this history, if one is available. Use the property to determine whether navigation history is available and contains a previous page. If this property is `true`, the method will succeed. Otherwise, calling the method will return a value of `false` and no navigation will occur. You can also handle the event to receive a notification when the property changes. Handling this event is useful, for example, to change the enabled state of a **Back** button when the control navigates to or leaves the beginning of the navigation history. @@ -395,7 +395,7 @@ control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the previous page in this history, if one is available. The property indicates whether navigation history is available and contains a previous page. Handle the event to receive a notification when the property changes. Handling this event is useful, for example, to change the enabled state of a **Back** button when the control navigates to or leaves the beginning of the navigation history. + The control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the previous page in this history, if one is available. The property indicates whether navigation history is available and contains a previous page. Handle the event to receive a notification when the property changes. Handling this event is useful, for example, to change the enabled state of a **Back** button when the control navigates to or leaves the beginning of the navigation history. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -463,16 +463,16 @@ control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the next page in this history, if one is available as a result of a previous backward navigation. If this property is `true`, the method will succeed. Otherwise, calling the method will return a value of `false` and no navigation will occur. + The control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the next page in this history, if one is available as a result of a previous backward navigation. If this property is `true`, the method will succeed. Otherwise, calling the method will return a value of `false` and no navigation will occur. - Use the property to determine whether navigation history is available and contains a page located after the current one, allowing the method to succeed. + Use the property to determine whether navigation history is available and contains a page located after the current one, allowing the method to succeed. You can also handle the event to receive a notification when the property changes. Handling this event is useful, for example, to change the enabled state of a **Forward** button when the control navigates to or leaves the end of the navigation history. ## Examples - The following code example demonstrates how to use a handler for the event to implement a **Forward** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonForward`. + The following code example demonstrates how to use a handler for the event to implement a **Forward** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonForward`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -523,14 +523,14 @@ control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the next page in this history, if one is available as a result of a previous backward navigation. The property indicates whether navigation history is available and contains a page located after the current one, allowing the method to succeed. Handle the event to receive a notification when the property changes. Handling this event is useful, for example, to change the enabled state of a **Forward** button when the control navigates to or leaves the end of the navigation history. + The control maintains a history list of all the Web pages visited during a browsing session. The method navigates the control to the next page in this history, if one is available as a result of a previous backward navigation. The property indicates whether navigation history is available and contains a page located after the current one, allowing the method to succeed. Handle the event to receive a notification when the property changes. Handling this event is useful, for example, to change the enabled state of a **Forward** button when the control navigates to or leaves the end of the navigation history. For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates how to use the method to implement a **Forward** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonForward`. + The following code example demonstrates how to use the method to implement a **Forward** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonForward`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -652,7 +652,7 @@ ## Remarks This method is useful if you are familiar with OLE development using the unmanaged `WebBrowser` ActiveX control and you want to extend the functionality of the Windows Forms control, which is a managed wrapper for the ActiveX control. You can use this extensibility, for example, to customize the browser shortcut menu and shortcut keys or to provide a custom security configuration for hosted documents. - To use this feature, implement classes that inherit from the and classes. The unmanaged `WebBrowser` ActiveX control uses the protected method to retrieve extensibility interfaces implemented by the class. Override the method to return an instance of your own class that inherits from the class. The class provides default implementations of the OLE `IDocHostUIHandler` interface. You can provide your own implementation of this interface or implement any other `WebBrowser` ActiveX control interface in order to customize the behavior of the control. + To use this feature, implement classes that inherit from the and classes. The unmanaged `WebBrowser` ActiveX control uses the protected method to retrieve extensibility interfaces implemented by the class. Override the method to return an instance of your own class that inherits from the class. The class provides default implementations of the OLE `IDocHostUIHandler` interface. You can provide your own implementation of this interface or implement any other `WebBrowser` ActiveX control interface in order to customize the behavior of the control. > [!NOTE] > If you provide your own implementation for any `IDocHostUIHandler` members, you must implement all the members of that interface. @@ -762,7 +762,7 @@ ## Examples The following code example illustrates the use of this method in a class derived from that supplements the standard events with the `NavigateError` event from the OLE `DWebBrowserEvents2` interface. - For the complete code example, see . + For the complete code example, see . :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/WebBrowser/CreateSink/WB2.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/WebBrowser/CreateSink/WB2.vb" id="Snippet10"::: @@ -850,7 +850,7 @@ ## Remarks Use this property when you want to access the contents of a Web page displayed in the control through the HTML document object model (DOM). This is useful, for example, when you want to use Web-based controls in your Windows Forms application. - You can use this property, in combination with the property, to implement two-way communication between a Web page displayed in the control and your application. Use the method to call script methods implemented in a Web page from your client application code. Your scripting code can access your application through the `window.external` object, which is a built-in DOM object provided for host access, and which maps to an object that you specify for the property. + You can use this property, in combination with the property, to implement two-way communication between a Web page displayed in the control and your application. Use the method to call script methods implemented in a Web page from your client application code. Your scripting code can access your application through the `window.external` object, which is a built-in DOM object provided for host access, and which maps to an object that you specify for the property. To access the contents of a Web page as a string, use the property. To access the contents of a Web page as a , use the property. @@ -910,23 +910,23 @@ ## Remarks The control navigates to a new document whenever one of the following properties is set or methods is called: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- - Handle the event to receive notification when the new document finishes loading. When the event occurs, the new document is fully loaded, which means you can access its contents through the , , or property. + Handle the event to receive notification when the new document finishes loading. When the event occurs, the new document is fully loaded, which means you can access its contents through the , , or property. To receive notification before navigation begins, handle the event. Handling this event lets you cancel navigation if certain conditions have not been met, for example, when the user has not completely filled out a form. Handle the event to receive notification when the control finishes navigation and has begun loading the document at the new location. @@ -1062,7 +1062,7 @@ Use this property when you want to manipulate the contents of an HTML page displayed in the control using string processing tools. You can use this property, for example, to load pages from a database or to analyze pages using regular expressions. When you set this property, the control automatically navigates to the about:blank URL before loading the specified text. This means that the , , and events occur when you set this property, and the value of the property is no longer meaningful. > [!NOTE] -> This property contains the text of the current document, even if another document has been requested. If you set the value of this property and then immediately retrieve it again, the value retrieved may be different than the value set if the control has not had time to load the new content. You can retrieve the new value in a event handler. Alternatively, you can block the thread until the document is loaded by calling the method in a loop until the property returns the value that you originally set it to. +> This property contains the text of the current document, even if another document has been requested. If you set the value of this property and then immediately retrieve it again, the value retrieved may be different than the value set if the control has not had time to load the new content. You can retrieve the new value in a event handler. Alternatively, you can block the thread until the document is loaded by calling the method in a loop until the property returns the value that you originally set it to. To access the contents of a Web page as a , use the property. You can also access the page contents using the HTML document object model (DOM) through the property. @@ -1360,7 +1360,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -1410,7 +1410,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -1488,12 +1488,12 @@ control maintains a history list of all the Web pages visited during a browsing session. You can use the method to implement a **Back** button similar to the one in Internet Explorer, which will allow your users to return to a previous page in the navigation history. + The control maintains a history list of all the Web pages visited during a browsing session. You can use the method to implement a **Back** button similar to the one in Internet Explorer, which will allow your users to return to a previous page in the navigation history. Use the property to determine whether the navigation history is available and contains a previous page. Handle the event to receive a notification when the property value changes. Handling this event is useful, for example, to change the enabled state of a **Back** button when the control navigates to or leaves the beginning of the navigation history. ## Examples - The following code example demonstrates how to use the method to implement a **Back** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `backButton`. + The following code example demonstrates how to use the method to implement a **Back** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `backButton`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -1544,14 +1544,14 @@ control maintains a history list of all the Web pages visited during a browsing session. You can use the method to implement a **Forward** button similar to the one in Internet Explorer, allowing your users to return to the next page in the navigation history after navigating backward. + The control maintains a history list of all the Web pages visited during a browsing session. You can use the method to implement a **Forward** button similar to the one in Internet Explorer, allowing your users to return to the next page in the navigation history after navigating backward. Use the property to determine whether the navigation history is available and contains a page located after the current one. Handle the event to receive a notification when the property value changes. Handling this event is useful, for example, to change the enabled state of a **Forward** button when the control navigates to or leaves the end of the navigation history. ## Examples - The following code example demonstrates how to use the method to implement a **Forward** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonForward`. + The following code example demonstrates how to use the method to implement a **Forward** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonForward`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -1603,7 +1603,7 @@ You can use this method to implement a **Home** button similar to the one in Internet Explorer. The user can specify a home page in the **Internet Options** dialog box, which is available from Control Panel or from the **Tools** menu in Internet Explorer. ## Examples - The following code example demonstrates how to use the method to implement a **Home** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonHome`. + The following code example demonstrates how to use the method to implement a **Home** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonHome`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -1656,10 +1656,10 @@ ## Remarks You can use this method to implement a search feature similar to the one in Internet Explorer. The user can specify a default search page in the **Internet Options** dialog box, which is available from Control Panel or from the **Tools** menu in Internet Explorer. - The default search page is stored in the registry under the `HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Search Page` registry key. With later versions of Internet Explorer, this registry key must be modified in order to change the default search page used by this method. To use a search page other than the default, call the method or specify the property. + The default search page is stored in the registry under the `HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Search Page` registry key. With later versions of Internet Explorer, this registry key must be modified in order to change the default search page used by this method. To use a search page other than the default, call the method or specify the property. ## Examples - The following code example demonstrates how to use the method to implement a **Search** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonSearch`. + The following code example demonstrates how to use the method to implement a **Search** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonSearch`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -1723,7 +1723,7 @@ method to halt the current navigation before the new document is fully loaded. Use the property to determine the exact navigation state of the control. The property value is false when the property value is . + If this property is `true`, you can use the method to halt the current navigation before the new document is fully loaded. Use the property to determine the exact navigation state of the control. The property value is false when the property value is . ]]> @@ -1825,7 +1825,7 @@ ## Remarks By default, the control displays a shortcut menu when a user right-clicks it. This behavior is useful when you use the control as a generic browser. If you want to conceal the fact that you are using the control, for example to create a user interface that seamlessly combines Web-based controls with Windows Forms controls, set the property to false. - You can disable other standard browser features by setting the and properties to false. + You can disable other standard browser features by setting the and properties to false. @@ -1883,11 +1883,11 @@ control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control navigates to the specified URI and adds it to the end of the history list. Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. + The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control navigates to the specified URI and adds it to the end of the history list. Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. - You can use the method to implement an address bar similar to the one in Internet Explorer. + You can use the method to implement an address bar similar to the one in Internet Explorer. ]]> @@ -1940,14 +1940,14 @@ control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control navigates to the specified URI and adds it to the end of the history list. Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. + The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control navigates to the specified URI and adds it to the end of the history list. Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. - You can use the method to implement an address bar similar to the one in Internet Explorer. + You can use the method to implement an address bar similar to the one in Internet Explorer. ## Examples - The following code example demonstrates how to use the method to implement an address bar for the control. This example requires that your form contains a control called `webBrowser1`, a control called `TextBoxAddress`, and a control called `ButtonGo`. When you type a URL into the text box and press ENTER or click the **Go** button, the control navigates to the URL specified. When you navigate by clicking a hyperlink, the text box automatically updates to display the current URL. + The following code example demonstrates how to use the method to implement an address bar for the control. This example requires that your form contains a control called `webBrowser1`, a control called `TextBoxAddress`, and a control called `ButtonGo`. When you type a URL into the text box and press ENTER or click the **Go** button, the control navigates to the URL specified. When you navigate by clicking a hyperlink, the text box automatically updates to display the current URL. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -2005,7 +2005,7 @@ ## Remarks The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload with a `newWindow` parameter value of `false`, the control navigates to the specified URI normally and adds the URI to the end of the history list. When you call this overload with a `newWindow` parameter value of `true`, the control loads the document at the specified URI into a new Internet Explorer window, which maintains its own navigation history. You can handle the event to receive notification before a new browser window is opened, allowing you to cancel the action if necessary. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page or loads a page into a separate browser window, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. When a page is loaded into a separate Internet Explorer window, the user can retrieve the latest version by clicking the **Refresh** button. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page or loads a page into a separate browser window, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. When a page is loaded into a separate Internet Explorer window, the user can retrieve the latest version by clicking the **Refresh** button. ]]> @@ -2062,9 +2062,9 @@ ## Remarks The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control loads the document at the specified URI into the Web page frame with the specified name, and adds the URI to the end of the history list. If the frame name specified is invalid, the document is loaded into a new Internet Explorer window. - Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. + Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. ]]> @@ -2116,7 +2116,7 @@ ## Remarks The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload with a `newWindow` parameter value of `false`, the control navigates to the specified URI normally and adds the URI to the end of the history list. When you call this overload with a `newWindow` parameter value of `true`, the control loads the document at the specified URI into a new Internet Explorer window, which maintains its own navigation history. You can handle the event to receive notification before a new browser window is opened, allowing you to cancel the action if necessary. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page or loads a page into a separate browser window, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. When a page is loaded into a separate Internet Explorer window, the user can retrieve the latest version by clicking the **Refresh** button. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page or loads a page into a separate browser window, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. When a page is loaded into a separate Internet Explorer window, the user can retrieve the latest version by clicking the **Refresh** button. ]]> @@ -2169,9 +2169,9 @@ ## Remarks The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control loads the document at the specified URI into the Web page frame with the specified name, and adds the URI to the end of the history list. If the frame name specified is invalid, the document is loaded into a new Internet Explorer window. - Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. + Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. ]]> @@ -2234,9 +2234,9 @@ ## Remarks The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control loads the document at the specified URI into the Web page frame with the specified name, and adds the URI to the end of the history list. If the frame name specified is invalid, the document is loaded into a new Internet Explorer window. - Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. + Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. ]]> @@ -2291,9 +2291,9 @@ ## Remarks The control maintains a history list of all the Web pages visited during a browsing session. When you call this overload, the control loads the document at the specified URI into the Web page frame with the specified name, and adds the URI to the end of the history list. If the frame name specified is invalid, the document is loaded into a new Internet Explorer window. - Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. + Use the method to return the control to a previous page in the navigation history. Use the method to return to a later page in the navigation history after navigating backward. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. ]]> @@ -2340,16 +2340,16 @@ ## Remarks The control navigates to a new document whenever one of the following properties is set or methods is called: -- -- -- -- -- -- -- -- +- +- +- +- +- +- +- +- - Handle the event to receive notification when the control has navigated to a new document. When the event occurs, the new document has begun loading, which means you can access the loaded content through the , , and properties. Handle the event to receive notification when the control finishes loading the new document. + Handle the event to receive notification when the control has navigated to a new document. When the event occurs, the new document has begun loading, which means you can access the loaded content through the , , and properties. Handle the event to receive notification when the control finishes loading the new document. You can also receive notification before navigation begins by handling the event. Handling this event lets you cancel navigation if certain conditions have not been met, for example, the user has not completely filled out a form. @@ -2413,21 +2413,21 @@ ## Remarks The control navigates to a new document whenever one of the following properties is set or methods is called: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- You can handle the event to cancel navigation if certain conditions have not been met, for example, when the user has not completely filled out a form. To cancel navigation, set the property of the object passed to the event handler to `true`. You can also use this object to retrieve the URL of the new document through the property. If the new document will be displayed in a Web page frame, you can retrieve the name of the frame through the property. @@ -2494,7 +2494,7 @@ control opens a separate browser window when the appropriate overload of the method is called or when the user clicks the **Open in New Window** option of the browser shortcut menu when the mouse pointer hovers over a hyperlink. You can disable the shortcut menu by setting the property to false. + The control opens a separate browser window when the appropriate overload of the method is called or when the user clicks the **Open in New Window** option of the browser shortcut menu when the mouse pointer hovers over a hyperlink. You can disable the shortcut menu by setting the property to false. The event occurs before the new browser window is opened. You can handle this event, for example, to prevent the window from opening when certain conditions have not been met. @@ -2503,7 +2503,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -2567,7 +2567,7 @@ You can set this property to any COM-visible object for which you want its public properties and methods available to scripting code. You can make a class COM-visible by marking it with the . - To call functions defined in your Web page from your client application code, use the method of the object you can retrieve from the property. + To call functions defined in your Web page from your client application code, use the method of the object you can retrieve from the property. @@ -2623,7 +2623,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2669,7 +2669,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2715,7 +2715,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2765,7 +2765,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2811,7 +2811,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2857,7 +2857,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2902,7 +2902,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2948,7 +2948,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -2994,7 +2994,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3039,7 +3039,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3085,7 +3085,7 @@ ## Remarks Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](/dotnet/standard/events/). - The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. ]]> @@ -3222,10 +3222,10 @@ method. To display the **Page Setup** dialog box, which lets your users specify header and footer values and other page settings, use the method. To display the **Print Preview** dialog box, use the method. + You can use this method to implement a **Print** button similar to the one in Internet Explorer. This method prints the current document without requiring further user input. To display the **Print** dialog box prior to printing, use the method. To display the **Page Setup** dialog box, which lets your users specify header and footer values and other page settings, use the method. To display the **Print Preview** dialog box, use the method. ## Examples - The following code example demonstrates how to use the method to implement a **Print** button for the control that's similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonPrint`. + The following code example demonstrates how to use the method to implement a **Print** button for the control that's similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonPrint`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.WebBrowser/CPP/form1.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripMenuItem/ShortcutKeys/form1.cs" id="Snippet13"::: @@ -3274,7 +3274,7 @@ For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -3380,13 +3380,13 @@ control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. The method forces the control to reload the current page by downloading it, ensuring that the control displays the latest version. You can use this method to implement a **Refresh** button similar to the one in Internet Explorer. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. The method forces the control to reload the current page by downloading it, ensuring that the control displays the latest version. You can use this method to implement a **Refresh** button similar to the one in Internet Explorer. > [!NOTE] -> A document refresh simply reloads the current page, so the , , and events do not occur when you call the method. +> A document refresh simply reloads the current page, so the , , and events do not occur when you call the method. ## Examples - The following code example demonstrates how to use the method to implement a **Refresh** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonRefresh`. + The following code example demonstrates how to use the method to implement a **Refresh** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonRefresh`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -3436,10 +3436,10 @@ control stores recently visited Web pages in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. The method forces the control to reload the current page. The type of reload depends on the value specified. If you call the method with the value, the latest version of the document is downloaded. If you use the value, the latest version is downloaded only if the current document has expired. If you use the value, the server sends a copy of the document stored in its own cache. + The control stores recently visited Web pages in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. The method forces the control to reload the current page. The type of reload depends on the value specified. If you call the method with the value, the latest version of the document is downloaded. If you use the value, the latest version is downloaded only if the current document has expired. If you use the value, the server sends a copy of the document stored in its own cache. > [!NOTE] -> A document refresh simply reloads the current page, so the , , and events do not occur when you call the method. +> A document refresh simply reloads the current page, so the , , and events do not occur when you call the method. ]]> @@ -3490,7 +3490,7 @@ Set this property to `false` to debug Web pages that you display in the control. This is useful when you use the control to add Web-based controls and scripting code to your application. It is less useful when you use the control as a generic browser. When you have finished debugging your application, set this property to `true` to suppress script errors. > [!NOTE] -> When is set to `true`, the control hides all its dialog boxes that originate from the underlying ActiveX control, not just script errors. Occasionally you might need to suppress script errors while displaying dialog boxes such as those used for browser security settings and user login. In this case, set to `false` and suppress script errors in a handler for the event. For more information, see the code example in this topic. +> When is set to `true`, the control hides all its dialog boxes that originate from the underlying ActiveX control, not just script errors. Occasionally you might need to suppress script errors while displaying dialog boxes such as those used for browser security settings and user login. In this case, set to `false` and suppress script errors in a handler for the event. For more information, see the code example in this topic. @@ -3581,10 +3581,10 @@ method or the method. To display the **Print Preview** dialog box, use the method. + You can use this method to implement a **Page Setup** menu item that is similar to the one on the Internet Explorer **File** menu. This method displays the **Page Setup** dialog box, which lets your users specify header and footer values and other page settings prior to printing. To print the current document, use the method or the method. To display the **Print Preview** dialog box, use the method. ## Examples - The following code example demonstrates how to use the method to implement a **Page Setup** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFilePageSetup` and a control called `webBrowser1`. + The following code example demonstrates how to use the method to implement a **Page Setup** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFilePageSetup` and a control called `webBrowser1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.WebBrowser/CPP/form1.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripMenuItem/ShortcutKeys/form1.cs" id="Snippet2"::: @@ -3626,10 +3626,10 @@ method. To display the **Print Preview** dialog box, use the method. + You can use this method to implement a **Print** menu item that is similar to the one on the Internet Explorer **File** menu. This method displays the **Print** dialog box, which lets your users modify print settings prior to printing. To let your users specify page settings prior to printing, use the method. To display the **Print Preview** dialog box, use the method. ## Examples - The following code example demonstrates how to use the method to implement a **Print** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFilePrint` and a control called `webBrowser1.` + The following code example demonstrates how to use the method to implement a **Print** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFilePrint` and a control called `webBrowser1.` :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.WebBrowser/CPP/form1.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripMenuItem/ShortcutKeys/form1.cs" id="Snippet3"::: @@ -3671,10 +3671,10 @@ method. To print the current document, use the method or the method. + You can use this method to implement a **Print Preview** menu item that is similar to the one on the Internet Explorer **File** menu. This method displays the **Print Preview** dialog box, which users see how the current document will appear if it is printed. To let your users specify page settings prior to printing, use the method. To print the current document, use the method or the method. ## Examples - The following code example demonstrates how to use the method to implement a **Print Preview** menu option similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFilePrintPreview`. + The following code example demonstrates how to use the method to implement a **Print Preview** menu option similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFilePrintPreview`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -3721,7 +3721,7 @@ You can use this method to implement a **Properties** menu option similar to the one on the Internet Explorer **File** menu. This method displays the **Properties** dialog box, which contains information about the current document such as its type, URL, size, and dates of creation and modification. ## Examples - The following code example demonstrates how to use the method to implement a **Properties** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFileProperties` and a control called `webBrowser1.` + The following code example demonstrates how to use the method to implement a **Properties** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFileProperties` and a control called `webBrowser1.` :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.WebBrowser/CPP/form1.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripMenuItem/ShortcutKeys/form1.cs" id="Snippet5"::: @@ -3767,7 +3767,7 @@ > This method allows users to save only the contents of the document as it was originally loaded. Any modifications made to the document at run time through the property are not persisted. For information on retrieving the run-time modifications, see [How to: Access the HTML Source in the Managed HTML Document Object Model](/dotnet/desktop/winforms/controls/how-to-access-the-html-source-in-the-managed-html-document-object-model). ## Examples - The following code example demonstrates how to use the method to implement a **Save As** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFileSaveAs` and a control called `webBrowser1`. + The following code example demonstrates how to use the method to implement a **Save As** menu option that is similar to the one on the Internet Explorer **File** menu. This example requires that your form contains a menu with a menu item called `MenuItemFileSaveAs` and a control called `webBrowser1`. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.WebBrowser/CPP/form1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/ToolStripMenuItem/ShortcutKeys/form1.cs" id="Snippet1"::: @@ -3933,10 +3933,10 @@ method to implement a **Stop** button that is similar to the one on the Internet Explorer **File** menu. + You can use the method to implement a **Stop** button that is similar to the one on the Internet Explorer **File** menu. ## Examples - The following code example demonstrates how to use the method to implement a **Stop** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonStop`. + The following code example demonstrates how to use the method to implement a **Stop** button for the control similar to the one in Internet Explorer. This example requires that your form contains a control called `webBrowser1` and a control called `ButtonStop`. For the complete code example, see [How to: Add Web Browser Capabilities to a Windows Forms Application](/dotnet/desktop/winforms/controls/how-to-add-web-browser-capabilities-to-a-windows-forms-application). @@ -3998,11 +3998,11 @@ method and passing it the specified URL. + Setting this property is equivalent to calling the method and passing it the specified URL. The control maintains a history list of all the Web pages visited during a browsing session. When you set the property, the control navigates to the specified URL and adds it to the end of the history list. - The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. + The control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the method to force the control to reload the current page by downloading it, ensuring that the control displays the latest version. > [!NOTE] > This property contains the URL of the current document, even if another document has been requested. If you set the value of this property and then immediately retrieve it again, the value retrieved may be different than the value set if the control has not had time to load the new document. You can retrieve the new value in a event handler. @@ -4115,7 +4115,7 @@ ## Remarks Set this property to false to prevent your users from using Internet Explorer keyboard shortcuts with the control. This is useful when you want to conceal the fact that you are using the control, for example to create a user interface that seamlessly combines DHTML-based controls with Windows Forms controls. - You can disable other standard browser features by setting the and properties to `false`. + You can disable other standard browser features by setting the and properties to `false`. ## Examples The following code example demonstrates how to use the property. diff --git a/xml/System.Windows.Forms/WebBrowserBase.xml b/xml/System.Windows.Forms/WebBrowserBase.xml index ebff2099a2e..b6ef4eb7fff 100644 --- a/xml/System.Windows.Forms/WebBrowserBase.xml +++ b/xml/System.Windows.Forms/WebBrowserBase.xml @@ -99,11 +99,11 @@ Gets the underlying ActiveX control. An representing the underlying ActiveX control. - @@ -186,11 +186,11 @@ An object that represents the underlying ActiveX control. Called by the control when the underlying ActiveX control is created. - @@ -608,11 +608,11 @@ Called by the control to prepare it for listening to events. - @@ -799,11 +799,11 @@ Called by the control when the underlying ActiveX control is discarded. - @@ -839,11 +839,11 @@ Called by the control when it stops listening to events. - @@ -2419,19 +2419,19 @@ An that contains the event data. Raises the event. - method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. - + method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. + ]]> The property of the application is not set to . - Derived classes should override this method to find out when the handle has been created. - + Derived classes should override this method to find out when the handle has been created. + When overriding in a derived class, be sure to call the base class's method at the beginning of your implementation so that registered delegates receive the event. @@ -2679,11 +2679,11 @@ if the key was processed by the ; otherwise, . - method. - + method. + ]]> diff --git a/xml/System.Windows.Forms/WebBrowserDocumentCompletedEventArgs.xml b/xml/System.Windows.Forms/WebBrowserDocumentCompletedEventArgs.xml index ef3ff977d32..d0d9770c70e 100644 --- a/xml/System.Windows.Forms/WebBrowserDocumentCompletedEventArgs.xml +++ b/xml/System.Windows.Forms/WebBrowserDocumentCompletedEventArgs.xml @@ -33,12 +33,12 @@ event to receive notification when the new document finishes loading. The object passed to the event handler lets you retrieve the location of the new document through the property. When the event occurs, the new document is fully loaded, which means you can access its contents through the , , or property. + Handle the event to receive notification when the new document finishes loading. The object passed to the event handler lets you retrieve the location of the new document through the property. When the event occurs, the new document is fully loaded, which means you can access its contents through the , , or property. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -119,7 +119,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/WebBrowserNavigatedEventArgs.xml b/xml/System.Windows.Forms/WebBrowserNavigatedEventArgs.xml index 53a1ed05449..66e85ca41a3 100644 --- a/xml/System.Windows.Forms/WebBrowserNavigatedEventArgs.xml +++ b/xml/System.Windows.Forms/WebBrowserNavigatedEventArgs.xml @@ -33,12 +33,12 @@ event to receive notification when the control has navigated to a new document. The object passed to the event handler lets you retrieve the location of the new document through the property. When the event occurs, the new document has begun loading, which means you can access some of its content through the , , or property. + Handle the event to receive notification when the control has navigated to a new document. The object passed to the event handler lets you retrieve the location of the new document through the property. When the event occurs, the new document has begun loading, which means you can access some of its content through the , , or property. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -119,7 +119,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/WebBrowserNavigatingEventArgs.xml b/xml/System.Windows.Forms/WebBrowserNavigatingEventArgs.xml index 37d5c6821b1..7784b88d3ae 100644 --- a/xml/System.Windows.Forms/WebBrowserNavigatingEventArgs.xml +++ b/xml/System.Windows.Forms/WebBrowserNavigatingEventArgs.xml @@ -123,7 +123,7 @@ event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/WebBrowserProgressChangedEventArgs.xml b/xml/System.Windows.Forms/WebBrowserProgressChangedEventArgs.xml index 6f6d3b805be..914d204f9df 100644 --- a/xml/System.Windows.Forms/WebBrowserProgressChangedEventArgs.xml +++ b/xml/System.Windows.Forms/WebBrowserProgressChangedEventArgs.xml @@ -30,7 +30,7 @@ You can handle the event to implement a navigation progress bar for the control similar to the one in Internet Explorer. Use the property to determine the number of bytes that have been downloaded successfully. Use the property to determine the number of bytes available for downloading. ## Examples - The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -123,7 +123,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. @@ -179,7 +179,7 @@ ## Examples - The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . + The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing with or appending the message to a multiline . To run the example code, paste it into a project that contains an instance of type named `WebBrowser1`. Then ensure that the event handler is associated with the event. diff --git a/xml/System.Windows.Forms/WebBrowserRefreshOption.xml b/xml/System.Windows.Forms/WebBrowserRefreshOption.xml index 7b0b16aa8cc..d541308551d 100644 --- a/xml/System.Windows.Forms/WebBrowserRefreshOption.xml +++ b/xml/System.Windows.Forms/WebBrowserRefreshOption.xml @@ -23,11 +23,11 @@ Specifies constants that define how the control can refresh its contents. - method to specify how the control requests an updated version of the current Web page from the server. - + method to specify how the control requests an updated version of the current Web page from the server. + ]]> diff --git a/xml/System.Windows.Forms/WindowsFormsSynchronizationContext.xml b/xml/System.Windows.Forms/WindowsFormsSynchronizationContext.xml index 66ea7876278..37f4cb3705a 100644 --- a/xml/System.Windows.Forms/WindowsFormsSynchronizationContext.xml +++ b/xml/System.Windows.Forms/WindowsFormsSynchronizationContext.xml @@ -175,10 +175,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> @@ -227,7 +227,7 @@ method starts an asynchronous request to post a message. + The method starts an asynchronous request to post a message. ]]> @@ -278,7 +278,7 @@ property is `false`, the method raises an . It is up to the caller to determine what further action to take. + If the destination thread no longer exists or the value of its property is `false`, the method raises an . It is up to the caller to determine what further action to take. ]]>