diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 5c73842cf8..5d1691ef01 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -1,8 +1,8 @@ { "config": { "default": true, - // Rule is fixable, but corrections may have impacts on headings showing up in sidebars - "MD001": false, + // Heading levels should only increment by one level at a time (accessibility) + "MD001": true, // Rule is auto-fixable, and should pick single style "MD004": false, // Disabled as word wraping can cause many diffs diff --git a/dotnet-desktop-guide/winforms/advanced/com-interop-by-displaying-a-windows-form-shadow.md b/dotnet-desktop-guide/winforms/advanced/com-interop-by-displaying-a-windows-form-shadow.md index 861ecf4228..b7399e25cc 100644 --- a/dotnet-desktop-guide/winforms/advanced/com-interop-by-displaying-a-windows-form-shadow.md +++ b/dotnet-desktop-guide/winforms/advanced/com-interop-by-displaying-a-windows-form-shadow.md @@ -32,7 +32,7 @@ The disadvantage of using the method to display the form. -#### To support COM interop by displaying a windows form with the ShowDialog method +### To support COM interop by displaying a windows form with the ShowDialog method - Replace all calls to the method with calls to the method in your .NET Framework component. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-align-drawn-text.md b/dotnet-desktop-guide/winforms/advanced/how-to-align-drawn-text.md index 6c1e68ed05..c823f0c20b 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-align-drawn-text.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-align-drawn-text.md @@ -16,7 +16,7 @@ description: Learn how to Align Drawn text in GDI and GDI+ as well as how to dra When you perform custom drawing, you may often want to center drawn text on a form or control. You can easily align text drawn with the or methods by creating the correct formatting object and setting the appropriate format flags. -### To draw centered text with GDI+ (DrawString) +## To draw centered text with GDI+ (DrawString) 1. Use a with the appropriate method to specify centered text. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-arrange-mdi-child-forms.md b/dotnet-desktop-guide/winforms/advanced/how-to-arrange-mdi-child-forms.md index aab80fe3f1..07684e06e6 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-arrange-mdi-child-forms.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-arrange-mdi-child-forms.md @@ -20,7 +20,7 @@ The enumeration values display child forms Often, these methods are used as the event handlers called by a menu item's event. In this way, a menu item with the text "Cascade Windows" can have the desired effect on the MDI child windows. -### To arrange child forms +## To arrange child forms 1. In a method, use the method to set the enumeration for the MDI parent form. The following example uses the enumeration value for the child windows of the MDI parent form (`Form1`). The enumeration is used in code during the event handler for the event of the **Cascade Windows** menu item. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-a-setting-between-application-sessions.md b/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-a-setting-between-application-sessions.md index 02d9ea9e7a..fc01601185 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-a-setting-between-application-sessions.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-a-setting-between-application-sessions.md @@ -13,7 +13,7 @@ description: Learn how to change the value of a setting between application sess At times, you might want to change the value of a setting between application sessions after the application has been compiled and deployed. For example, you might want to change a connection string to point to the correct database location. Since design-time tools are not available after the application has been compiled and deployed, you must change the setting value manually in the file. -### To Change the Value of a Setting Between Application Sessions +## To Change the Value of a Setting Between Application Sessions 1. Using Microsoft Notepad or some other text or XML editor, open the .config file associated with your application. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-an-existing-setting-at-design-time.md b/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-an-existing-setting-at-design-time.md index a39eb2cd61..e01bd44614 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-an-existing-setting-at-design-time.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-change-the-value-of-an-existing-setting-at-design-time.md @@ -13,7 +13,7 @@ description: Learn how to change the value of an existing setting at design time You can use Visual Studio to edit the values of existing settings in your project. -### To Change the Value of an Existing Setting at Design Time in C\# +## To Change the Value of an Existing Setting at Design Time in C\# 1. In **Solution Explorer**, expand the **Properties** node of your project. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-choose-the-printers-attached-to-user-computer-in-windows-forms.md b/dotnet-desktop-guide/winforms/advanced/how-to-choose-the-printers-attached-to-user-computer-in-windows-forms.md index 4d45d18f2e..8f4f54ea4e 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-choose-the-printers-attached-to-user-computer-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-choose-the-printers-attached-to-user-computer-in-windows-forms.md @@ -19,7 +19,7 @@ Often, users want to choose a printer other than the default printer to print to In the following procedure, a text file is selected to be printed to the default printer. The class is then instantiated. -### To choose a printer and then print a file +## To choose a printer and then print a file 1. Select the printer to be used using the component. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-create-a-path-gradient.md b/dotnet-desktop-guide/winforms/advanced/how-to-create-a-path-gradient.md index 204860b765..acd9d6167c 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-create-a-path-gradient.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-create-a-path-gradient.md @@ -22,7 +22,7 @@ The class allows you to custom The examples in this article are methods that are called from a control's event handler. -### To fill an ellipse with a path gradient +## To fill an ellipse with a path gradient - The following example fills an ellipse with a path gradient brush. The center color is set to blue and the boundary color is set to aqua. The following illustration shows the filled ellipse. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-create-application-settings.md b/dotnet-desktop-guide/winforms/advanced/how-to-create-application-settings.md index b27f57b849..92250daf74 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-create-application-settings.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-create-application-settings.md @@ -20,7 +20,7 @@ In the following procedure, you manually create a wrapper class that derives fro You can also perform this procedure using minimal code in the Visual Studio designer. Also see [How to: Create Application Settings Using the Designer](/previous-versions/visualstudio/visual-studio-2010/wabtadw6(v=vs.100)). -### To create new Application Settings programmatically +## To create new Application Settings programmatically 1. Add a new class to your project, and rename it. For this procedure, we will call this class `MyUserSettings`. Change the class definition so that the class derives from . diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-create-graphics-objects-for-drawing.md b/dotnet-desktop-guide/winforms/advanced/how-to-create-graphics-objects-for-drawing.md index 8bff8adaa5..4e30e0697a 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-create-graphics-objects-for-drawing.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-create-graphics-objects-for-drawing.md @@ -28,7 +28,7 @@ There are two steps in working with graphics: A graphics object can be created in a variety of ways. -#### To create a graphics object +### To create a graphics object - Receive a reference to a graphics object as part of the in the event of a form or control. This is usually how you obtain a reference to a graphics object when creating painting code for a control. Similarly, you can also obtain a graphics object as a property of the when handling the event for a . @@ -46,7 +46,7 @@ A graphics object can be created in a variety of ways. When programming the for controls or the for a , a graphics object is provided as one of the properties of or . -#### To obtain a reference to a Graphics object from the PaintEventArgs in the Paint event +### To obtain a reference to a Graphics object from the PaintEventArgs in the Paint event 1. Declare the object. @@ -93,7 +93,7 @@ When programming the for controls You can also use the method of a control or form to obtain a reference to a object that represents the drawing surface of that control or form. -#### To create a Graphics object with the CreateGraphics method +### To create a Graphics object with the CreateGraphics method - Call the method of the form or control upon which you want to render graphics. @@ -122,7 +122,7 @@ You can also use the metho Additionally, you can create a graphics object from any object that derives from the class. -#### To create a Graphics object from an Image +### To create a Graphics object from an Image - Call the method, supplying the name of the Image variable from which you want to create a object. @@ -160,7 +160,7 @@ After it is created, a object may be used to draw - The structure—Represents the different colors to display. -#### To use the Graphics object you have created +### To use the Graphics object you have created - Work with the appropriate object listed above to draw what you need. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-determine-the-active-mdi-child.md b/dotnet-desktop-guide/winforms/advanced/how-to-determine-the-active-mdi-child.md index 231ec6d04f..913a99b93f 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-determine-the-active-mdi-child.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-determine-the-active-mdi-child.md @@ -23,7 +23,7 @@ Because an MDI application can have many instances of the same child form, the p When you have several controls on a form, you also need to specify which control is active. Like the property, the property returns the control with the focus on the active child form. The procedure below illustrates a copy procedure that can be called from a child form menu, a menu on the MDI form, or a toolbar button. -### To determine the active MDI child (to copy its text to the Clipboard) +## To determine the active MDI child (to copy its text to the Clipboard) 1. Within a method, copy the text of the active control of the active child form to the Clipboard. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-draw-cardinal-splines.md b/dotnet-desktop-guide/winforms/advanced/how-to-draw-cardinal-splines.md index fe024e2316..e7501b060b 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-draw-cardinal-splines.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-draw-cardinal-splines.md @@ -17,7 +17,7 @@ description: Learn how to draw cardinal splines by creating a Graphics object an A cardinal spline is a curve that passes smoothly through a given set of points. To draw a cardinal spline, create a object and pass the address of an array of points to the method. -### Drawing a Bell-Shaped Cardinal Spline +## Drawing a Bell-Shaped Cardinal Spline - The following example draws a bell-shaped cardinal spline that passes through five designated points. The following illustration shows the curve and five points. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-draw-text-at-a-specified-location.md b/dotnet-desktop-guide/winforms/advanced/how-to-draw-text-at-a-specified-location.md index bc5fe63361..f74a30ce47 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-draw-text-at-a-specified-location.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-draw-text-at-a-specified-location.md @@ -24,7 +24,7 @@ The following illustration shows the output of text drawn at a specified point w ![Screenshot that shows the output of text at a specified point.](./media/how-to-draw-text-at-a-specified-location/font-text-specified-point.png) -### To draw a line of text with GDI+ +## To draw a line of text with GDI+ 1. Use the method, passing the text you want, or , , and . diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-draw-wrapped-text-in-a-rectangle.md b/dotnet-desktop-guide/winforms/advanced/how-to-draw-wrapped-text-in-a-rectangle.md index f508a0fe1c..55953df169 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-draw-wrapped-text-in-a-rectangle.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-draw-wrapped-text-in-a-rectangle.md @@ -23,7 +23,7 @@ The following illustration shows the output of text drawn in the rectangle when ![Screenshot that shows the output when using DrawString method.](./media/how-to-draw-wrapped-text-in-a-rectangle/drawstring-method-font-text.png) -### To draw wrapped text in a rectangle with GDI+ +## To draw wrapped text in a rectangle with GDI+ 1. Use the overloaded method, passing the text you want, or , and . diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-flatten-a-curved-path-into-a-line.md b/dotnet-desktop-guide/winforms/advanced/how-to-flatten-a-curved-path-into-a-line.md index 6723a416e7..643e3a8f10 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-flatten-a-curved-path-into-a-line.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-flatten-a-curved-path-into-a-line.md @@ -18,7 +18,7 @@ A object stores a sequence of lines ![Straight Lines and Curves](./media/aboutgdip02-art32a.gif "AboutGdip02_Art32A") -### To Flatten a Path +## To Flatten a Path - call the method of a object. The method receives a flatness argument that specifies the maximum distance between the flattened path and the original path. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-manually-manage-buffered-graphics.md b/dotnet-desktop-guide/winforms/advanced/how-to-manually-manage-buffered-graphics.md index 165e7051ad..0fa4cd3484 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-manually-manage-buffered-graphics.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-manually-manage-buffered-graphics.md @@ -16,7 +16,7 @@ ms.assetid: 4c2a90ee-bbbe-4ff6-9170-1b06c195c918 For more advanced double buffering scenarios, you can use the .NET Framework classes to implement your own double-buffering logic. The class responsible for allocating and managing individual graphics buffers is the class. Every application has its own default that manages all of the default double buffering for that application. You can retrieve a reference to this instance by calling the . -### To obtain a reference to the default BufferedGraphicsContext +## To obtain a reference to the default BufferedGraphicsContext - Set the property, as shown in the following code example. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-manually-render-buffered-graphics.md b/dotnet-desktop-guide/winforms/advanced/how-to-manually-render-buffered-graphics.md index d66c3d247d..509b883d81 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-manually-render-buffered-graphics.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-manually-render-buffered-graphics.md @@ -19,7 +19,7 @@ If you are managing your own buffered graphics, you will need to be able to crea > [!NOTE] > If you perform your own rendering, memory consumption will increase, though the increase may only be slight. -### To manually display buffered graphics +## To manually display buffered graphics 1. Obtain a reference to an instance of the class. For more information, see [How to: Manually Manage Buffered Graphics](how-to-manually-manage-buffered-graphics.md). diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications.md b/dotnet-desktop-guide/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications.md index 6220bef4ae..a79917a65c 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-perform-drag-and-drop-operations-between-applications.md @@ -14,7 +14,7 @@ Performing drag-and-drop operations between applications is no different from en In the following procedure, you will use a Windows-based application you create and the WordPad word processor that is included with the Windows operating system to perform drag-and-drop operations between applications. WordPad has a certain set of allowed effects for text being dragged and dropped; the Windows-based application you will write code for will work with these effects so that drag-and-drop operations may be completed successfully. -### To perform a drag-and-drop procedure between applications +## To perform a drag-and-drop procedure between applications 1. Create a new Windows Forms application. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-print-graphics-in-windows-forms.md b/dotnet-desktop-guide/winforms/advanced/how-to-print-graphics-in-windows-forms.md index b9524e017a..c8988d9b06 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-print-graphics-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-print-graphics-in-windows-forms.md @@ -17,7 +17,7 @@ ms.assetid: 32b891e6-52ff-4fea-a9ff-2ce5db20a4c6 Frequently, you will want to print graphics in your Windows-based application. The class provides methods for drawing objects to a device, such as a screen or printer. -### To print graphics +## To print graphics 1. Add a component to your form. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls.md b/dotnet-desktop-guide/winforms/advanced/how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls.md index e2e5d060f1..5f9cea2d4e 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls.md @@ -18,7 +18,7 @@ Double buffering uses a memory buffer to address the flicker problems associated For more advanced double buffering scenarios, such as animation or advanced memory management, you can implement your own double buffering logic. For more information, see [How to: Manually Manage Buffered Graphics](how-to-manually-manage-buffered-graphics.md). -### To reduce flicker +## To reduce flicker - Set the property to `true`. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-render-images-with-gdi.md b/dotnet-desktop-guide/winforms/advanced/how-to-render-images-with-gdi.md index 660d3d2b17..980da23c5d 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-render-images-with-gdi.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-render-images-with-gdi.md @@ -17,7 +17,7 @@ ms.assetid: c128b79a-3e31-47d8-9e66-3470f570a056 You can use GDI+ to render images that exist as files in your applications. You do this by creating a new object of an class (such as ), creating a object that refers to the drawing surface you want to use, and calling the method of the object. The image will be painted onto the drawing surface represented by the graphics class. You can use the Image Editor to create and edit image files at design time, and render them with GDI+ at run time. For more information, see [Image Editor for Icons](/cpp/windows/image-editor-for-icons). -### To render an image with GDI+ +## To render an image with GDI+ 1. Create an object representing the image you want to display. This object must be a member of a class that inherits from , such as or . An example is shown: diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-send-data-to-the-active-mdi-child.md b/dotnet-desktop-guide/winforms/advanced/how-to-send-data-to-the-active-mdi-child.md index 2535dc175d..23b14044a5 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-send-data-to-the-active-mdi-child.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-send-data-to-the-active-mdi-child.md @@ -21,7 +21,7 @@ Often, within the context of [Multiple-Document Interface (MDI) Applications](mu > [!NOTE] > For information about verifying which child window has focus and sending its contents to the Clipboard, see [Determining the Active MDI Child](how-to-determine-the-active-mdi-child.md). -### To send data to the active MDI child window from the Clipboard +## To send data to the active MDI child window from the Clipboard 1. Within a method, copy the text on the Clipboard to the active control of the active child form. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-set-pen-width-and-alignment.md b/dotnet-desktop-guide/winforms/advanced/how-to-set-pen-width-and-alignment.md index 217f7279e4..c2bf907849 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-set-pen-width-and-alignment.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-set-pen-width-and-alignment.md @@ -22,7 +22,7 @@ The values , property to (the default) to specify that pixels drawn with the green pen will be centered on the theoretical line. The following illustration shows the resulting line. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-tile-a-shape-with-an-image.md b/dotnet-desktop-guide/winforms/advanced/how-to-tile-a-shape-with-an-image.md index 70fa82848c..5500d14a3c 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-tile-a-shape-with-an-image.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-tile-a-shape-with-an-image.md @@ -20,7 +20,7 @@ Just as tiles can be placed next to each other to cover a floor, rectangular ima The wrap mode property of the object determines how the image is oriented as it is repeated in a rectangular grid. You can make all the tiles in the grid have the same orientation, or you can make the image flip from one grid position to the next. The flipping can be horizontal, vertical, or both. The following examples demonstrate tiling with different types of flipping. -### To tile an image +## To tile an image - This example uses the following 75×75 image to tile a 200×200 rectangle. diff --git a/dotnet-desktop-guide/winforms/advanced/how-to-validate-application-settings.md b/dotnet-desktop-guide/winforms/advanced/how-to-validate-application-settings.md index 5324f53d24..60cd448701 100644 --- a/dotnet-desktop-guide/winforms/advanced/how-to-validate-application-settings.md +++ b/dotnet-desktop-guide/winforms/advanced/how-to-validate-application-settings.md @@ -42,7 +42,7 @@ For more information about event handling, see [Event Handlers Overview](../form The following procedures show how to test for a valid birth date using either the or the event. The procedures were written under the assumption that you have already created your application settings; in this example, we will perform bounds checking on a setting named `DateOfBirth`. For more information about creating settings, see [How to: Create Application Settings](how-to-create-application-settings.md). -### To obtain the application settings object +## To obtain the application settings object - Obtain a reference to the application settings object (the wrapper instance) by completing one of the following bulleted items: diff --git a/dotnet-desktop-guide/winforms/advanced/walkthrough-creating-an-accessible-windows-based-application.md b/dotnet-desktop-guide/winforms/advanced/walkthrough-creating-an-accessible-windows-based-application.md index 8930d07db3..c41cfbb0d6 100644 --- a/dotnet-desktop-guide/winforms/advanced/walkthrough-creating-an-accessible-windows-based-application.md +++ b/dotnet-desktop-guide/winforms/advanced/walkthrough-creating-an-accessible-windows-based-application.md @@ -41,7 +41,7 @@ The user enters the customer's name, the size of the pizza, and the toppings des The emphasis of this walkthrough is not the code for a retail order system, but the accessibility of the user interface. The walkthrough demonstrates the accessibility features of several frequently used controls, including buttons, radio buttons, text boxes, and labels. -#### To begin making the application +### To begin making the application - Create a new Windows Application in Visual Basic or Visual C#. Name the project **PizzaOrder**. For details, see [Creating New Solutions and Projects](/visualstudio/ide/creating-solutions-and-projects). @@ -64,7 +64,7 @@ When adding the controls to a form, keep in mind the following guidelines to mak - Add access keys to all menu items. -#### To make your Windows Application accessible +### To make your Windows Application accessible - Add the controls to the form and set the properties as described below. See the picture at the end of the table for a model of how to arrange the controls on the form. @@ -160,7 +160,7 @@ The application should check the setting of class is used to change the color settings of the label to the user-selected system colors. -#### To enable High Contrast mode in an effective way +### To enable High Contrast mode in an effective way 1. Create a method to set the colors of the label to the system colors. @@ -286,7 +286,7 @@ In our application, the only element that is not using the system settings for c In this application, no information is conveyed by sound alone. If you use sound in your application, then you should supply the information by some other means as well. -#### To supply information by some other means than sound +### To supply information by some other means than sound 1. Make the title bar flash by using the Windows API function FlashWindow. For an example of how to call Windows API functions, see [Walkthrough: Calling Windows APIs](/dotnet/visual-basic/programming-guide/com-interop/walkthrough-calling-windows-apis). @@ -303,7 +303,7 @@ In this application, no information is conveyed by sound alone. If you use sound Before deploying the application, you should test the accessibility features that you have implemented. -#### To test accessibility features +### To test accessibility features 1. To test keyboard access, unplug the mouse and navigate the user interface for each feature using only the keyboard. Ensure that all tasks may be performed using the keyboard only. diff --git a/dotnet-desktop-guide/winforms/advanced/walkthrough-performing-a-drag-and-drop-operation-in-windows-forms.md b/dotnet-desktop-guide/winforms/advanced/walkthrough-performing-a-drag-and-drop-operation-in-windows-forms.md index a4a57b6fc2..fee68d649a 100644 --- a/dotnet-desktop-guide/winforms/advanced/walkthrough-performing-a-drag-and-drop-operation-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/advanced/walkthrough-performing-a-drag-and-drop-operation-in-windows-forms.md @@ -25,7 +25,7 @@ In the following example, the even > [!NOTE] > Certain controls have custom drag-specific events. The and controls, for example, have an event. -#### To start a drag operation +### To start a drag operation 1. In the event for the control where the drag will begin, use the `DoDragDrop` method to set the data to be dragged and the allowed effect dragging will have. For more information, see and . @@ -55,7 +55,7 @@ While a drag operation is in effect, you can handle the property and handling the and events. -#### To perform a drop +### To perform a drop 1. Set the property to true. diff --git a/dotnet-desktop-guide/winforms/controls/access-objects-in-a-wf-datagridviewcomboboxcell-drop-down-list.md b/dotnet-desktop-guide/winforms/controls/access-objects-in-a-wf-datagridviewcomboboxcell-drop-down-list.md index ff1de1f25b..772f75c7f2 100644 --- a/dotnet-desktop-guide/winforms/controls/access-objects-in-a-wf-datagridviewcomboboxcell-drop-down-list.md +++ b/dotnet-desktop-guide/winforms/controls/access-objects-in-a-wf-datagridviewcomboboxcell-drop-down-list.md @@ -23,7 +23,7 @@ To retrieve the business object through the cell value, the `ValueMember` proper The following procedures demonstrate how to populate a drop-down list with business objects and retrieve the objects through the cell property. -### To add business objects to the drop-down list +## To add business objects to the drop-down list 1. Create a new and populate its collection. Alternatively, you can set the column property to the collection of business objects. In that case, however, you cannot add "unassigned" to the drop-down list without creating a corresponding business object in your collection. diff --git a/dotnet-desktop-guide/winforms/controls/access-specific-items-in-a-wf-combobox-listbox-or-checkedlistbox.md b/dotnet-desktop-guide/winforms/controls/access-specific-items-in-a-wf-combobox-listbox-or-checkedlistbox.md index 33a56fc641..f2819ff0d0 100644 --- a/dotnet-desktop-guide/winforms/controls/access-specific-items-in-a-wf-combobox-listbox-or-checkedlistbox.md +++ b/dotnet-desktop-guide/winforms/controls/access-specific-items-in-a-wf-combobox-listbox-or-checkedlistbox.md @@ -21,7 +21,7 @@ ms.assetid: 1216742f-bcf9-4ff8-8a62-d7c9053c2b96 Accessing specific items in a Windows Forms combo box, list box, or checked list box is an essential task. It enables you to programmatically determine what is in a list, at any given position. -### To access a specific item +## To access a specific item 1. Query the `Items` collection using the index of the specific item: diff --git a/dotnet-desktop-guide/winforms/controls/add-and-remove-items-from-a-wf-combobox.md b/dotnet-desktop-guide/winforms/controls/add-and-remove-items-from-a-wf-combobox.md index 1d38a2a785..209d1ab36e 100644 --- a/dotnet-desktop-guide/winforms/controls/add-and-remove-items-from-a-wf-combobox.md +++ b/dotnet-desktop-guide/winforms/controls/add-and-remove-items-from-a-wf-combobox.md @@ -22,7 +22,7 @@ ms.assetid: 7224c8d2-4118-443e-ae1e-d7c17d1e69ee Items can be added to a Windows Forms combo box, list box, or checked list box in a variety of ways, because these controls can be bound to a variety of data sources. However, this topic demonstrates the simplest method and requires no data binding. The items displayed are usually strings; however, any object can be used. The text that is displayed in the control is the value returned by the object's `ToString` method. -### To add items +## To add items 1. Add the string or object to the list by using the `Add` method of the `ObjectCollection` class. The collection is referenced using the `Items` property: diff --git a/dotnet-desktop-guide/winforms/controls/add-and-remove-items-with-wf-listview-control-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/add-and-remove-items-with-wf-listview-control-using-the-designer.md index 2a1567fc7f..0ee91fffbf 100644 --- a/dotnet-desktop-guide/winforms/controls/add-and-remove-items-with-wf-listview-control-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/add-and-remove-items-with-wf-listview-control-using-the-designer.md @@ -15,7 +15,7 @@ The process of adding an item to a Windows Forms control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### To add or remove items using the designer +## To add or remove items using the designer 1. Select the control. diff --git a/dotnet-desktop-guide/winforms/controls/add-and-remove-menu-items-with-wf-contextmenu-component.md b/dotnet-desktop-guide/winforms/controls/add-and-remove-menu-items-with-wf-contextmenu-component.md index d8c9bed26d..17a6382dc9 100644 --- a/dotnet-desktop-guide/winforms/controls/add-and-remove-menu-items-with-wf-contextmenu-component.md +++ b/dotnet-desktop-guide/winforms/controls/add-and-remove-menu-items-with-wf-contextmenu-component.md @@ -31,7 +31,7 @@ You can remove items from a shortcut menu permanently; however, at run time it m > [!IMPORTANT] > Although and replace and add functionality to the and controls of previous versions, and are retained for both backward compatibility and future use if you choose. -### To remove items from a shortcut menu +## To remove items from a shortcut menu 1. Use the or method of the collection of the component to remove a particular menu item. diff --git a/dotnet-desktop-guide/winforms/controls/add-and-remove-nodes-with-wf-treeview-control-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/add-and-remove-nodes-with-wf-treeview-control-using-the-designer.md index 38c6a47f47..d9c99948ac 100644 --- a/dotnet-desktop-guide/winforms/controls/add-and-remove-nodes-with-wf-treeview-control-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/add-and-remove-nodes-with-wf-treeview-control-using-the-designer.md @@ -17,7 +17,7 @@ Because the Windows Forms control displays The following procedure requires a **Windows Application** project with a form containing a control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### To add or remove nodes in the designer +## To add or remove nodes in the designer 1. Select the control. diff --git a/dotnet-desktop-guide/winforms/controls/add-custom-information-to-a-treeview-or-listview-control-wf.md b/dotnet-desktop-guide/winforms/controls/add-custom-information-to-a-treeview-or-listview-control-wf.md index c0785c9772..3b208a11ad 100644 --- a/dotnet-desktop-guide/winforms/controls/add-custom-information-to-a-treeview-or-listview-control-wf.md +++ b/dotnet-desktop-guide/winforms/controls/add-custom-information-to-a-treeview-or-listview-control-wf.md @@ -21,7 +21,7 @@ ms.assetid: 68be11de-1d5b-430e-901f-cfbe48d14b19 You can create a derived node in a Windows Forms control or a derived item in a control. Derivation allows you to add any fields you require, as well as custom methods and constructors for handling them. One use of this feature is to attach a Customer object to each tree node or list item. The examples here are for a control, but the same approach can be used for a control. -### To derive a tree node +## To derive a tree node - Create a new node class, derived from the class, which has a custom field to record a file path. diff --git a/dotnet-desktop-guide/winforms/controls/add-tables-and-columns-to-wf-datagrid-control-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/add-tables-and-columns-to-wf-datagrid-control-using-the-designer.md index 134bf6b24c..464e1cab3f 100644 --- a/dotnet-desktop-guide/winforms/controls/add-tables-and-columns-to-wf-datagrid-control-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/add-tables-and-columns-to-wf-datagrid-control-using-the-designer.md @@ -19,7 +19,7 @@ You can display data in the Windows Forms c The following procedures require a **Windows Application** project with a form that contains a control. For information about how to set up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). By default in Visual Studio 2005, the control is not in the **Toolbox**. For information about adding it, see [How to: Add Items to the Toolbox](/previous-versions/visualstudio/visual-studio-2010/ms165355(v=vs.100)). -### To add a table to the DataGrid control in the designer +## To add a table to the DataGrid control in the designer 1. In order to display data in the table, you must first bind the control to a dataset. For more information, see [How to: Bind the Windows Forms DataGrid Control to a Data Source Using the Designer](bind-wf-datagrid-control-to-a-data-source-using-the-designer.md). diff --git a/dotnet-desktop-guide/winforms/controls/add-tooltips-to-individual-cells-in-a-wf-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/add-tooltips-to-individual-cells-in-a-wf-datagridview-control.md index e44219cf54..1320ee341b 100644 --- a/dotnet-desktop-guide/winforms/controls/add-tooltips-to-individual-cells-in-a-wf-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/add-tooltips-to-individual-cells-in-a-wf-datagridview-control.md @@ -20,7 +20,7 @@ By default, ToolTips are used to display the values of property to `false`. -### To add a ToolTip to a cell +## To add a ToolTip to a cell - Set the property. diff --git a/dotnet-desktop-guide/winforms/controls/app-icons-to-the-taskbar-with-wf-notifyicon.md b/dotnet-desktop-guide/winforms/controls/app-icons-to-the-taskbar-with-wf-notifyicon.md index 22461983a0..c29c1b6c53 100644 --- a/dotnet-desktop-guide/winforms/controls/app-icons-to-the-taskbar-with-wf-notifyicon.md +++ b/dotnet-desktop-guide/winforms/controls/app-icons-to-the-taskbar-with-wf-notifyicon.md @@ -24,7 +24,7 @@ The Windows Forms component displays a si > [!NOTE] > The component is used for notification purposes only, to alert users that an action or event has occurred or there has been a change in status of some sort. You should use menus, toolbars, and other user-interface elements for standard interaction with applications. -### To set the icon +## To set the icon 1. Assign a value to the property. The value must be of type `System.Drawing.Icon` and can be loaded from an .ico file. You can specify the icon file in code or by clicking the ellipsis button (![The Ellipsis button (...) in the Properties window of Visual Studio.](./media/visual-studio-ellipsis-button.png)) next to the property in the **Properties** window, and then selecting the file in the **Open** dialog box that appears. diff --git a/dotnet-desktop-guide/winforms/controls/change-displayed-data-at-run-time-wf-datagrid-control.md b/dotnet-desktop-guide/winforms/controls/change-displayed-data-at-run-time-wf-datagrid-control.md index 5d4fed5eb3..aa8228d293 100644 --- a/dotnet-desktop-guide/winforms/controls/change-displayed-data-at-run-time-wf-datagrid-control.md +++ b/dotnet-desktop-guide/winforms/controls/change-displayed-data-at-run-time-wf-datagrid-control.md @@ -21,7 +21,7 @@ ms.assetid: 0c7a6d00-30de-416e-8223-0a81ddb4c1f8 After you have created a Windows Forms using the design-time features, you may also wish to dynamically change elements of the object of the grid at run time. This can include changes to either individual values of the table or changing which data source is bound to the control. Changes to individual values are done through the object, not the control. -### To change data programmatically +## To change data programmatically 1. Specify the desired table from the object and the desired row and field from the table and set the cell equal to the new value. diff --git a/dotnet-desktop-guide/winforms/controls/change-the-border-and-gridline-styles-in-the-datagrid.md b/dotnet-desktop-guide/winforms/controls/change-the-border-and-gridline-styles-in-the-datagrid.md index 4869897139..424d72c9bc 100644 --- a/dotnet-desktop-guide/winforms/controls/change-the-border-and-gridline-styles-in-the-datagrid.md +++ b/dotnet-desktop-guide/winforms/controls/change-the-border-and-gridline-styles-in-the-datagrid.md @@ -22,7 +22,7 @@ With the control, you can customize the > [!NOTE] > The gridline color is used only with the , , and values of the enumeration and the value of the enumeration. The other values of these enumerations use colors specified by the operating system. Additionally, when visual styles are enabled on Windows XP and the Windows Server 2003 family through the method, the property value is not used. -### To change the gridline color programmatically +## To change the gridline color programmatically - Set the property. diff --git a/dotnet-desktop-guide/winforms/controls/change-the-type-of-a-wf-datagridview-column-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/change-the-type-of-a-wf-datagridview-column-using-the-designer.md index 459e3db369..61bda1e728 100644 --- a/dotnet-desktop-guide/winforms/controls/change-the-type-of-a-wf-datagridview-column-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/change-the-type-of-a-wf-datagridview-column-using-the-designer.md @@ -17,7 +17,7 @@ Sometimes you will want to change the type of a column that has already been add The following procedure requires a **Windows Application** project with a form containing a control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### To change the type of a column using the designer +## To change the type of a column using the designer 1. Click the designer actions glyph (![Small black arrow](./media/designer-actions-glyph.gif)) on the upper-right corner of the control, and then select **Edit Columns**. diff --git a/dotnet-desktop-guide/winforms/controls/create-a-lookup-table-for-a-wf-combobox-listbox.md b/dotnet-desktop-guide/winforms/controls/create-a-lookup-table-for-a-wf-combobox-listbox.md index bceddebbc4..adf6e2ce42 100644 --- a/dotnet-desktop-guide/winforms/controls/create-a-lookup-table-for-a-wf-combobox-listbox.md +++ b/dotnet-desktop-guide/winforms/controls/create-a-lookup-table-for-a-wf-combobox-listbox.md @@ -22,7 +22,7 @@ ms.assetid: 4ce35f12-1f4e-4317-92d1-af8686a8cfaa Sometimes it is useful to display data in a user-friendly format on a Windows Form, but store the data in a format that is more meaningful to your program. For example, an order form for food might display the menu items by name in a list box. However, the data table recording the order would contain the unique ID numbers representing the food. The following tables show an example of how to store and display order-form data for food. -### OrderDetailsTable +## OrderDetailsTable |OrderID|ItemID|Quantity| |-------------|------------|--------------| diff --git a/dotnet-desktop-guide/winforms/controls/create-and-set-a-custom-renderer-for-the-toolstrip-control-in-wf.md b/dotnet-desktop-guide/winforms/controls/create-and-set-a-custom-renderer-for-the-toolstrip-control-in-wf.md index ecb247df7a..ced452db20 100644 --- a/dotnet-desktop-guide/winforms/controls/create-and-set-a-custom-renderer-for-the-toolstrip-control-in-wf.md +++ b/dotnet-desktop-guide/winforms/controls/create-and-set-a-custom-renderer-for-the-toolstrip-control-in-wf.md @@ -23,7 +23,7 @@ You can assign renderers to each individual [!NOTE] > returns only if the value of is not `null`. -### To create a custom renderer +## To create a custom renderer 1. Extend the class. diff --git a/dotnet-desktop-guide/winforms/controls/creating-a-master-detail-form-using-two-datagridviews.md b/dotnet-desktop-guide/winforms/controls/creating-a-master-detail-form-using-two-datagridviews.md index 82f2345cba..f6516a1a57 100644 --- a/dotnet-desktop-guide/winforms/controls/creating-a-master-detail-form-using-two-datagridviews.md +++ b/dotnet-desktop-guide/winforms/controls/creating-a-master-detail-form-using-two-datagridviews.md @@ -30,7 +30,7 @@ In order to complete this walkthrough, you will need: ## Creating the form -#### To create a master/detail form +### To create a master/detail form 1. Create a class that derives from and contains two controls and two components. The following code provides basic form initialization and includes a `Main` method. If you use the Visual Studio designer to create your form, you can use the designer generated code instead of this code, but be sure to use the names shown in the variable declarations here. @@ -56,7 +56,7 @@ In order to complete this walkthrough, you will need: You can now test the form to make sure it behaves as expected. -#### To test the form +### To test the form - Compile and run the application. diff --git a/dotnet-desktop-guide/winforms/controls/creating-an-explorer-style-interface-with-the-listview-and-treeview.md b/dotnet-desktop-guide/winforms/controls/creating-an-explorer-style-interface-with-the-listview-and-treeview.md index 060471c275..a65af1556d 100644 --- a/dotnet-desktop-guide/winforms/controls/creating-an-explorer-style-interface-with-the-listview-and-treeview.md +++ b/dotnet-desktop-guide/winforms/controls/creating-an-explorer-style-interface-with-the-listview-and-treeview.md @@ -21,7 +21,7 @@ ms.assetid: 9e5e7721-19e2-4890-b273-a43589fe99ff One of the benefits of Visual Studio is the ability to create professional-looking Windows Forms applications in a short of amount of time. A common scenario is creating a user interface (UI) with and controls that resembles the Windows Explorer feature of Windows operating systems. Windows Explorer displays a hierarchical structure of the files and folders on a user's computer. -### To create the form containing a ListView and TreeView control +## To create the form containing a ListView and TreeView control 1. On the **File** menu, point to **New**, and then click **Project**. @@ -81,7 +81,7 @@ One of the benefits of Visual Studio is the ability to create professional-looki You can now test the form to make sure it behaves as expected. -#### To test the form +### To test the form - Press F5 to run the application. diff --git a/dotnet-desktop-guide/winforms/controls/customize-cells-and-columns-in-the-datagrid-by-extending-behavior.md b/dotnet-desktop-guide/winforms/controls/customize-cells-and-columns-in-the-datagrid-by-extending-behavior.md index 2d199e3142..8f33556e68 100644 --- a/dotnet-desktop-guide/winforms/controls/customize-cells-and-columns-in-the-datagrid-by-extending-behavior.md +++ b/dotnet-desktop-guide/winforms/controls/customize-cells-and-columns-in-the-datagrid-by-extending-behavior.md @@ -31,7 +31,7 @@ Because this type of cell customization requires unshared rows, it is not approp > [!NOTE] > When you derive from or and add new properties to the derived class, be sure to override the `Clone` method to copy the new properties during cloning operations. You should also call the base class's `Clone` method so that the properties of the base class are copied to the new cell or column. -### To customize cells and columns in the DataGridView control +## To customize cells and columns in the DataGridView control 1. Derive a new cell class, called `DataGridViewRolloverCell`, from the type. diff --git a/dotnet-desktop-guide/winforms/controls/default-cell-styles-datagridview.md b/dotnet-desktop-guide/winforms/controls/default-cell-styles-datagridview.md index 42d9e11b2d..e54f4ea025 100644 --- a/dotnet-desktop-guide/winforms/controls/default-cell-styles-datagridview.md +++ b/dotnet-desktop-guide/winforms/controls/default-cell-styles-datagridview.md @@ -21,7 +21,7 @@ You can also set styles using the control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### To set default styles for all cells in the control +## To set default styles for all cells in the control 1. Select the control in the designer. diff --git a/dotnet-desktop-guide/winforms/controls/determine-when-formatting-attributes-change-wf-richtextbox-control.md b/dotnet-desktop-guide/winforms/controls/determine-when-formatting-attributes-change-wf-richtextbox-control.md index f1fb156869..9aba06bcc9 100644 --- a/dotnet-desktop-guide/winforms/controls/determine-when-formatting-attributes-change-wf-richtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/determine-when-formatting-attributes-change-wf-richtextbox-control.md @@ -19,7 +19,7 @@ ms.assetid: bdfed015-f77a-41e5-b38f-f8629b2fa166 A common use of the Windows Forms control is formatting text with attributes such as font options or paragraph styles. Your application may need to keep track of any changes in text formatting for the purpose of displaying a toolbar, as in many word-processing applications. -### To respond to changes in formatting attributes +## To respond to changes in formatting attributes 1. Write code in the event handler to perform an appropriate action depending on the value of the attribute. The following example changes the appearance of a toolbar button depending on the value of the property. The toolbar button will only be updated when the insertion point is moved in the control. diff --git a/dotnet-desktop-guide/winforms/controls/determine-which-panel-wf-statusbar-control-was-clicked.md b/dotnet-desktop-guide/winforms/controls/determine-which-panel-wf-statusbar-control-was-clicked.md index ef0ba19307..5332192990 100644 --- a/dotnet-desktop-guide/winforms/controls/determine-which-panel-wf-statusbar-control-was-clicked.md +++ b/dotnet-desktop-guide/winforms/controls/determine-which-panel-wf-statusbar-control-was-clicked.md @@ -27,7 +27,7 @@ To program the [StatusBar Control](statusbar-control-windows-forms.md) control t > [!NOTE] > Ensure that the control's property is set to `true`. -### To determine which panel was clicked +## To determine which panel was clicked 1. In the event handler, use a `Select Case` (in Visual Basic) or `switch case` (Visual C# or Visual C++) statement to determine which panel was clicked by examining the index of the clicked panel in the event arguments. diff --git a/dotnet-desktop-guide/winforms/controls/display-a-date-in-a-custom-format-with-wf-datetimepicker-control.md b/dotnet-desktop-guide/winforms/controls/display-a-date-in-a-custom-format-with-wf-datetimepicker-control.md index 2c1e256265..4be61b581e 100644 --- a/dotnet-desktop-guide/winforms/controls/display-a-date-in-a-custom-format-with-wf-datetimepicker-control.md +++ b/dotnet-desktop-guide/winforms/controls/display-a-date-in-a-custom-format-with-wf-datetimepicker-control.md @@ -18,7 +18,7 @@ ms.assetid: 39767691-2d2b-46b6-a663-b7901e581a6e The Windows Forms control gives you flexibility in formatting the display of dates and times in the control. The property allows you to select from predefined formats, listed in the . If none of these is adequate for your purposes, you can create your own format style using format characters listed in . -### To display a custom format +## To display a custom format 1. Set the property to `DateTimePickerFormat.Custom`. diff --git a/dotnet-desktop-guide/winforms/controls/display-error-icons-for-form-validation-with-wf-errorprovider.md b/dotnet-desktop-guide/winforms/controls/display-error-icons-for-form-validation-with-wf-errorprovider.md index e5b80186b7..f762a34a4d 100644 --- a/dotnet-desktop-guide/winforms/controls/display-error-icons-for-form-validation-with-wf-errorprovider.md +++ b/dotnet-desktop-guide/winforms/controls/display-error-icons-for-form-validation-with-wf-errorprovider.md @@ -19,7 +19,7 @@ ms.assetid: 3b681a32-9db4-497b-a34b-34980eabee46 You can use a Windows Forms component to display an error icon when the user enters invalid data. You must have at least two controls on the form in order to tab between them and thereby invoke the validation code. -### To display an error icon when a control's value is invalid +## To display an error icon when a control's value is invalid 1. Add two controls — for example, text boxes — to a Windows Form. diff --git a/dotnet-desktop-guide/winforms/controls/display-more-than-one-month-wf-monthcalendar-control.md b/dotnet-desktop-guide/winforms/controls/display-more-than-one-month-wf-monthcalendar-control.md index 535193d49c..23ad66162c 100644 --- a/dotnet-desktop-guide/winforms/controls/display-more-than-one-month-wf-monthcalendar-control.md +++ b/dotnet-desktop-guide/winforms/controls/display-more-than-one-month-wf-monthcalendar-control.md @@ -19,7 +19,7 @@ ms.assetid: d197caa2-38a5-4cb4-acc3-562130c2ace3 The Windows Forms control can display up to 12 months at a time. By default, the control displays only one month, but you can specify how many months are displayed and how they are arranged within the control. When you change the calendar dimensions, the control is resized, so be sure there is enough room on the form for the new dimensions. -### To display multiple months +## To display multiple months - Set the property to the number of months to display horizontally and vertically. diff --git a/dotnet-desktop-guide/winforms/controls/display-specific-days-in-bold-with-wf-monthcalendar-control.md b/dotnet-desktop-guide/winforms/controls/display-specific-days-in-bold-with-wf-monthcalendar-control.md index 474ec4a7ad..ef8477ffdb 100644 --- a/dotnet-desktop-guide/winforms/controls/display-specific-days-in-bold-with-wf-monthcalendar-control.md +++ b/dotnet-desktop-guide/winforms/controls/display-specific-days-in-bold-with-wf-monthcalendar-control.md @@ -21,7 +21,7 @@ The Windows Forms control can display Three properties control this feature. The property contains single dates. The property contains dates that appear in bold every year. The property contains dates that appear in bold every month. Each of these properties contains an array of objects. To add or remove a date from one of these lists, you must add or remove a object. -### To make a date appear in bold type +## To make a date appear in bold type 1. Create the objects. diff --git a/dotnet-desktop-guide/winforms/controls/enable-drag-and-drop-operations-with-wf-richtextbox-control.md b/dotnet-desktop-guide/winforms/controls/enable-drag-and-drop-operations-with-wf-richtextbox-control.md index 5698d2fe4c..0293d62f4e 100644 --- a/dotnet-desktop-guide/winforms/controls/enable-drag-and-drop-operations-with-wf-richtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/enable-drag-and-drop-operations-with-wf-richtextbox-control.md @@ -19,7 +19,7 @@ ms.assetid: ca167d1c-2014-4cf0-96a0-20598470be3b Drag-and-drop operations with the Windows Forms control are done by handling the and events. Thus, drag-and-drop operations are extremely simple with the control. -### To enable drag operations in a RichTextBox control +## To enable drag operations in a RichTextBox control 1. Set the property of the control to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/enable-users-to-copy-multiple-cells-to-the-clipboard-datagridview.md b/dotnet-desktop-guide/winforms/controls/enable-users-to-copy-multiple-cells-to-the-clipboard-datagridview.md index 111c93264e..6d094315eb 100644 --- a/dotnet-desktop-guide/winforms/controls/enable-users-to-copy-multiple-cells-to-the-clipboard-datagridview.md +++ b/dotnet-desktop-guide/winforms/controls/enable-users-to-copy-multiple-cells-to-the-clipboard-datagridview.md @@ -22,7 +22,7 @@ You can configure cell copying to copy cell values only, to include row and colu Depending on the selection mode, users can select multiple disconnected groups of cells. When a user copies cells to the Clipboard, rows and columns with no selected cells are not copied. All other rows or columns become rows and columns in the table of data copied to the Clipboard. Unselected cells in these rows or columns are copied as blank placeholders to the Clipboard. -### To enable cell copying +## To enable cell copying - Set the property. diff --git a/dotnet-desktop-guide/winforms/controls/get-and-set-the-current-cell-wf-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/get-and-set-the-current-cell-wf-datagridview-control.md index 3f1fdca7f2..2815dfad56 100644 --- a/dotnet-desktop-guide/winforms/controls/get-and-set-the-current-cell-wf-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/get-and-set-the-current-cell-wf-datagridview-control.md @@ -22,7 +22,7 @@ Interaction with the often requires tha Depending on the control's selection mode, changing the current cell can change the selection. For more information, see [Selection Modes in the Windows Forms DataGridView Control](selection-modes-in-the-windows-forms-datagridview-control.md). -### To get the current cell programmatically +## To get the current cell programmatically - Use the control's property. diff --git a/dotnet-desktop-guide/winforms/controls/handling-errors-that-occur-during-data-entry-in-the-datagrid.md b/dotnet-desktop-guide/winforms/controls/handling-errors-that-occur-during-data-entry-in-the-datagrid.md index da531a78b0..096c7c2cdb 100644 --- a/dotnet-desktop-guide/winforms/controls/handling-errors-that-occur-during-data-entry-in-the-datagrid.md +++ b/dotnet-desktop-guide/winforms/controls/handling-errors-that-occur-during-data-entry-in-the-datagrid.md @@ -32,7 +32,7 @@ In order to complete this walkthrough, you will need: ## Creating the Form -#### To handle data-entry errors in the DataGridView control +### To handle data-entry errors in the DataGridView control 1. Create a class that derives from and contains a control and a component. @@ -69,7 +69,7 @@ In order to complete this walkthrough, you will need: You can now test the form to make sure it behaves as expected. -#### To test the form +### To test the form - Press F5 to run the application. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-access-keyed-collections-in-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-access-keyed-collections-in-windows-forms.md index f7a0ff684a..4b95835540 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-access-keyed-collections-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-access-keyed-collections-in-windows-forms.md @@ -28,7 +28,7 @@ ms.assetid: b9b79b8b-d9bf-4f8c-b9d6-9578bc3219d3 The key associated with an item in a collection is typically the name of the item. The following procedures show you how to use collection classes to perform common tasks. -### To find and give focus to a nested control in a control collection +## To find and give focus to a nested control in a control collection - Use the and methods to specify the name of the control to find and give focus to. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-access-objects-bound-to-windows-forms-datagridview-rows.md b/dotnet-desktop-guide/winforms/controls/how-to-access-objects-bound-to-windows-forms-datagridview-rows.md index c8f5e4a9fa..4f24ea0929 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-access-objects-bound-to-windows-forms-datagridview-rows.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-access-objects-bound-to-windows-forms-datagridview-rows.md @@ -19,7 +19,7 @@ Sometimes it is useful to display a table of information stored in a collection If these objects contain additional information and code that you want to access, you can reach it through row objects. In the following code example, users can select multiple rows and click a button to send an invoice to each of the corresponding customers. -### To access row-bound objects +## To access row-bound objects - Use the property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-access-the-html-source-in-the-managed-html-document-object-model.md b/dotnet-desktop-guide/winforms/controls/how-to-access-the-html-source-in-the-managed-html-document-object-model.md index ebea6a7e32..e43cdaf529 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-access-the-html-source-in-the-managed-html-document-object-model.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-access-the-html-source-in-the-managed-html-document-object-model.md @@ -18,7 +18,7 @@ The and , and call it `Form1`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-access-the-managed-html-document-object-model.md b/dotnet-desktop-guide/winforms/controls/how-to-access-the-managed-html-document-object-model.md index f0df3afd4f..e8f13cc1b9 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-access-the-managed-html-document-object-model.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-access-the-managed-html-document-object-model.md @@ -20,7 +20,7 @@ You can access the managed HTML Document Object Model (DOM) from two types of ap - A Windows Forms hosted within Internet Explorer. You can access the HTML DOM representing the page on which your is hosted in order to change the document's structure or open modal dialog boxes, among many other possibilities. -### To access DOM from a Windows Forms application +## To access DOM from a Windows Forms application 1. Host a control within your Windows Forms application and monitor for the event. For details on hosting controls and monitoring for events, see [Events](/dotnet/standard/events/index). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-a-control-to-a-tab-page.md b/dotnet-desktop-guide/winforms/controls/how-to-add-a-control-to-a-tab-page.md index f7f1128136..aeceb82015 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-a-control-to-a-tab-page.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-a-control-to-a-tab-page.md @@ -18,7 +18,7 @@ ms.assetid: b092532e-7346-469f-b9a1-897f9bea4fb7 You can use the Windows Forms to display other controls in an organized fashion. The following procedure shows how to add a button to the first tab. For information about adding an icon to the label part of a tab page, see [How to: Change the Appearance of the Windows Forms TabControl](how-to-change-the-appearance-of-the-windows-forms-tabcontrol.md). -### To add a control programmatically +## To add a control programmatically 1. Use the method of the collection returned by the property of : diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-a-custom-place-to-a-file-dialog-box.md b/dotnet-desktop-guide/winforms/controls/how-to-add-a-custom-place-to-a-file-dialog-box.md index 39db8ca63b..5a3dda7ded 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-a-custom-place-to-a-file-dialog-box.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-a-custom-place-to-a-file-dialog-box.md @@ -20,7 +20,7 @@ The default open and save dialog boxes on Windows Vista have an area on the left > [!NOTE] > In order for a custom place to appear in the or , the property must be set to `true` (the default). -### To add a custom place to a file dialog box +## To add a custom place to a file dialog box - Add a path, a Known Folder GUID, or a object to the collection of the dialog box. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-items-with-the-windows-forms-listview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-items-with-the-windows-forms-listview-control.md index ae0f0c466b..b21725bd83 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-items-with-the-windows-forms-listview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-items-with-the-windows-forms-listview-control.md @@ -17,7 +17,7 @@ ms.assetid: 1b35a80a-edd8-495f-a807-a28c4aae52c6 The process of adding an item to a Windows Forms control consists primarily of specifying the item and assigning properties to it. Adding or removing list items can be done at any time. -### To add items programmatically +## To add items programmatically 1. Use the method of the property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-nodes-with-the-windows-forms-treeview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-nodes-with-the-windows-forms-treeview-control.md index 260848a7fa..6f67045182 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-nodes-with-the-windows-forms-treeview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-nodes-with-the-windows-forms-treeview-control.md @@ -19,7 +19,7 @@ ms.assetid: de1b82db-4905-449a-9f59-af271a6b6673 The Windows Forms control stores the top-level nodes in its collection. Each also has its own collection to store its child nodes. Both collection properties are of type , which provides standard collection members that enable you to add, remove, and rearrange the nodes at a single level of the node hierarchy. -### To add nodes programmatically +## To add nodes programmatically 1. Use the method of the tree view's property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-tabs-with-the-windows-forms-tabcontrol.md b/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-tabs-with-the-windows-forms-tabcontrol.md index 2f646e6838..490423ae76 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-tabs-with-the-windows-forms-tabcontrol.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-and-remove-tabs-with-the-windows-forms-tabcontrol.md @@ -20,7 +20,7 @@ ms.assetid: 66d4dfca-41e8-44e3-9c80-fb7ac4cb1619 By default, a control contains two controls. You can access these tabs through the property. -### To add a tab programmatically +## To add a tab programmatically - Use the method of the property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control-using-the-designer.md index 72f4abde48..4f4cc88994 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control-using-the-designer.md @@ -21,7 +21,7 @@ An integral part of the control is the butto The following procedure requires a **Windows Application** project with a form containing a control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### To add buttons at design time +## To add buttons at design time 1. Select the control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control.md b/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control.md index cc39262a9c..d229e1cd4e 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-buttons-to-a-toolbar-control.md @@ -25,7 +25,7 @@ An integral part of the control is the butto The examples below assume that a control has been added to a Windows Form (`Form1`). -### To add buttons programmatically +## To add buttons programmatically 1. In a procedure, create toolbar buttons by adding them to the collection. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control-using-the-designer.md index dc4c778c6a..d3e7e9dec0 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control-using-the-designer.md @@ -15,7 +15,7 @@ The Windows Forms control can display multi The following procedure requires a **Windows Application** project with a form containing a control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### To add columns in the designer +## To add columns in the designer 1. In the **Properties** window, set the control's property to . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control.md index 83c393def9..d2756c06bd 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-columns-to-the-windows-forms-listview-control.md @@ -17,7 +17,7 @@ ms.assetid: 79174274-12ee-4a5d-80db-6ec02976d010 In the Details view, the control can display multiple columns for each list item. You can use the columns to display to the user several types of information about each list item. For example, a list of files could display the file name, file type, size, and date the file was last modified. For information about populating the columns after they are created, see [How to: Display Subitems in Columns with the Windows Forms ListView Control](how-to-display-subitems-in-columns-with-the-windows-forms-listview-control.md). -### To add columns programmatically +## To add columns programmatically 1. Set the control's property to . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-enhancements-to-toolstripmenuitems.md b/dotnet-desktop-guide/winforms/controls/how-to-add-enhancements-to-toolstripmenuitems.md index a4e5e0550f..1b91e3715d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-enhancements-to-toolstripmenuitems.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-enhancements-to-toolstripmenuitems.md @@ -42,7 +42,7 @@ You can enhance the usability of and property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-items-to-windows-forms-domainupdown-controls-programmatically.md b/dotnet-desktop-guide/winforms/controls/how-to-add-items-to-windows-forms-domainupdown-controls-programmatically.md index 617365a318..24e212881a 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-items-to-windows-forms-domainupdown-controls-programmatically.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-items-to-windows-forms-domainupdown-controls-programmatically.md @@ -17,7 +17,7 @@ ms.assetid: fd31d314-33eb-4181-90f8-d32ed0c4e072 You can add items to the Windows Forms control in code. Call the or method of the class to add items to the control's property. The method adds an item to the end of a collection, while the method adds an item at a specified position. -### To add a new item +## To add a new item 1. Use the method to add an item to the end of the list of items. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-menu-items-to-a-contextmenustrip.md b/dotnet-desktop-guide/winforms/controls/how-to-add-menu-items-to-a-contextmenustrip.md index 737f1e14b3..e73e36a3cf 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-menu-items-to-a-contextmenustrip.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-menu-items-to-a-contextmenustrip.md @@ -17,7 +17,7 @@ ms.assetid: 1ec14776-3ea2-4752-bd22-4fae0fd19e1a You can add just one menu item or several items at a time to a . -### To add a single menu item to a ContextMenuStrip +## To add a single menu item to a ContextMenuStrip - Use the method to add one menu item to a . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-imagelist-images-with-the-designer.md b/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-imagelist-images-with-the-designer.md index c91a9df466..8b5cca50d3 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-imagelist-images-with-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-imagelist-images-with-the-designer.md @@ -14,7 +14,7 @@ ms.assetid: 5699b244-e37c-4d20-bc35-7441e55c1e3a You can add images to an component several different ways. You can add images very quickly by using the smart tag associated with the , or if you are setting several other properties on the , you may find it more convenient to add images with the Properties window. You can also add images by using code. For more information about how to add images with code, see [How to: Add or Remove Images with the Windows Forms ImageList Component](how-to-add-or-remove-images-with-the-windows-forms-imagelist-component.md). Typically you populate the component with images before it is associated with a control, but this is not required. -### To add or remove images by using the Properties window +## To add or remove images by using the Properties window 1. Select the component, or add one to the form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-images-with-the-windows-forms-imagelist-component.md b/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-images-with-the-windows-forms-imagelist-component.md index 5578c0722c..f977f71056 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-images-with-the-windows-forms-imagelist-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-or-remove-images-with-the-windows-forms-imagelist-component.md @@ -24,7 +24,7 @@ The Windows Forms component is typically p > [!NOTE] > When you remove images, verify that the property of any associated controls is still valid. -### To add images programmatically +## To add images programmatically - Use the method of the image list's property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-panels-to-a-statusbar-control.md b/dotnet-desktop-guide/winforms/controls/how-to-add-panels-to-a-statusbar-control.md index 33911c94eb..41900c19e8 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-panels-to-a-statusbar-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-panels-to-a-statusbar-control.md @@ -21,7 +21,7 @@ ms.assetid: 835e3902-288c-4c38-9d69-0696d8695009 The programmable area within a [StatusBar Control](statusbar-control-windows-forms.md) control consists of instances of the class. These are added through additions to the class. -### To add panels to a status bar +## To add panels to a status bar 1. In a procedure, create status-bar panels by adding them to the . Specify property settings for individual panels by using its index passed through the property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-search-capabilities-to-a-listview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-add-search-capabilities-to-a-listview-control.md index 6cd82eabc5..daa74b1fd7 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-search-capabilities-to-a-listview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-search-capabilities-to-a-listview-control.md @@ -21,7 +21,7 @@ Oftentimes when working with a large list of items in a method allows you to perform a text search on a in list or details view, given a search string and an optional starting and ending index. In contrast, the method allows you to find an item in a in icon or tile view, given a set of x- and y-coordinates and a direction to search. -### To find an item using text +## To find an item using text 1. Create a with the property set to or , and then populate the with items. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-tables-and-columns-to-the-windows-forms-datagrid-control.md b/dotnet-desktop-guide/winforms/controls/how-to-add-tables-and-columns-to-the-windows-forms-datagrid-control.md index 02e278c00a..ae68208461 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-tables-and-columns-to-the-windows-forms-datagrid-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-tables-and-columns-to-the-windows-forms-datagrid-control.md @@ -21,7 +21,7 @@ ms.assetid: 2fe661b9-aa06-49b9-a314-a0d3cbfdcb4d You can display data in the Windows Forms control in tables and columns by creating **DataGridTableStyle** objects and adding them to the **GridTableStylesCollection** object, which is accessed through the control's **TableStyles** property. Each table style displays the contents of whatever data table is specified in the **DataGridTableStyle** object's **MappingName** property. By default, a table style with no column styles specified will display all the columns within that data table. You can restrict which columns from the table appear by adding **DataGridColumnStyle** objects to the **GridColumnStylesCollection** object, which is accessed through the **GridColumnStyles** property of each **DataGridTableStyle** object. -### To add a table and column to a DataGrid programmatically +## To add a table and column to a DataGrid programmatically 1. In order to display data in the table, you must first bind the control to a dataset. For more information, see [How to: Bind the Windows Forms DataGrid Control to a Data Source](how-to-bind-the-windows-forms-datagrid-control-to-a-data-source.md). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-add-to-or-remove-from-a-collection-of-controls-at-run-time.md b/dotnet-desktop-guide/winforms/controls/how-to-add-to-or-remove-from-a-collection-of-controls-at-run-time.md index b8e98dbe6e..0d2b01ee9a 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-add-to-or-remove-from-a-collection-of-controls-at-run-time.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-add-to-or-remove-from-a-collection-of-controls-at-run-time.md @@ -23,7 +23,7 @@ Common tasks in application development are adding controls to and removing cont > [!NOTE] > The following code example applies to any control that maintains a collection of controls within it. -### To add a control to a collection programmatically +## To add a control to a collection programmatically 1. Create an instance of the control to be added. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-flowlayoutpanel-control.md b/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-flowlayoutpanel-control.md index 6d7b8c8d98..aeadfce253 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-flowlayoutpanel-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-flowlayoutpanel-control.md @@ -15,7 +15,7 @@ ms.assetid: a2bcdfca-9b63-45e6-9c0e-3411015cba98 The control supports the and properties in its child controls. -### To anchor and dock child controls in a FlowLayoutPanel control +## To anchor and dock child controls in a FlowLayoutPanel control 1. Create a control on your form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-tablelayoutpanel-control.md b/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-tablelayoutpanel-control.md index 4395700795..3b4d118d3d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-tablelayoutpanel-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-anchor-and-dock-child-controls-in-a-tablelayoutpanel-control.md @@ -20,7 +20,7 @@ description: Learn how to anchor, dock, align, and stretch child controls in a T The control supports the and properties in its child controls. -### To align a child control in a TableLayoutPanel cell +## To align a child control in a TableLayoutPanel cell 1. Create a control on your form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-append-a-menustrip-to-an-mdi-parent-window-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-append-a-menustrip-to-an-mdi-parent-window-windows-forms.md index 817dc1879b..9136b6b332 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-append-a-menustrip-to-an-mdi-parent-window-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-append-a-menustrip-to-an-mdi-parent-window-windows-forms.md @@ -21,7 +21,7 @@ The following procedure uses the property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-associate-a-contextmenustrip-with-a-control.md b/dotnet-desktop-guide/winforms/controls/how-to-associate-a-contextmenustrip-with-a-control.md index e2699b5f45..e7678b4a4d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-associate-a-contextmenustrip-with-a-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-associate-a-contextmenustrip-with-a-control.md @@ -18,7 +18,7 @@ description: Learn how to associate a ContextMenuStrip with a Windows Form and a After creating your controls and shortcut menus, use the following procedures to display a given shortcut menu when the user right-clicks the control. These procedures associate a with a Windows Form and with a control. -### To associate a ContextMenuStrip with a Windows Form +## To associate a ContextMenuStrip with a Windows Form 1. Set the property to the name of the associated . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-associate-a-shortcut-menu-with-a-windows-forms-notifyicon-component.md b/dotnet-desktop-guide/winforms/controls/how-to-associate-a-shortcut-menu-with-a-windows-forms-notifyicon-component.md index ac865537e0..4de631f072 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-associate-a-shortcut-menu-with-a-windows-forms-notifyicon-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-associate-a-shortcut-menu-with-a-windows-forms-notifyicon-component.md @@ -24,7 +24,7 @@ The component displays an icon in the sta > [!NOTE] > If you want your application to be minimized at startup while displaying an instance of the component in the taskbar, set the main form's property to and be sure the component's property is set to `true`. -### To associate a shortcut menu with the NotifyIcon component at design time +## To associate a shortcut menu with the NotifyIcon component at design time 1. Add a component to your form, and set the important properties, such as the and properties. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-attach-a-shortcut-menu-to-a-treeview-node.md b/dotnet-desktop-guide/winforms/controls/how-to-attach-a-shortcut-menu-to-a-treeview-node.md index 4fe1200ce0..1bc95a2037 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-attach-a-shortcut-menu-to-a-treeview-node.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-attach-a-shortcut-menu-to-a-treeview-node.md @@ -18,7 +18,7 @@ description: Learn how to attach a shortcut menu to a TreeView node to provide c The Windows Forms control displays a hierarchy of nodes, similar to the files and folders displayed in the left pane of Windows Explorer. By setting the property, you can provide context-sensitive operations to the user when they right-click the control. By associating a component with individual items, you can add a customized level of shortcut menu functionality to your controls. -### To associate a shortcut menu with a TreeNode programmatically +## To associate a shortcut menu with a TreeNode programmatically 1. Instantiate a control with the appropriate property settings, create a root , and then add subnodes. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-combobox-or-listbox-control-to-data.md b/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-combobox-or-listbox-control-to-data.md index ac8393c06c..de688b017f 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-combobox-or-listbox-control-to-data.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-combobox-or-listbox-control-to-data.md @@ -23,7 +23,7 @@ ms.assetid: dfd7f081-8bea-4a41-86a3-86a1934828ef You can bind the and to data to perform tasks such as browsing data in a database, entering new data, or editing existing data. -### To bind a ComboBox or ListBox control +## To bind a ComboBox or ListBox control 1. Set the `DataSource` property to a data source object. Possible data sources include a bound to data, a data table, a data view, a dataset, a data view manager, an array, or any class that implements the interface. For more information, see [Data Sources Supported by Windows Forms](../data/overview.md). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-control-to-a-type-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-control-to-a-type-using-the-designer.md index f30917ae82..af4663d0bf 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-control-to-a-type-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-bind-a-windows-forms-control-to-a-type-using-the-designer.md @@ -14,7 +14,7 @@ description: Learn how to create a new BindingSource that is bound to a type, an When you are building controls that interact with data, you sometimes need to bind a control to a type, rather than an object. You typically need to bind a control to a type at design time, when data may not be available, but you still want your data-bound controls to display data from a type's public interface. The following procedures demonstrate how to create a new that is bound to a type, and then how to bind one of the type's properties to the property of a . -### To bind the BindingSource to a type +## To bind the BindingSource to a type 1. Create a Windows Forms project (**File** > **New** > **Project** > **Visual C#** or **Visual Basic** > **Classic Desktop** > **Windows Forms Application**). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-bind-data-to-the-maskedtextbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-bind-data-to-the-maskedtextbox-control.md index 8f41a0a28e..fa78a37a26 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-bind-data-to-the-maskedtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-bind-data-to-the-maskedtextbox-control.md @@ -20,7 +20,7 @@ You can bind data to a control just as The following procedure requires that you have access to a SQL Server database with the Northwind sample database installed. -### To bind data to a MaskedTextBox control +## To bind data to a MaskedTextBox control 1. Create a new Windows Forms project. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-bind-the-windows-forms-datagrid-control-to-a-data-source.md b/dotnet-desktop-guide/winforms/controls/how-to-bind-the-windows-forms-datagrid-control-to-a-data-source.md index 62fdac0fbe..91d2e64222 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-bind-the-windows-forms-datagrid-control-to-a-data-source.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-bind-the-windows-forms-datagrid-control-to-a-data-source.md @@ -25,7 +25,7 @@ description: Learn how to bind the Windows Forms DataGrid control to a Data sour The Windows Forms control is specifically designed to display information from a data source. You bind the control at run time by calling the method. Although you can display data from a variety of data sources, the most typical sources are datasets and data views. -### To data-bind the DataGrid control programmatically +## To data-bind the DataGrid control programmatically 1. Write code to fill the dataset. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-bind-to-a-web-service-using-the-windows-forms-bindingsource.md b/dotnet-desktop-guide/winforms/controls/how-to-bind-to-a-web-service-using-the-windows-forms-bindingsource.md index d24b557da9..01a9659d78 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-bind-to-a-web-service-using-the-windows-forms-bindingsource.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-bind-to-a-web-service-using-the-windows-forms-bindingsource.md @@ -20,7 +20,7 @@ description: Learn how to bind to a Web Service using the Windows Forms BindingS If you want to bind a Windows Form control to the results obtained from calling an XML Web service, you can use a component. This procedure is similar to binding a component to a type. You must create a client-side proxy that contains the methods and types exposed by the Web service. You generate a client-side proxy from the Web service (.asmx) itself, or its Web Services Description Language (WSDL) file. Additionally, your client-side proxy must expose the fields of complex types used by the Web service as public properties. You then bind the to one of the types exposed in the Web service proxy. -### To create and bind to a client-side proxy +## To create and bind to a client-side proxy 1. Create a Windows Form in the directory of your choice, with an appropriate namespace. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-change-monthcalendar-control-appearance.md b/dotnet-desktop-guide/winforms/controls/how-to-change-monthcalendar-control-appearance.md index 9787c32b56..67ff1bdc27 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-change-monthcalendar-control-appearance.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-change-monthcalendar-control-appearance.md @@ -17,7 +17,7 @@ description: Learn how to change the Windows Forms MonthCalendar control's appea The Windows Forms control allows you to customize the calendar's appearance in many ways. For example, you can set the color scheme and choose to display or hide week numbers and the current date. -### To change the month calendar's color scheme +## To change the month calendar's color scheme - Set properties such as , and . The property also determines the font color for the days of the week. The property determines the color of the dates that precede and follow the displayed month or months. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-change-styles-on-an-element-in-the-managed-html-document-object-model.md b/dotnet-desktop-guide/winforms/controls/how-to-change-styles-on-an-element-in-the-managed-html-document-object-model.md index b2347ff71d..3dd999a5d1 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-change-styles-on-an-element-in-the-managed-html-document-object-model.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-change-styles-on-an-element-in-the-managed-html-document-object-model.md @@ -30,7 +30,7 @@ The problem with manipulating styles using the property is set to `true`, a Help button appears on the dialog box. When the user clicks the Help button, the component's event is raised. -### To configure the appearance of the color dialog box +## To configure the appearance of the color dialog box 1. Set the , , , and properties to the desired values. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-linklabel-control.md b/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-linklabel-control.md index 5d4ce94f22..1286042bb6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-linklabel-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-linklabel-control.md @@ -20,7 +20,7 @@ description: Learn how to change the appearance of the Windows Forms LinkLabel c You can change the text displayed by the control to suit a variety of purposes. For example, it is common practice to indicate to the user that text can be clicked by setting the text to appear in a specific color with an underline. After the user clicks the text, the color changes to a different color. To control this behavior, you can set five different properties: the , , , , and properties. -### To change the appearance of a LinkLabel control +## To change the appearance of a LinkLabel control 1. Set the and properties to the colors you want. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-tabcontrol.md b/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-tabcontrol.md index aeba7cab19..eac9be13ba 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-tabcontrol.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-the-windows-forms-tabcontrol.md @@ -19,7 +19,7 @@ description: Learn how to change the appearance of the Windows Forms tabs by usi You can change the appearance of tabs in Windows Forms by using properties of the and the objects that make up the individual tabs on the control. By setting these properties, you can display images on tabs, display tabs vertically instead of horizontally, display multiple rows of tabs, and enable or disable tabs programmatically. -### To display an icon on the label part of a tab +## To display an icon on the label part of a tab 1. Add an control to the form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-toolstrip-text-and-images-in-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-toolstrip-text-and-images-in-windows-forms.md index 4d8a3bd6f4..977d55d8b6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-toolstrip-text-and-images-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-change-the-appearance-of-toolstrip-text-and-images-in-windows-forms.md @@ -21,7 +21,7 @@ description: Learn how to change the appearance of ToolStrip text and images, as You can control whether text and images are displayed on a and how they are aligned relative to each other and the . -### To define what is displayed on a ToolStripItem +## To define what is displayed on a ToolStripItem - Set the property to the desired value. The possibilities are `Image`, `ImageAndText`, `None`, and `Text`. The default is `ImageAndText`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-change-the-delay-of-the-windows-forms-tooltip-component.md b/dotnet-desktop-guide/winforms/controls/how-to-change-the-delay-of-the-windows-forms-tooltip-component.md index 4f41ff7985..e65002f6e3 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-change-the-delay-of-the-windows-forms-tooltip-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-change-the-delay-of-the-windows-forms-tooltip-component.md @@ -18,7 +18,7 @@ description: Learn how to change the delay of the Windows Forms ToolTip componen There are multiple delay values that you can set for a Windows Forms component. The unit of measure for all these properties is milliseconds. The property determines how long the user must point at the associated control for the ToolTip string to appear. The property sets the number of milliseconds it takes for subsequent ToolTip strings to appear as the mouse moves from one ToolTip-associated control to another. The property determines the length of time the ToolTip string is shown. You can set these values individually, or by setting the value of the property; the other delay properties are set based on the value assigned to the property. For example, when is set to a value N, is set to N, is set to the value of divided by five (or N/5), and is set to a value that is five times the value of the property (or 5N). -### To set the delay +## To set the delay 1. Set the following properties as shown in this example. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-change-the-spacing-and-alignment-of-toolstrip-items-in-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-change-the-spacing-and-alignment-of-toolstrip-items-in-windows-forms.md index 443a9f16cb..2bab2843d6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-change-the-spacing-and-alignment-of-toolstrip-items-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-change-the-spacing-and-alignment-of-toolstrip-items-in-windows-forms.md @@ -19,7 +19,7 @@ The control fully supports layout features Because the default value of the property is `true`, controls are sized automatically unless you set the property to `false`. -### To manually size a ToolStripItem +## To manually size a ToolStripItem 1. Set the property to `false` for the associated control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-choose-folders-with-the-windows-forms-folderbrowserdialog-component.md b/dotnet-desktop-guide/winforms/controls/how-to-choose-folders-with-the-windows-forms-folderbrowserdialog-component.md index 371a4142b9..61abcc4351 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-choose-folders-with-the-windows-forms-folderbrowserdialog-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-choose-folders-with-the-windows-forms-folderbrowserdialog-component.md @@ -20,7 +20,7 @@ ms.assetid: 4593670e-7c7d-4661-b46b-4ffb63258adb Often, within Windows applications you create, you will have to prompt users to select a folder, most frequently to save a set of files. The Windows Forms component allows you to easily accomplish this task. -### To choose folders with the FolderBrowserDialog component +## To choose folders with the FolderBrowserDialog component 1. In a procedure, check the component's property to see how the dialog box was closed and get the value of the component's property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-control-the-insertion-point-in-a-windows-forms-textbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-control-the-insertion-point-in-a-windows-forms-textbox-control.md index 2a9461aad4..22f905ed85 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-control-the-insertion-point-in-a-windows-forms-textbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-control-the-insertion-point-in-a-windows-forms-textbox-control.md @@ -20,7 +20,7 @@ When a Windows Forms control first receives In some cases, this behavior can be disconcerting to the user. In a word processing application, the user might expect new characters to appear after any existing text. In a data entry application, the user might expect new characters to replace any existing entry. The and properties enable you to modify the behavior to suit your purpose. -### To control the insertion point in a TextBox control +## To control the insertion point in a TextBox control 1. Set the property to an appropriate value. Zero places the insertion point immediately to the left of the first character. @@ -56,7 +56,7 @@ In some cases, this behavior can be disconcerting to the user. In a word process The insertion point is visible by default in a new form only if the control is first in the tab order. Otherwise, the insertion point appears only if you give the the focus with either the keyboard or the mouse. -#### To make the text box insertion point visible by default on a new form +### To make the text box insertion point visible by default on a new form - Set the control's property to `0`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-copy-toolstripmenuitems.md b/dotnet-desktop-guide/winforms/controls/how-to-copy-toolstripmenuitems.md index 2cc6c9217f..53eb0843d6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-copy-toolstripmenuitems.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-copy-toolstripmenuitems.md @@ -14,7 +14,7 @@ description: Learn how to copy ToolStripMenuItems to top-level and drop-down loc At design time, you can copy entire top-level menus and their submenu items to a different place on the . You can also copy individual menu items between top-level menus or change the position of menu items within a menu. -### To copy a top-level menu and its submenu items to another top-level location +## To copy a top-level menu and its submenu items to another top-level location 1. Left-click the menu that you want to copy and press CTRL+C, or right-click the menu and select **Copy** from the shortcut menu. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-create-a-lookup-table-with-the-windows-forms-bindingsource-component.md b/dotnet-desktop-guide/winforms/controls/how-to-create-a-lookup-table-with-the-windows-forms-bindingsource-component.md index ccb4ad6f45..1af5933375 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-create-a-lookup-table-with-the-windows-forms-bindingsource-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-create-a-lookup-table-with-the-windows-forms-bindingsource-component.md @@ -45,7 +45,7 @@ Four important properties are set on the [ComboBox Control](combobox-control-win The procedures below show you how to lay out your form as a lookup table and bind data to the controls on it. To successfully complete the procedures, you must have a data source with parent and child tables that have a foreign-key relationship, as mentioned previously. -### To create the user interface +## To create the user interface 1. From the **ToolBox**, drag a control onto the form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-create-a-password-text-box-with-the-windows-forms-textbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-create-a-password-text-box-with-the-windows-forms-textbox-control.md index 8e12bca1b7..f53c88156b 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-create-a-password-text-box-with-the-windows-forms-textbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-create-a-password-text-box-with-the-windows-forms-textbox-control.md @@ -20,7 +20,7 @@ ms.assetid: d105d6b9-3d50-44cd-80d8-2c0e2f486727 A password box is a Windows Forms text box that displays placeholder characters while a user types a string. -### To create a password text box +## To create a password text box 1. Set the property of the control to a specific character. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-create-access-keys-with-windows-forms-label-controls.md b/dotnet-desktop-guide/winforms/controls/how-to-create-access-keys-with-windows-forms-label-controls.md index 1f872be9a4..51323183d0 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-create-access-keys-with-windows-forms-label-controls.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-create-access-keys-with-windows-forms-label-controls.md @@ -25,7 +25,7 @@ description: Learn how to create access keys with Windows Forms label controls t Windows Forms controls can be used to define access keys for other controls. When you define an access key in a label control, the user can press the ALT key plus the character you designate to move the focus to the control that follows it in the tab order. Because labels cannot receive focus, focus automatically moves to the next control in the tab order. Use this technique to assign access keys to text boxes, combo boxes, list boxes, and data grids. -### To assign an access key to a control with a label +## To assign an access key to a control with a label 1. Draw the label first, and then draw the other control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-create-an-html-document-viewer-in-a-windows-forms-application.md b/dotnet-desktop-guide/winforms/controls/how-to-create-an-html-document-viewer-in-a-windows-forms-application.md index a264f472c9..91a9fb16cc 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-create-an-html-document-viewer-in-a-windows-forms-application.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-create-an-html-document-viewer-in-a-windows-forms-application.md @@ -18,7 +18,7 @@ description: Learn how to create an HTML document viewer in a Windows Forms appl You can use the control to display and print HTML documents without providing the full functionality of an Internet Web browser. This is useful when you want to take advantage of the formatting capabilities of HTML but do not want your users to load arbitrary Web pages that may contain untrusted Web controls or potentially malicious script code. You might want to restrict the capability of the control in this manner, for example, to use it as an HTML email viewer or to provide HTML-formatted help in your application. -### To create an HTML document viewer +## To create an HTML document viewer 1. Set the property to `false` to prevent the control from opening files dropped onto it. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-create-an-mdi-window-list-with-menustrip-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-create-an-mdi-window-list-with-menustrip-windows-forms.md index 990b88edab..929bda6ad6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-create-an-mdi-window-list-with-menustrip-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-create-an-mdi-window-list-with-menustrip-windows-forms.md @@ -18,7 +18,7 @@ Use the multiple-document interface (MDI) to create applications that can open s This procedure shows you how to create a list of all the active child forms on the parent's Window menu. -### To create an MDI Window list on a MenuStrip +## To create an MDI Window list on a MenuStrip 1. Create a form and set its property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-create-master-detail-lists-with-the-windows-forms-datagrid-control.md b/dotnet-desktop-guide/winforms/controls/how-to-create-master-detail-lists-with-the-windows-forms-datagrid-control.md index b56b057188..e2e86f777c 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-create-master-detail-lists-with-the-windows-forms-datagrid-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-create-master-detail-lists-with-the-windows-forms-datagrid-control.md @@ -21,7 +21,7 @@ description: Learn how to create master/detail lists with the Windows Forms Data If your contains a series of related tables, you can use two controls to display the data in a master/detail format. One is designated to be the master grid, and the second is designated to be the details grid. When you select an entry in the master list, all of the related child entries are shown in the details list. For example, if your contains a Customers table and a related Orders table, you would specify the Customers table to be the master grid and the Orders table to be the details grid. When a customer is selected from the master grid, all of the orders associated with that customer in the Orders table would be displayed in the details grid. -### To set a master/detail relationship programmatically +## To set a master/detail relationship programmatically 1. Create two new controls and set their properties. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button-using-the-designer.md index 7dcd8dcdb9..ba0fa0e66d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button-using-the-designer.md @@ -22,7 +22,7 @@ description: Learn how to define an icon for a ToolBar button using the designer The following procedure requires a **Windows Application** project with a form containing a control and an component. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### To set an icon for a toolbar button at design time +## To set an icon for a toolbar button at design time 1. Add images to the component. For more information, see [How to: Add or Remove ImageList Images with the Designer](how-to-add-or-remove-imagelist-images-with-the-designer.md). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button.md b/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button.md index 2281282e81..b1b390b0ae 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-define-an-icon-for-a-toolbar-button.md @@ -24,7 +24,7 @@ description: Learn how to define an icon for a ToolBar button by adding images t buttons are able to display icons within them for easy identification by users. This is achieved through adding images to the [ImageList Component](imagelist-component-windows-forms.md) component and then associating the component with the control. -### To set an icon for a toolbar button programmatically +## To set an icon for a toolbar button programmatically 1. In a procedure, instantiate an component and a control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-define-resize-and-positioning-behavior-in-a-split-window.md b/dotnet-desktop-guide/winforms/controls/how-to-define-resize-and-positioning-behavior-in-a-split-window.md index 81da8b9f4c..ed519eb403 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-define-resize-and-positioning-behavior-in-a-split-window.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-define-resize-and-positioning-behavior-in-a-split-window.md @@ -27,7 +27,7 @@ The property and The example below modifies the property to create a "snapping splitter" effect; when the user drags the splitter, it increments in units of 10 pixels rather than the default 1. -### To define SplitContainer resize behavior +## To define SplitContainer resize behavior 1. In a procedure, set the property to the desired size, so that the 'snapping' behavior of the splitter is achieved. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-delete-or-hide-columns-in-the-windows-forms-datagrid-control.md b/dotnet-desktop-guide/winforms/controls/how-to-delete-or-hide-columns-in-the-windows-forms-datagrid-control.md index f36142e236..a4e851226c 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-delete-or-hide-columns-in-the-windows-forms-datagrid-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-delete-or-hide-columns-in-the-windows-forms-datagrid-control.md @@ -28,7 +28,7 @@ The deleted or hidden columns still exist in the data source the grid is bound t > [!NOTE] > If your application does not access certain columns of data, and you do not want them displayed in the datagrid, then it is probably not necessary to include them in the data source in the first place. -### To delete a column from the DataGrid programmatically +## To delete a column from the DataGrid programmatically 1. In the declarations area of your form, declare a new instance of the class. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-accept-button.md b/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-accept-button.md index a98530da21..2cc813b6a3 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-accept-button.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-accept-button.md @@ -22,7 +22,7 @@ On any Windows Form, you can designate a cont > [!NOTE] > The exceptions to this are when the control with focus is another button — in that case, the button with the focus will be clicked — or a multiline text box, or a custom control that traps the ENTER key. -### To designate the accept button +## To designate the accept button 1. Set the form's property to the appropriate control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-cancel-button.md b/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-cancel-button.md index 9cc532ab19..f4e18aa0ce 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-cancel-button.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-designate-a-windows-forms-button-as-the-cancel-button.md @@ -17,7 +17,7 @@ ms.assetid: 252f0834-e54b-44d9-96f7-ee5f50e94f2c On any Windows Form, you can designate a control to be the cancel button. A cancel button is clicked whenever the user presses the ESC key, regardless of which other control on the form has the focus. Such a button is usually programmed to enable the user to quickly exit an operation without committing to any action. -### To designate the cancel button +## To designate the cancel button 1. Set the form's property to the appropriate control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-detect-when-the-mouse-pointer-is-over-a-toolstripitem.md b/dotnet-desktop-guide/winforms/controls/how-to-detect-when-the-mouse-pointer-is-over-a-toolstripitem.md index a9b4d4f994..81b6514303 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-detect-when-the-mouse-pointer-is-over-a-toolstripitem.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-detect-when-the-mouse-pointer-is-over-a-toolstripitem.md @@ -15,7 +15,7 @@ ms.assetid: d38b5082-aba7-4f6c-841b-bd9714e307fd Use the following procedure to detect when the mouse pointer is over a . -### To detect when the pointer is over a ToolStripItem +## To detect when the pointer is over a ToolStripItem - Use the property for items in which is `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-determine-checked-items-in-the-windows-forms-checkedlistbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-determine-checked-items-in-the-windows-forms-checkedlistbox-control.md index e38eb50a6a..d6eefd0e3d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-determine-checked-items-in-the-windows-forms-checkedlistbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-determine-checked-items-in-the-windows-forms-checkedlistbox-control.md @@ -17,7 +17,7 @@ ms.assetid: 178b477d-27c9-489c-8914-44a9623a4d41 When presenting data in a Windows Forms control, you can either iterate through the collection stored in the property, or step through the list using the method to determine which items are checked. The method takes an item index number as its argument and returns `true` or `false`. Contrary to what you might expect, the and properties do not determine which items are checked; they determine which items are highlighted. -### To determine checked items in a CheckedListBox control +## To determine checked items in a CheckedListBox control 1. Iterate through the collection, starting at 0 since the collection is zero-based. Note that this method will give you the item number in the list of checked items, not the overall list. So if the first item in the list is not checked and the second item is checked, the code below will display text like "Checked Item 1 = MyListItem2". diff --git a/dotnet-desktop-guide/winforms/controls/how-to-determine-page-properties-using-the-pagesetupdialog-component.md b/dotnet-desktop-guide/winforms/controls/how-to-determine-page-properties-using-the-pagesetupdialog-component.md index d7320d7e58..4cd4fd47d8 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-determine-page-properties-using-the-pagesetupdialog-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-determine-page-properties-using-the-pagesetupdialog-component.md @@ -22,7 +22,7 @@ You need to specify an instance of the component is how it interacts with the class. The class is used to specify settings that modify the way a page will be printed, such as paper orientation, the size of the page, and the margins. Each of these settings is represented as a property of the class. The class modifies these property values for a given instance of the class that is associated with the document (and is represented as a property). -### To set page properties using the PageSetupDialog component +## To set page properties using the PageSetupDialog component 1. Use the method to display the dialog box, specifying the to use. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-determine-which-treeview-node-was-clicked-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-determine-which-treeview-node-was-clicked-windows-forms.md index 885df789d3..6164afe62b 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-determine-which-treeview-node-was-clicked-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-determine-which-treeview-node-was-clicked-windows-forms.md @@ -20,7 +20,7 @@ ms.assetid: 06a4a191-d918-42af-9f49-956c93eff261 When working with the Windows Forms control, a common task is to determine which node was clicked, and respond appropriately. -### To determine which TreeView node was clicked +## To determine which TreeView node was clicked 1. Use the object to return a reference to the clicked node object. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-disable-tab-pages.md b/dotnet-desktop-guide/winforms/controls/how-to-disable-tab-pages.md index ea827d90f7..3bcdc5dc70 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-disable-tab-pages.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-disable-tab-pages.md @@ -17,7 +17,7 @@ ms.assetid: adcc6618-8a34-4ee1-bbe3-47e732de6a59 On some occasions, you will want to restrict access to data that is available within your Windows Forms application. One example of this might be when you have data displayed in the tab pages of a tab control; administrators could have information on a tab page that you would want to restrict from guest or lower-level users. -### To disable tab pages programmatically +## To disable tab pages programmatically 1. Write code to handle the tab control's event. This is the event that is raised when the user switches from one tab to the next. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-disable-toolstripmenuitems.md b/dotnet-desktop-guide/winforms/controls/how-to-disable-toolstripmenuitems.md index 67ab28d63c..1f3920a770 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-disable-toolstripmenuitems.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-disable-toolstripmenuitems.md @@ -21,7 +21,7 @@ ms.assetid: bcc1da84-50fd-41d2-8475-103b581d5654 You can limit or broaden the commands a user may make by enabling and disabling menu items in response to user activities. Menu items are enabled by default when they are created, but this can be adjusted through the property. You can manipulate this property at design time in the **Properties** window or programmatically by setting it in code. -### To disable a menu item programmatically +## To disable a menu item programmatically - Within the method where you set the properties of the menu item, add code to set the property to `false`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-display-icons-for-the-windows-forms-listview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-display-icons-for-the-windows-forms-listview-control.md index 8b68e130c4..a6c699fc51 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-display-icons-for-the-windows-forms-listview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-display-icons-for-the-windows-forms-listview-control.md @@ -19,7 +19,7 @@ ms.assetid: 9d577542-8595-429b-99e5-078770ec9d35 The Windows Forms control can display icons from three image lists. The List, Details, and SmallIcon views display images from the image list specified in the property. The LargeIcon view displays images from the image list specified in the property. A list view can also display an additional set of icons, set in the property, next to the large or small icons. For more information about image lists, see [ImageList Component](imagelist-component-windows-forms.md) and [How to: Add or Remove Images with the Windows Forms ImageList Component](how-to-add-or-remove-images-with-the-windows-forms-imagelist-component.md). -### To display images in a list view +## To display images in a list view 1. Set the appropriate property—, , or —to the existing component you wish to use. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-display-print-preview-in-windows-forms-applications.md b/dotnet-desktop-guide/winforms/controls/how-to-display-print-preview-in-windows-forms-applications.md index ec0f887a32..3fbca3356a 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-display-print-preview-in-windows-forms-applications.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-display-print-preview-in-windows-forms-applications.md @@ -26,7 +26,7 @@ To do this, you need to specify an instance of the control uses the class. Additionally, the control uses the class, just as the component does. The print document specified in the control's property refers to instances of both the and classes, and these are used to render the document in the preview window. -### To view pages using the PrintPreviewDialog control +## To view pages using the PrintPreviewDialog control - Use the method to display the dialog box, specifying the to use. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-display-scroll-bars-in-the-windows-forms-richtextbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-display-scroll-bars-in-the-windows-forms-richtextbox-control.md index 0a25c863d0..10baba06a2 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-display-scroll-bars-in-the-windows-forms-richtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-display-scroll-bars-in-the-windows-forms-richtextbox-control.md @@ -14,7 +14,7 @@ ms.assetid: cdeb42e1-86e8-410c-ba46-18aec264ef5f By default, the Windows Forms control displays horizontal and vertical scroll bars as necessary. There are seven possible values for the property of the control, which are described in the table below. -### To display scroll bars in a RichTextBox control +## To display scroll bars in a RichTextBox control 1. Set the property to `true`. No type of scroll bar, including horizontal, will display if the property is set to `false`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-display-side-aligned-tabs-with-tabcontrol.md b/dotnet-desktop-guide/winforms/controls/how-to-display-side-aligned-tabs-with-tabcontrol.md index 89d805cbbf..0ba7620eb8 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-display-side-aligned-tabs-with-tabcontrol.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-display-side-aligned-tabs-with-tabcontrol.md @@ -19,7 +19,7 @@ The property of to your form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-display-subitems-in-columns-with-the-windows-forms-listview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-display-subitems-in-columns-with-the-windows-forms-listview-control.md index 3f805efea4..054bbbe2fd 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-display-subitems-in-columns-with-the-windows-forms-listview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-display-subitems-in-columns-with-the-windows-forms-listview-control.md @@ -18,7 +18,7 @@ ms.assetid: e465f044-cde7-4fd9-a687-788a73a0f554 The Windows Forms control can display additional text, or subitems, for each item in the Details view. The first column displays the item text, for example an employee number. The second, third, and subsequent columns display the first, second, and subsequent associated subitems. -### To add subitems to a list item +## To add subitems to a list item 1. Add any columns needed. Because the first column will display the item's property, you need one more column than there are subitems. For more information on adding columns, see [How to: Add Columns to the Windows Forms ListView Control](how-to-add-columns-to-the-windows-forms-listview-control.md). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-display-time-with-the-datetimepicker-control.md b/dotnet-desktop-guide/winforms/controls/how-to-display-time-with-the-datetimepicker-control.md index 1b0b5f543c..689b1d5174 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-display-time-with-the-datetimepicker-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-display-time-with-the-datetimepicker-control.md @@ -17,7 +17,7 @@ ms.assetid: 0c1c8b40-1b50-4301-a90c-39516775ccb1 If you want your application to enable users to select a date and time, and to display that date and time in the specified format, use the control. The following procedure shows how to use the control to display the time. -### To display the time with the DateTimePicker control +## To display the time with the DateTimePicker control 1. Set the property to diff --git a/dotnet-desktop-guide/winforms/controls/how-to-display-web-style-links-with-the-windows-forms-richtextbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-display-web-style-links-with-the-windows-forms-richtextbox-control.md index 8d6324d61d..f854bd0dd0 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-display-web-style-links-with-the-windows-forms-richtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-display-web-style-links-with-the-windows-forms-richtextbox-control.md @@ -18,7 +18,7 @@ ms.assetid: 95089a37-a202-4f7a-94ee-6ee312908851 The Windows Forms control can display Web links as colored and underlined. You can write code that opens a browser window showing the Web site specified in the link text when the link is clicked. -### To link to a Web page with the RichTextBox control +## To link to a Web page with the RichTextBox control 1. Set the property to a string that includes a valid URL (for example, `https://www.microsoft.com/`). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-enable-autocomplete-in-toolstrip-controls-in-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-enable-autocomplete-in-toolstrip-controls-in-windows-forms.md index c955508d74..993581a381 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-enable-autocomplete-in-toolstrip-controls-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-enable-autocomplete-in-toolstrip-controls-in-windows-forms.md @@ -23,7 +23,7 @@ The following procedure combines a wi > [!NOTE] > Automatic completion works with `ToolStrip` controls in the same way that it works with traditional controls such as and . -### To enable AutoComplete in a ToolStrip control +## To enable AutoComplete in a ToolStrip control 1. Create a control and add items to it. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-enable-column-reordering-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-enable-column-reordering-in-the-windows-forms-datagridview-control.md index 8d40f215d6..1131ded9a9 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-enable-column-reordering-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-enable-column-reordering-in-the-windows-forms-datagridview-control.md @@ -19,7 +19,7 @@ When you enable column reordering in the property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-enable-reordering-of-toolstrip-items-at-run-time-in-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-enable-reordering-of-toolstrip-items-at-run-time-in-windows-forms.md index c0621d6013..ea7baf37a6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-enable-reordering-of-toolstrip-items-at-run-time-in-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-enable-reordering-of-toolstrip-items-at-run-time-in-windows-forms.md @@ -18,7 +18,7 @@ ms.assetid: 8480b69a-379f-4dc2-8dcf-365ed93692b2 You can enable the user to rearrange controls on the . -### To enable ToolStripItem rearrangement at run time +## To enable ToolStripItem rearrangement at run time - Set the property to `true`. By default, is `false`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-enable-the-tab-key-to-move-out-of-a-toolstrip-control.md b/dotnet-desktop-guide/winforms/controls/how-to-enable-the-tab-key-to-move-out-of-a-toolstrip-control.md index 58215ddfa4..b1bb113e81 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-enable-the-tab-key-to-move-out-of-a-toolstrip-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-enable-the-tab-key-to-move-out-of-a-toolstrip-control.md @@ -16,7 +16,7 @@ Use the following procedure to enable the user to press the TAB key to move out The accepts the first press of the TAB key, and the arrow keys select items within the . When the user presses the TAB key a second time, it takes the user to the next control in the tab order. -### To enable the user to press the TAB key to move out of a ToolStrip to the next control +## To enable the user to press the TAB key to move out of a ToolStrip to the next control - Set the property of the to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-enable-tile-view-in-a-windows-forms-listview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-enable-tile-view-in-a-windows-forms-listview-control.md index 8d84f62568..d23eda1fb3 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-enable-tile-view-in-a-windows-forms-listview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-enable-tile-view-in-a-windows-forms-listview-control.md @@ -25,7 +25,7 @@ The tile view uses a 32 x 32 pixel icon and several lines of text, as shown in t To enable tile view, set the property to . You can adjust the size of the tiles by setting the property, and the number of text lines displayed in the tile by adjusting the collection. -### To set tile view programmatically +## To set tile view programmatically 1. Use the enumeration of the control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-expose-properties-of-constituent-controls.md b/dotnet-desktop-guide/winforms/controls/how-to-expose-properties-of-constituent-controls.md index ad5ac8fa03..75fb4ff951 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-expose-properties-of-constituent-controls.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-expose-properties-of-constituent-controls.md @@ -47,7 +47,7 @@ public Color ButtonColor } ``` -### To expose a property of a constituent control +## To expose a property of a constituent control 1. Create a public property for your user control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-format-data-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-format-data-in-the-windows-forms-datagridview-control.md index 9744db5bc0..94ecd66553 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-format-data-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-format-data-in-the-windows-forms-datagridview-control.md @@ -23,7 +23,7 @@ ms.assetid: 8c33543c-9c08-4636-a65a-fdf714a529b7 The following procedures demonstrate basic formatting of cell values using the property of a control and of specific columns in a control. For information about advanced data formatting, see [How to: Customize Data Formatting in the Windows Forms DataGridView Control](how-to-customize-data-formatting-in-the-windows-forms-datagridview-control.md). -### To format currency and date values +## To format currency and date values - Set the property of a . The following code example sets the format for specific columns using the property of the columns. Values in the `UnitPrice` column appear in the current culture-specific currency format, with negative values surrounded by parentheses. Values in the `ShipDate` column appear in the current culture-specific short date format. For more information about values, see [Formatting Types](/dotnet/standard/base-types/formatting-types). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control-using-the-designer.md index 37cd68015b..b83ad75efa 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control-using-the-designer.md @@ -32,7 +32,7 @@ As an initial step in formatting a data grid, you can set the properties of the The following procedure requires a **Windows Application** project with a form containing a control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). In Visual Studio 2005, the control is not in the **Toolbox** by default. For more information, see [How to: Add Items to the Toolbox](/previous-versions/visualstudio/visual-studio-2010/ms165355(v=vs.100)). -### To establish a default style for the DataGrid control +## To establish a default style for the DataGrid control 1. Select the control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control.md b/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control.md index 7cc265e524..ceed941f97 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-format-the-windows-forms-datagrid-control.md @@ -29,7 +29,7 @@ There are three basic aspects of formatting the itself. These color and format choices form a base from which you can then make changes depending on the data tables and columns displayed. -### To establish a default style for the DataGrid control +## To establish a default style for the DataGrid control 1. Set the following properties as appropriate: diff --git a/dotnet-desktop-guide/winforms/controls/how-to-freeze-columns-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-freeze-columns-in-the-windows-forms-datagridview-control.md index 2369b2c7cb..a41118f8e3 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-freeze-columns-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-freeze-columns-in-the-windows-forms-datagridview-control.md @@ -26,7 +26,7 @@ The property of a colum There is support for this task in Visual Studio. Also see [How to: Freeze Columns in the Windows Forms DataGridView Control Using the Designer](freeze-columns-in-the-datagrid-using-the-designer.md). -### To freeze a column programmatically +## To freeze a column programmatically - Set the property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-group-controls-with-the-windows-forms-groupbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-group-controls-with-the-windows-forms-groupbox-control.md index 1185f9bc01..5794ca3c37 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-group-controls-with-the-windows-forms-groupbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-group-controls-with-the-windows-forms-groupbox-control.md @@ -20,7 +20,7 @@ Windows Forms controls are used to group ot - For moving the controls as a unit at design time. -### To create a group of controls +## To create a group of controls 1. Draw a control on a form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-group-items-in-a-windows-forms-listview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-group-items-in-a-windows-forms-listview-control.md index d884ec85cd..4360c68a72 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-group-items-in-a-windows-forms-listview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-group-items-in-a-windows-forms-listview-control.md @@ -24,7 +24,7 @@ With the grouping feature of the control, y To enable grouping, you must first create one or more groups either in the designer or programmatically. After a group has been defined, you can assign items to groups. You can also move items from one group to another programmatically. -### To add groups +## To add groups 1. Use the method of the collection. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-group-windows-forms-radiobutton-controls-to-function-as-a-set.md b/dotnet-desktop-guide/winforms/controls/how-to-group-windows-forms-radiobutton-controls-to-function-as-a-set.md index bfd743d1cd..e98bb51b7c 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-group-windows-forms-radiobutton-controls-to-function-as-a-set.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-group-windows-forms-radiobutton-controls-to-function-as-a-set.md @@ -17,7 +17,7 @@ Windows Forms controls are designed to g You group radio buttons by drawing them inside a container such as a control, a control, or a form. All radio buttons that are added directly to a form become one group. To add separate groups, you must place them inside panels or group boxes. For more information about panels or group boxes, see [Panel Control Overview](panel-control-overview-windows-forms.md) or [GroupBox Control Overview](groupbox-control-overview-windows-forms.md). -### To group RadioButton controls as a set to function independently of other sets +## To group RadioButton controls as a set to function independently of other sets 1. Drag a or control from the **Windows Forms** tab on the **Toolbox** onto the form. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-hide-column-headers-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-hide-column-headers-in-the-windows-forms-datagridview-control.md index 68bfa1fb67..5fa039b42b 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-hide-column-headers-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-hide-column-headers-in-the-windows-forms-datagridview-control.md @@ -17,7 +17,7 @@ ms.assetid: e4ad5f68-50d2-4b9e-93ee-9d622423a8ab Sometimes you will want to display a without column headers. In the control, the property value determines whether the column headers are displayed. -### To hide the column headers +## To hide the column headers - Set the property to `false`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-hide-columns-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-hide-columns-in-the-windows-forms-datagridview-control.md index 2f5e092cd7..a79533efa2 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-hide-columns-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-hide-columns-in-the-windows-forms-datagridview-control.md @@ -21,7 +21,7 @@ In the control, the property to `false`. To hide a `CustomerID` column that is automatically generated during data binding, place the following code example in a event handler. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-hide-toolstripmenuitems.md b/dotnet-desktop-guide/winforms/controls/how-to-hide-toolstripmenuitems.md index 8401be960e..1b0b8c2d4b 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-hide-toolstripmenuitems.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-hide-toolstripmenuitems.md @@ -20,7 +20,7 @@ ms.assetid: 418a768f-808a-44cd-8cef-f4e161883621 Hiding menu items is a way to control the user interface of your application and restrict user commands. Often, you will want to hide an entire menu when all of the menu items on it are unavailable. This presents fewer distractions for the user. Furthermore, you might want to both hide and disable the menu or menu item, as hiding alone does not prevent the user from accessing a menu command by using a shortcut key. -### To hide any menu item programmatically +## To hide any menu item programmatically - Within the method where you set the properties of the menu item, add code to set the property to `false`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-insert-a-menustrip-into-an-mdi-drop-down-menu-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-insert-a-menustrip-into-an-mdi-drop-down-menu-windows-forms.md index 801858972d..7d3403f7c6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-insert-a-menustrip-into-an-mdi-drop-down-menu-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-insert-a-menustrip-into-an-mdi-drop-down-menu-windows-forms.md @@ -19,7 +19,7 @@ In some applications, the kind of a multiple-document interface (MDI) child wind The following procedure uses the , , , and properties to insert a group of menu items from the MDI child menu into the drop-down part of the MDI parent menu. Closing the MDI child window removes the inserted menu items from the MDI parent. -### To insert a MenuStrip into an MDI drop-down menu +## To insert a MenuStrip into an MDI drop-down menu 1. Create a form and set its property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-load-files-into-the-windows-forms-richtextbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-load-files-into-the-windows-forms-richtextbox-control.md index 036cc568ec..be4ead1ad4 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-load-files-into-the-windows-forms-richtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-load-files-into-the-windows-forms-richtextbox-control.md @@ -23,7 +23,7 @@ ms.assetid: c03451be-f285-4428-a71a-c41e002cc919 The Windows Forms control can display a plain-text, Unicode plain-text, or Rich-Text-Format (RTF) file. To do so, call the method. You can also use the method to load data from a stream. For more information, see . -### To load a file into the RichTextBox control +## To load a file into the RichTextBox control 1. Determine the path of the file to be opened using the component. For an overview, see [OpenFileDialog Component Overview](openfiledialog-component-overview-windows-forms.md). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-make-columns-read-only-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-make-columns-read-only-in-the-windows-forms-datagridview-control.md index 9aabdcfb20..46027ab84c 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-make-columns-read-only-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-make-columns-read-only-in-the-windows-forms-datagridview-control.md @@ -18,7 +18,7 @@ Not all data is meant for editing. In the property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-make-your-control-invisible-at-run-time.md b/dotnet-desktop-guide/winforms/controls/how-to-make-your-control-invisible-at-run-time.md index 432f7c77da..8a67ebde92 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-make-your-control-invisible-at-run-time.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-make-your-control-invisible-at-run-time.md @@ -19,7 +19,7 @@ ms.assetid: 69eb2e72-32f5-4f79-a157-c2c5f60c1628 There are times when you might want to create a user control that is invisible at run time. For example, a control that is an alarm clock might be invisible except when the alarm was sounding. This is easily accomplished by setting the property. If the property is `true`, your control will appear as normal. If `false`, your control will be hidden. Although code in your control may still run while invisible, you will not be able to interact with the control through the user interface. If you want to create an invisible control that still responds to user input (for example, mouse clicks), you should create a transparent control. For more information, see [Giving Your Control a Transparent Background](how-to-give-your-control-a-transparent-background.md). -### To make your control invisible at run time +## To make your control invisible at run time 1. Set the property to `false`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-modify-the-size-or-placement-of-a-picture-at-run-time-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-modify-the-size-or-placement-of-a-picture-at-run-time-windows-forms.md index 6f13dea721..b64401619e 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-modify-the-size-or-placement-of-a-picture-at-run-time-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-modify-the-size-or-placement-of-a-picture-at-run-time-windows-forms.md @@ -29,7 +29,7 @@ If you use the Windows Forms control on a Stretching a picture (especially one in bitmap format) can produce a loss in image quality. Metafiles, which are lists of graphics instructions for drawing images at run time, are better suited for stretching than bitmaps are. -### To set the SizeMode property at run time +## To set the SizeMode property at run time 1. Set to (the default), , , or . means that the image is placed in the control's upper-left corner; if the image is larger than the control, its lower and right edges are clipped. means that the image is centered within the control; if the image is larger than the control, the picture's outside edges are clipped. means that the size of the control is adjusted to the size of the image. is the reverse, and means that the size of the image is adjusted to the size of the control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-navigate-data-with-the-windows-forms-bindingnavigator-control.md b/dotnet-desktop-guide/winforms/controls/how-to-navigate-data-with-the-windows-forms-bindingnavigator-control.md index edd5dc3829..72edd868f6 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-navigate-data-with-the-windows-forms-bindingnavigator-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-navigate-data-with-the-windows-forms-bindingnavigator-control.md @@ -22,7 +22,7 @@ The control is a control, there is a corresponding member of the component that programmatically allows the same functionality. For example, the button corresponds to the method of the component, the button corresponds to the method, and so on. As a result, enabling the control to navigate data records is a simple as setting its property to the appropriate component on the form. -### To set up the BindingNavigator control +## To set up the BindingNavigator control 1. Add a component named `bindingSource1` and two controls named `textBox1` and `textBox2`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-opt-out-of-file-dialog-box-automatic-upgrade.md b/dotnet-desktop-guide/winforms/controls/how-to-opt-out-of-file-dialog-box-automatic-upgrade.md index 95d0b24e2c..af99db7978 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-opt-out-of-file-dialog-box-automatic-upgrade.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-opt-out-of-file-dialog-box-automatic-upgrade.md @@ -16,7 +16,7 @@ ms.assetid: 522e482e-cc01-48b1-8d59-9617dc2c4ac1 When the and classes are used in an application, their appearance and behavior depend on the version of Windows the application is running on. When an application that was created on the .NET Framework 2.0 or earlier is displayed on Windows Vista, and are automatically displayed with the Windows Vista appearance and behavior. Starting in the .NET Framework 3.0, you can opt out of the automatic upgrade to display the and with a Windows XP-style appearance and behavior. -### To opt out of file dialog box automatic upgrade +## To opt out of file dialog box automatic upgrade 1. Set the property of or to `false` before you display the dialog box. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-position-a-toolstripitem-on-a-toolstrip.md b/dotnet-desktop-guide/winforms/controls/how-to-position-a-toolstripitem-on-a-toolstrip.md index 7eb1e4e51e..874c0d21d1 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-position-a-toolstripitem-on-a-toolstrip.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-position-a-toolstripitem-on-a-toolstrip.md @@ -13,7 +13,7 @@ ms.assetid: 11fd7c5b-ee5c-4993-9a11-89127ff0aa7a You can move or add a to the left or right side of a . -### To move or add a ToolStripItem to the left side of a ToolStrip +## To move or add a ToolStripItem to the left side of a ToolStrip 1. Set the property of the to . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-put-quotation-marks-in-a-string-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-put-quotation-marks-in-a-string-windows-forms.md index 71b5c7f826..97f5d34b83 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-put-quotation-marks-in-a-string-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-put-quotation-marks-in-a-string-windows-forms.md @@ -22,7 +22,7 @@ She said, "You deserve a treat!" As an alternative, you can also use the field as a constant. -### To place quotation marks in a string in your code +## To place quotation marks in a string in your code 1. In Visual Basic, insert two quotation marks in a row as an embedded quotation mark. In Visual C# and Visual C++, insert the escape sequence \\" as an embedded quotation mark. For example, to create the preceding string, use the following code. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-remove-a-toolstripmenuitem-from-an-mdi-drop-down-menu-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-remove-a-toolstripmenuitem-from-an-mdi-drop-down-menu-windows-forms.md index 81fe9a167d..690ff723b3 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-remove-a-toolstripmenuitem-from-an-mdi-drop-down-menu-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-remove-a-toolstripmenuitem-from-an-mdi-drop-down-menu-windows-forms.md @@ -20,7 +20,7 @@ In some applications, the kind of a multiple-document interface (MDI) child wind The following procedure uses the , , , and properties to remove a menu item from the drop-down part of the MDI parent menu. Closing the MDI child window restores the removed menu items to the MDI parent menu. -### To remove a MenuStrip from an MDI drop-down menu +## To remove a MenuStrip from an MDI drop-down menu 1. Create a form and set its property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-remove-items-from-windows-forms-domainupdown-controls.md b/dotnet-desktop-guide/winforms/controls/how-to-remove-items-from-windows-forms-domainupdown-controls.md index 3def3a8f5f..402b6ecf34 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-remove-items-from-windows-forms-domainupdown-controls.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-remove-items-from-windows-forms-domainupdown-controls.md @@ -17,7 +17,7 @@ ms.assetid: e70f5cbc-b497-41a9-975a-344c00e56ed2 You can remove items from the Windows Forms control by calling the or method of the class. The method removes a specific item, while the method removes an item by its position. -### To remove an item +## To remove an item - Use the method of the class to remove an item by name. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-render-a-visual-style-element.md b/dotnet-desktop-guide/winforms/controls/how-to-render-a-visual-style-element.md index 8f4675e479..f8c4d9596f 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-render-a-visual-style-element.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-render-a-visual-style-element.md @@ -18,7 +18,7 @@ ms.assetid: a207781b-1baa-4ce9-b788-1e951bd4b5df The namespace exposes objects that represent the Windows user interface (UI) elements supported by visual styles. This topic demonstrates how to use the class to render the that represents the **Log Off** and **Shut Down** buttons of the Start menu. -### To render a visual style element +## To render a visual style element 1. Create a and set it to the element you want to draw. Note the use of the property and the method; the constructor will throw an exception if visual styles are disabled or an element is undefined. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-respond-to-clicks-in-the-windows-forms-datagrid-control.md b/dotnet-desktop-guide/winforms/controls/how-to-respond-to-clicks-in-the-windows-forms-datagrid-control.md index 3f6e7ac966..fa09371602 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-respond-to-clicks-in-the-windows-forms-datagrid-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-respond-to-clicks-in-the-windows-forms-datagrid-control.md @@ -23,7 +23,7 @@ ms.assetid: a0aa204b-8351-4d82-9933-ee21a5c9e409 After the Windows Forms is connected to a database, you can monitor which cell the user clicked. -### To detect when the user of the DataGrid selects a different cell +## To detect when the user of the DataGrid selects a different cell - In the event handler, write code to respond appropriately. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-button-clicks.md b/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-button-clicks.md index 0c7f7a0c67..8f2e5dd031 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-button-clicks.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-button-clicks.md @@ -27,7 +27,7 @@ Clicking a control also generates a number of If the user attempts to double-click the control, each click will be processed separately; that is, the control does not support the double-click event. -### To respond to a button click +## To respond to a button click - In the button's `Click` write the code to run. `Button1_Click` must be bound to the control. For more information, see [How to: Create Event Handlers at Run Time for Windows Forms](how-to-add-an-event-handler.md#handle-an-event-at-runtime). diff --git a/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-checkbox-clicks.md b/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-checkbox-clicks.md index 8c35a350d4..fdf5e96c36 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-checkbox-clicks.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-respond-to-windows-forms-checkbox-clicks.md @@ -20,7 +20,7 @@ ms.assetid: c39f901e-8899-43b6-aa31-939cbf7089fb Whenever a user clicks a Windows Forms control, the event occurs. You can program your application to perform some action depending upon the state of the check box. -### To respond to CheckBox clicks +## To respond to CheckBox clicks 1. In the event handler, use the property to determine the control's state, and perform any necessary action. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-save-files-using-the-savefiledialog-component.md b/dotnet-desktop-guide/winforms/controls/how-to-save-files-using-the-savefiledialog-component.md index 71c972170a..dedc7d044b 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-save-files-using-the-savefiledialog-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-save-files-using-the-savefiledialog-component.md @@ -19,7 +19,7 @@ ms.assetid: 02e8f409-b83f-4707-babb-e71f6b223d90 The component allows users to browse the file system and select files to be saved. The dialog box returns the path and name of the file the user has selected in the dialog box. However, you must write the code to actually write the files to disk. -### To save a file using the SaveFileDialog component +## To save a file using the SaveFileDialog component - Display the **Save File** dialog box and call a method to save the file selected by the user. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-save-files-with-the-windows-forms-richtextbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-save-files-with-the-windows-forms-richtextbox-control.md index 01a5319ceb..6cc24f5cf0 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-save-files-with-the-windows-forms-richtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-save-files-with-the-windows-forms-richtextbox-control.md @@ -35,7 +35,7 @@ The Windows Forms control can write the To save a file, call the method. You can also use the **SaveFile** method to save data to a stream. For more information, see . -### To save the contents of the control to a file +## To save the contents of the control to a file 1. Determine the path of the file to be saved. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-select-a-range-of-dates-in-the-windows-forms-monthcalendar-control.md b/dotnet-desktop-guide/winforms/controls/how-to-select-a-range-of-dates-in-the-windows-forms-monthcalendar-control.md index 4c3eaffae4..8cae5582ae 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-select-a-range-of-dates-in-the-windows-forms-monthcalendar-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-select-a-range-of-dates-in-the-windows-forms-monthcalendar-control.md @@ -19,7 +19,7 @@ ms.assetid: 95d9ab95-b0f8-4c19-9f63-b5cd4593a5d0 An important feature of the Windows Forms control is that the user can select a range of dates. This feature is an improvement over the date-selection feature of the control, which only enables the user to select a single date/time value. You can set a range of dates or get a selection range set by the user by using properties of the control. The following code example demonstrates how to set a selection range. -### To select a range of dates +## To select a range of dates 1. Create objects that represent the first and last dates in a range. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-select-text-in-the-windows-forms-textbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-select-text-in-the-windows-forms-textbox-control.md index 2705044583..1c62d92393 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-select-text-in-the-windows-forms-textbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-select-text-in-the-windows-forms-textbox-control.md @@ -18,7 +18,7 @@ ms.assetid: 8c591546-6a01-45c7-8e03-f78431f903b1 You can select text programmatically in the Windows Forms control. For example, if you create a function that searches text for a particular string, you can select the text to visually alert the reader of the found string's position. -### To select text programmatically +## To select text programmatically 1. Set the property to the beginning of the text you want to select. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-alternating-row-styles-for-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-alternating-row-styles-for-the-windows-forms-datagridview-control.md index 4a996cb77f..f6f55c418d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-alternating-row-styles-for-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-alternating-row-styles-for-the-windows-forms-datagridview-control.md @@ -21,7 +21,7 @@ With the control, you can specify compl There is support for this task in Visual Studio. Also see [How to: Set Alternating Row Styles for the Windows Forms DataGridView Control Using the Designer](set-alternating-row-styles-for-the-datagrid-using-the-designer.md). -### To set alternating row styles programmatically +## To set alternating row styles programmatically - Set the properties of the objects returned by the and properties of the . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-and-return-dates-with-the-windows-forms-datetimepicker-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-and-return-dates-with-the-windows-forms-datetimepicker-control.md index 6307079239..afbc01ab75 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-and-return-dates-with-the-windows-forms-datetimepicker-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-and-return-dates-with-the-windows-forms-datetimepicker-control.md @@ -24,7 +24,7 @@ The property returns a , , , and properties return integer values for those time units. To configure the control to display times, see [How to: Display Time with the DateTimePicker Control](how-to-display-time-with-the-datetimepicker-control.md). -### To set the date and time value of the control +## To set the date and time value of the control - Set the property to a date or time value. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-default-cell-styles-for-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-default-cell-styles-for-the-windows-forms-datagridview-control.md index 586beabe80..4a00aae9e4 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-default-cell-styles-for-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-default-cell-styles-for-the-windows-forms-datagridview-control.md @@ -19,7 +19,7 @@ With the control, you can specify defau There is extensive support for this task in Visual Studio. Also see [How to: Set Default Cell Styles and Data Formats for the Windows Forms DataGridView Control Using the Designer](default-cell-styles-datagridview.md). -### To set the default cell styles programmatically +## To set the default cell styles programmatically 1. Set the properties of the retrieved through the property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-font-and-color-styles-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-font-and-color-styles-in-the-windows-forms-datagridview-control.md index 1cfdb5fc4d..4f6331e9ba 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-font-and-color-styles-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-font-and-color-styles-in-the-windows-forms-datagridview-control.md @@ -22,7 +22,7 @@ The following procedures demonstrate basic customization of cell appearance usin There is extensive support for this task in Visual Studio. Also see [How to: Set Default Cell Styles and Data Formats for the Windows Forms DataGridView Control Using the Designer](default-cell-styles-datagridview.md). -### To specify the font used by DataGridView cells +## To specify the font used by DataGridView cells - Set the property of a . The following code example uses the property to set the font for the entire control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-font-attributes-for-the-windows-forms-richtextbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-font-attributes-for-the-windows-forms-richtextbox-control.md index 8c62dc5d24..97dc0728ab 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-font-attributes-for-the-windows-forms-richtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-font-attributes-for-the-windows-forms-richtextbox-control.md @@ -22,7 +22,7 @@ ms.assetid: 2bc23ddb-0529-4489-a1a2-ad253cb43f9a The Windows Forms control has numerous options for formatting the text it displays. You can make the selected characters bold, underlined, or italic, using the property. You can also use this property to change the size and typeface of the selected characters. The property enables you to change the selected characters' color. -### To change the appearance of characters +## To change the appearance of characters 1. Set the property to an appropriate font. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-icons-for-the-windows-forms-treeview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-icons-for-the-windows-forms-treeview-control.md index 6e868b04ce..de63ac17b4 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-icons-for-the-windows-forms-treeview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-icons-for-the-windows-forms-treeview-control.md @@ -23,7 +23,7 @@ The Windows Forms control can display icons > [!NOTE] > A bug in Microsoft .NET Framework version 1.1 prevents images from appearing on nodes when your application calls . To work around this bug, call in your `Main` method immediately after calling . This bug is fixed in .NET Framework 2.0. -### To display images in a tree view +## To display images in a tree view 1. Set the control's property to the existing control you wish to use. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-options-with-windows-forms-checkbox-controls.md b/dotnet-desktop-guide/winforms/controls/how-to-set-options-with-windows-forms-checkbox-controls.md index 4627258f04..0128795436 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-options-with-windows-forms-checkbox-controls.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-options-with-windows-forms-checkbox-controls.md @@ -20,7 +20,7 @@ ms.assetid: 2ac70498-7e3e-4e07-8901-ccabaeb5fd3e A Windows Forms control is used to give users True/False or Yes/No options. The control displays a check mark when it is selected. -### To set options with CheckBox controls +## To set options with CheckBox controls 1. Examine the value of the property to determine its state, and use that value to set an option. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-pictures-at-run-time-windows-forms.md b/dotnet-desktop-guide/winforms/controls/how-to-set-pictures-at-run-time-windows-forms.md index 3ab7f986f4..c5a68a4702 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-pictures-at-run-time-windows-forms.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-pictures-at-run-time-windows-forms.md @@ -21,7 +21,7 @@ ms.assetid: 18ca41d0-68a5-4660-985e-a6c1fbc01d76 You can programmatically set the image displayed by a Windows Forms control. -### To set a picture programmatically +## To set a picture programmatically - Set the property using the method of the class. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-the-background-of-a-windows-forms-panel.md b/dotnet-desktop-guide/winforms/controls/how-to-set-the-background-of-a-windows-forms-panel.md index d0675ee03a..314816ba1a 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-the-background-of-a-windows-forms-panel.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-the-background-of-a-windows-forms-panel.md @@ -19,7 +19,7 @@ ms.assetid: 096cbd8d-45cc-47b8-b1ef-a27f60ea8be0 A Windows Forms control can display both a background color and a background image. The property sets the background color for the contained controls, such as labels and radio buttons. If the property is not set, the selection will fill the entire panel. If the property is set, the image will be displayed behind the contained controls. -### To set the background programmatically +## To set the background programmatically 1. Set the panel's property to a value of type . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-the-format-for-the-windows-forms-numericupdown-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-the-format-for-the-windows-forms-numericupdown-control.md index cadf445517..f0d930505f 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-the-format-for-the-windows-forms-numericupdown-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-the-format-for-the-windows-forms-numericupdown-control.md @@ -17,7 +17,7 @@ ms.assetid: fa7c5557-6bfb-45b2-975d-8887b23b0ba0 You can configure how values are displayed in the Windows Forms control. The property determines how many numbers appear after the decimal point; the default is 0. The property determines whether a separator will be inserted between every three decimal digits; the default is `false`. The control can display values in hexadecimal instead of decimal format, if the property is set to `true`; the default is `false`. -### To format the numeric value +## To format the numeric value - Display a decimal value by setting the property to an integer and setting the property to `true` or `false`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-the-size-of-status-bar-panels.md b/dotnet-desktop-guide/winforms/controls/how-to-set-the-size-of-status-bar-panels.md index b5328ec0f9..d1279931cc 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-the-size-of-status-bar-panels.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-the-size-of-status-bar-panels.md @@ -21,7 +21,7 @@ ms.assetid: a01bee43-d9eb-4954-84e6-45a93532d08d Each instance of the class within a [StatusBar Control](statusbar-control-windows-forms.md) control has a number of dynamic properties that determine its width and resize behavior at run time. -### To set the size of a panel +## To set the size of a panel 1. In a procedure, set the , , and properties (or any subset therein) for the status-bar panels using their index passed through the property of the collection. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-the-sizing-modes-of-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-the-sizing-modes-of-the-windows-forms-datagridview-control.md index de6ce468b2..621e80c564 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-the-sizing-modes-of-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-the-sizing-modes-of-the-windows-forms-datagridview-control.md @@ -16,7 +16,7 @@ ms.assetid: e9ad15e6-b4bb-44aa-a767-3738e9db1651 The following procedures demonstrate some common scenarios that customize or combine the sizing options available for the control and for specific columns in a control. -### To create a fixed-width column +## To create a fixed-width column - Set the property to , the property to , the property to `true`, and the property to an appropriate value. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-the-value-displayed-by-the-windows-forms-progressbar-control.md b/dotnet-desktop-guide/winforms/controls/how-to-set-the-value-displayed-by-the-windows-forms-progressbar-control.md index 12012fc697..14ff0b9e3d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-the-value-displayed-by-the-windows-forms-progressbar-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-the-value-displayed-by-the-windows-forms-progressbar-control.md @@ -27,7 +27,7 @@ The .NET Framework gives you several different ways to display a given value wit The most direct way to set the value displayed by a progress bar is by setting the property. This can be done either at design time or at run time. -### To set the ProgressBar value directly +## To set the ProgressBar value directly 1. Set the control's and values. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-set-up-automatic-menu-merging-for-mdi-applications.md b/dotnet-desktop-guide/winforms/controls/how-to-set-up-automatic-menu-merging-for-mdi-applications.md index 1df998f845..a5b488b5f3 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-set-up-automatic-menu-merging-for-mdi-applications.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-set-up-automatic-menu-merging-for-mdi-applications.md @@ -13,7 +13,7 @@ ms.assetid: 55e32cad-1141-4a56-aa33-d9543ca3d393 The following procedure gives the basic steps for setting up automatic merging in a multiple-document interface (MDI) application with . -### To set up automatic menu merging +## To set up automatic menu merging 1. Create the MDI parent form by setting its property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-show-a-color-palette-with-the-colordialog-component.md b/dotnet-desktop-guide/winforms/controls/how-to-show-a-color-palette-with-the-colordialog-component.md index 1ab3a617d0..1bbd9c19fc 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-show-a-color-palette-with-the-colordialog-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-show-a-color-palette-with-the-colordialog-component.md @@ -22,7 +22,7 @@ ms.assetid: ee050f61-dbc8-4436-ba22-51360981ab48 The [ColorDialog](colordialog-component-windows-forms.md) component displays a palette of colors and returns a property containing the color the user has selected. -### To choose a color using the ColorDialog component +## To choose a color using the ColorDialog component 1. Display the dialog box using the method. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-show-a-font-list-with-the-fontdialog-component.md b/dotnet-desktop-guide/winforms/controls/how-to-show-a-font-list-with-the-fontdialog-component.md index 910178f85f..c2bfa5992b 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-show-a-font-list-with-the-fontdialog-component.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-show-a-font-list-with-the-fontdialog-component.md @@ -23,7 +23,7 @@ The [FontDialog](fontdialog-component-windows-forms.md) component allows users t The font selected in the dialog box is returned in the property. Thus, taking advantage of the font selected by the user is as easy as reading a property. -### To select font properties using the FontDialog Component +## To select font properties using the FontDialog Component 1. Display the dialog box using the method. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-size-a-windows-forms-label-control-to-fit-its-contents.md b/dotnet-desktop-guide/winforms/controls/how-to-size-a-windows-forms-label-control-to-fit-its-contents.md index 8c27a712a9..15e6669046 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-size-a-windows-forms-label-control-to-fit-its-contents.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-size-a-windows-forms-label-control-to-fit-its-contents.md @@ -16,7 +16,7 @@ ms.assetid: 99648964-63b2-438c-980e-d24103ad602b The Windows Forms control can be single-line or multi-line, and it can be either fixed in size or can automatically resize itself to accommodate its caption. The property helps you size the controls to fit larger or smaller captions, which is particularly useful if the caption will change at run time. -### To make a label control resize dynamically to fit its contents +## To make a label control resize dynamically to fit its contents 1. Set its property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-specify-the-edit-mode-for-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/how-to-specify-the-edit-mode-for-the-windows-forms-datagridview-control.md index 066c4c0b19..28cbaf136e 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-specify-the-edit-mode-for-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-specify-the-edit-mode-for-the-windows-forms-datagridview-control.md @@ -28,7 +28,7 @@ In edit mode, the user can change the cell value and press ENTER to commit the c You can configure a control so that a cell enters edit mode as soon as it becomes the current cell. The behavior of the ENTER and ESC keys is unchanged in this case, but the cell remains in edit mode after the value is committed or reverted. You can also configure the control so that cells enter edit mode only when users type in the cell or only when users press F2. Finally, you can prevent cells from entering edit mode except when you call the method. -### To change the edit mode of a DataGridView control +## To change the edit mode of a DataGridView control - Set the property to the appropriate enumeration. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-split-a-window-horizontally.md b/dotnet-desktop-guide/winforms/controls/how-to-split-a-window-horizontally.md index 0b83cf1874..2a3f9a5684 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-split-a-window-horizontally.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-split-a-window-horizontally.md @@ -21,7 +21,7 @@ The following code example makes the splitter that divides the [!NOTE] > The property of the control determines the direction of the splitter, not of the control itself. -### To split a window horizontally +## To split a window horizontally 1. Within a procedure, set the property of the control to . diff --git a/dotnet-desktop-guide/winforms/controls/how-to-trigger-menu-events-for-toolbar-buttons.md b/dotnet-desktop-guide/winforms/controls/how-to-trigger-menu-events-for-toolbar-buttons.md index 5789a90e51..de73d5ef90 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-trigger-menu-events-for-toolbar-buttons.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-trigger-menu-events-for-toolbar-buttons.md @@ -26,7 +26,7 @@ On the event of the control has been added to a Windows Form. -### To handle the Click event on a toolbar +## To handle the Click event on a toolbar 1. In a procedure, add toolbar buttons to the control. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-use-tooltips-in-toolstrip-controls.md b/dotnet-desktop-guide/winforms/controls/how-to-use-tooltips-in-toolstrip-controls.md index e02b4a4200..62e7eff954 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-use-tooltips-in-toolstrip-controls.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-use-tooltips-in-toolstrip-controls.md @@ -14,7 +14,7 @@ ms.assetid: c5d86024-a7c5-44ee-8b3f-2daf53d80d3e You can display a for the control you want by setting the control's property to `true`. -### To display a ToolTip +## To display a ToolTip - Set the property of the control to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-view-multiple-lines-in-the-windows-forms-textbox-control.md b/dotnet-desktop-guide/winforms/controls/how-to-view-multiple-lines-in-the-windows-forms-textbox-control.md index c3dde14aca..376601216d 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-view-multiple-lines-in-the-windows-forms-textbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-view-multiple-lines-in-the-windows-forms-textbox-control.md @@ -19,7 +19,7 @@ ms.assetid: 43173201-0b74-4067-a472-605029ca5f35 By default, the Windows Forms control displays a single line of text and does not display scroll bars. If the text is longer than the available space, only part of the text is visible. You can change this default behavior by setting the , , and properties to appropriate values. -### To display a carriage return in the TextBox control +## To display a carriage return in the TextBox control - To display a carriage return in a multi-line , use the property. diff --git a/dotnet-desktop-guide/winforms/controls/how-to-wrap-a-windows-forms-control-with-toolstripcontrolhost.md b/dotnet-desktop-guide/winforms/controls/how-to-wrap-a-windows-forms-control-with-toolstripcontrolhost.md index aea061323d..f0ffccb68a 100644 --- a/dotnet-desktop-guide/winforms/controls/how-to-wrap-a-windows-forms-control-with-toolstripcontrolhost.md +++ b/dotnet-desktop-guide/winforms/controls/how-to-wrap-a-windows-forms-control-with-toolstripcontrolhost.md @@ -18,7 +18,7 @@ ms.assetid: e2ce4990-661d-4882-a116-8a9eb575dc84 is designed to enable hosting of arbitrary Windows Forms controls by using the constructor or by extending itself. It is easier to wrap the control by extending and implementing properties and methods that expose frequently used properties and methods of the control. You can also expose events for the control at the level. -### To host a control in a ToolStripControlHost by derivation +## To host a control in a ToolStripControlHost by derivation 1. Extend . Implement a parameterless constructor that calls the base class constructor passing in the desired control. diff --git a/dotnet-desktop-guide/winforms/controls/implementing-virtual-mode-wf-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/implementing-virtual-mode-wf-datagridview-control.md index f4d076c7a8..cffd2087c1 100644 --- a/dotnet-desktop-guide/winforms/controls/implementing-virtual-mode-wf-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/implementing-virtual-mode-wf-datagridview-control.md @@ -26,7 +26,7 @@ To copy the code in this topic as a single listing, see [How to: Implement Virtu ## Creating the Form -#### To implement virtual mode +### To implement virtual mode 1. Create a class that derives from and contains a control. @@ -109,7 +109,7 @@ To copy the code in this topic as a single listing, see [How to: Implement Virtu You can now test the form to make sure it behaves as expected. -#### To test the form +### To test the form - Compile and run the application. diff --git a/dotnet-desktop-guide/winforms/controls/link-to-an-object-or-web-page-with-wf-linklabel-control.md b/dotnet-desktop-guide/winforms/controls/link-to-an-object-or-web-page-with-wf-linklabel-control.md index 1f418210fb..d0364fe7cc 100644 --- a/dotnet-desktop-guide/winforms/controls/link-to-an-object-or-web-page-with-wf-linklabel-control.md +++ b/dotnet-desktop-guide/winforms/controls/link-to-an-object-or-web-page-with-wf-linklabel-control.md @@ -25,7 +25,7 @@ The Windows Forms control allows you to cr ## Linking to Another Form -#### To link to another form with a LinkLabel control +### To link to another form with a LinkLabel control 1. Set the property to an appropriate caption. @@ -94,7 +94,7 @@ The Windows Forms control allows you to cr The control can also be used to display a Web page with the default browser. -#### To start Internet Explorer and link to a Web page with a LinkLabel control +### To start Internet Explorer and link to a Web page with a LinkLabel control 1. Set the property to an appropriate caption. diff --git a/dotnet-desktop-guide/winforms/controls/perform-a-custom-action-based-on-changes-in-a-cell-of-a-datagrid.md b/dotnet-desktop-guide/winforms/controls/perform-a-custom-action-based-on-changes-in-a-cell-of-a-datagrid.md index 757721289d..13d4af36a3 100644 --- a/dotnet-desktop-guide/winforms/controls/perform-a-custom-action-based-on-changes-in-a-cell-of-a-datagrid.md +++ b/dotnet-desktop-guide/winforms/controls/perform-a-custom-action-based-on-changes-in-a-cell-of-a-datagrid.md @@ -17,7 +17,7 @@ ms.assetid: 7fa44d01-97f4-4ccb-a149-bc72628d2c36 The control has a number of events you can use to detect changes in the state of cells. Two of the most commonly used are the and events. -### To detect changes in the values of DataGridView cells +## To detect changes in the values of DataGridView cells - Write a handler for the event. diff --git a/dotnet-desktop-guide/winforms/controls/remove-autogenerated-columns-from-a-wf-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/remove-autogenerated-columns-from-a-wf-datagridview-control.md index 60d5b7fe65..232c25ad52 100644 --- a/dotnet-desktop-guide/winforms/controls/remove-autogenerated-columns-from-a-wf-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/remove-autogenerated-columns-from-a-wf-datagridview-control.md @@ -18,7 +18,7 @@ When your control is set to autogenerat Another approach is to prevent columns from being auto-generated in the first place by setting the property of the underlying to . This tells the to skip creating a column for that particular data column during auto-generation. -### To remove autogenerated columns +## To remove autogenerated columns - Call the method on the collection. diff --git a/dotnet-desktop-guide/winforms/controls/selected-cells-rows-and-columns-datagridview.md b/dotnet-desktop-guide/winforms/controls/selected-cells-rows-and-columns-datagridview.md index b64c6154b0..bb157ec1aa 100644 --- a/dotnet-desktop-guide/winforms/controls/selected-cells-rows-and-columns-datagridview.md +++ b/dotnet-desktop-guide/winforms/controls/selected-cells-rows-and-columns-datagridview.md @@ -17,7 +17,7 @@ ms.assetid: d93c4b5b-498e-49bc-982a-2229d61778e4 You can get the selected cells, rows, or columns from a control by using the corresponding properties: , , and . In the following procedures, you will get the selected cells and display their row and column indexes in a . -### To get the selected cells in a DataGridView control +## To get the selected cells in a DataGridView control - Use the property. diff --git a/dotnet-desktop-guide/winforms/controls/set-alternating-row-styles-for-the-datagrid-using-the-designer.md b/dotnet-desktop-guide/winforms/controls/set-alternating-row-styles-for-the-datagrid-using-the-designer.md index c7bfdeab05..92c23bd204 100644 --- a/dotnet-desktop-guide/winforms/controls/set-alternating-row-styles-for-the-datagrid-using-the-designer.md +++ b/dotnet-desktop-guide/winforms/controls/set-alternating-row-styles-for-the-datagrid-using-the-designer.md @@ -20,7 +20,7 @@ With the control, you can specify compl The following procedure requires a **Windows Application** project with a form containing a control. For information about setting up such a project, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) and [How to: Add Controls to Windows Forms](how-to-add-to-a-form.md). -### Define styles for alternating rows +## Define styles for alternating rows 1. Select the control in the designer. diff --git a/dotnet-desktop-guide/winforms/controls/set-and-return-numeric-values-with-wf-numericupdown-control.md b/dotnet-desktop-guide/winforms/controls/set-and-return-numeric-values-with-wf-numericupdown-control.md index 4a1a46e573..51dc747b14 100644 --- a/dotnet-desktop-guide/winforms/controls/set-and-return-numeric-values-with-wf-numericupdown-control.md +++ b/dotnet-desktop-guide/winforms/controls/set-and-return-numeric-values-with-wf-numericupdown-control.md @@ -19,7 +19,7 @@ description: Learn how to set and return numeric values with the Windows Forms N The numeric value of the Windows Forms control is determined by its property. You can write conditional tests for the control's value just as with any other property. Once the property is set, you can adjust it directly by writing code to perform operations on it, or you can call the and methods. -### To set the numeric value +## To set the numeric value 1. Assign a value to the property in code or in the Properties window. diff --git a/dotnet-desktop-guide/winforms/controls/set-indents-hanging-indents-bulleted-paragraphs-with-wf-richtextbox.md b/dotnet-desktop-guide/winforms/controls/set-indents-hanging-indents-bulleted-paragraphs-with-wf-richtextbox.md index 9fe7aeddb2..f5ad85995c 100644 --- a/dotnet-desktop-guide/winforms/controls/set-indents-hanging-indents-bulleted-paragraphs-with-wf-richtextbox.md +++ b/dotnet-desktop-guide/winforms/controls/set-indents-hanging-indents-bulleted-paragraphs-with-wf-richtextbox.md @@ -21,7 +21,7 @@ description: Learn how to set indents, hanging indents, and bulleted paragraphs The Windows Forms control has numerous options for formatting the text it displays. You can format selected paragraphs as bulleted lists by setting the property. You can also use the , , and properties to set the indentation of paragraphs relative to the left and right edges of the control, and the left edge of other lines of text. -### To format a paragraph as a bulleted list +## To format a paragraph as a bulleted list 1. Set the property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/set-the-sort-modes-for-columns-wf-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/set-the-sort-modes-for-columns-wf-datagridview-control.md index 53085ace85..fb6ab2bedf 100644 --- a/dotnet-desktop-guide/winforms/controls/set-the-sort-modes-for-columns-wf-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/set-the-sort-modes-for-columns-wf-datagridview-control.md @@ -21,7 +21,7 @@ In the control, the property. diff --git a/dotnet-desktop-guide/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component.md b/dotnet-desktop-guide/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component.md index 35e6a412ef..db45d5ab14 100644 --- a/dotnet-desktop-guide/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component.md +++ b/dotnet-desktop-guide/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component.md @@ -24,7 +24,7 @@ You can expose the sorting and filtering capability of [!NOTE] > Storing sensitive information, such as a password, within the connection string can affect the security of your application. Using Windows Authentication (also known as integrated security) is a more secure way to control access to a database. For more information, see [Protecting Connection Information](/dotnet/framework/data/adonet/protecting-connection-information). -### To filter data with the BindingSource +## To filter data with the BindingSource - Set the property to expression that you want. diff --git a/dotnet-desktop-guide/winforms/controls/sort-the-contents-of-a-wf-combobox-listbox-or-checkedlistbox-control.md b/dotnet-desktop-guide/winforms/controls/sort-the-contents-of-a-wf-combobox-listbox-or-checkedlistbox-control.md index b0f726bded..7f84a85ce1 100644 --- a/dotnet-desktop-guide/winforms/controls/sort-the-contents-of-a-wf-combobox-listbox-or-checkedlistbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/sort-the-contents-of-a-wf-combobox-listbox-or-checkedlistbox-control.md @@ -18,7 +18,7 @@ Windows Forms controls do not sort when they are data-bound. To display sorted d If the control is not data-bound, you can sort it. -### To sort the list +## To sort the list 1. Set the `Sorted` property to `true`. diff --git a/dotnet-desktop-guide/winforms/controls/statusstrip-control-overview.md b/dotnet-desktop-guide/winforms/controls/statusstrip-control-overview.md index 3a0c15fd10..0a1f019a84 100644 --- a/dotnet-desktop-guide/winforms/controls/statusstrip-control-overview.md +++ b/dotnet-desktop-guide/winforms/controls/statusstrip-control-overview.md @@ -23,7 +23,7 @@ Also see [StatusStrip Items Collection Editor](/previous-versions/visualstudio/v Although replaces and extends the control of previous versions, is retained for both backward compatibility and future use if you choose. -### Important StatusStrip Members +## Important StatusStrip Members |Name|Description| |----------|-----------------| diff --git a/dotnet-desktop-guide/winforms/controls/toolstripcontainer-control-overview.md b/dotnet-desktop-guide/winforms/controls/toolstripcontainer-control-overview.md index cea40d6a78..21d82e7442 100644 --- a/dotnet-desktop-guide/winforms/controls/toolstripcontainer-control-overview.md +++ b/dotnet-desktop-guide/winforms/controls/toolstripcontainer-control-overview.md @@ -17,7 +17,7 @@ A has panels on its left, right, Any or all controls are directly selectable at design time and can be deleted. Each panel of a is expandable and collapsible, and resizes with the controls that it contains. -### Important ToolStripContainer Members +## Important ToolStripContainer Members |Name|Description| |----------|-----------------| diff --git a/dotnet-desktop-guide/winforms/controls/toolstrippanel-control-overview.md b/dotnet-desktop-guide/winforms/controls/toolstrippanel-control-overview.md index 5d01b9cc8d..1200be6c29 100644 --- a/dotnet-desktop-guide/winforms/controls/toolstrippanel-control-overview.md +++ b/dotnet-desktop-guide/winforms/controls/toolstrippanel-control-overview.md @@ -15,7 +15,7 @@ description: Learn how the ToolStripPanel control provides a single area for pos A provides a single area for positioning and rafting , , and controls. Multiple controls stack vertically or horizontally depending on the of the . -### Important ToolStripPanel Members +## Important ToolStripPanel Members |Name|Description| |----------|-----------------| diff --git a/dotnet-desktop-guide/winforms/controls/toolstripprogressbar-control-overview.md b/dotnet-desktop-guide/winforms/controls/toolstripprogressbar-control-overview.md index b1da45d9be..9259d24a3c 100644 --- a/dotnet-desktop-guide/winforms/controls/toolstripprogressbar-control-overview.md +++ b/dotnet-desktop-guide/winforms/controls/toolstripprogressbar-control-overview.md @@ -18,7 +18,7 @@ The combines the rafting and re Although replaces and adds functionality to the control in previous versions, is retained for both backward compatibility and future use if desired. -### Important ToolStripProgressBar Members +## Important ToolStripProgressBar Members |Name|Description| |----------|-----------------| diff --git a/dotnet-desktop-guide/winforms/controls/toolstripstatuslabel-control-overview.md b/dotnet-desktop-guide/winforms/controls/toolstripstatuslabel-control-overview.md index f3ba7e0768..6eabda9424 100644 --- a/dotnet-desktop-guide/winforms/controls/toolstripstatuslabel-control-overview.md +++ b/dotnet-desktop-guide/winforms/controls/toolstripstatuslabel-control-overview.md @@ -15,7 +15,7 @@ description: Learn how the ToolStripStatusLabel is a label for a StatusStrip and The is a label for a . Like the or , the provides a non-clickable display area for text, images, or both. The is hosted by a . -### Important ToolStripStatusLabel Members +## Important ToolStripStatusLabel Members |Name|Description| |----------|-----------------| diff --git a/dotnet-desktop-guide/winforms/controls/use-the-row-template-to-customize-rows-in-the-datagrid.md b/dotnet-desktop-guide/winforms/controls/use-the-row-template-to-customize-rows-in-the-datagrid.md index c3dce33d87..2fc6a0cfff 100644 --- a/dotnet-desktop-guide/winforms/controls/use-the-row-template-to-customize-rows-in-the-datagrid.md +++ b/dotnet-desktop-guide/winforms/controls/use-the-row-template-to-customize-rows-in-the-datagrid.md @@ -24,7 +24,7 @@ There are some situations where you must use the row template to achieve a parti > [!NOTE] > The row template is used only when rows are added. You cannot change existing rows by changing the row template. -### To use the row template +## To use the row template - Set properties on the object retrieved from the property. diff --git a/dotnet-desktop-guide/winforms/controls/view-errors-within-a-dataset-with-wf-errorprovider-component.md b/dotnet-desktop-guide/winforms/controls/view-errors-within-a-dataset-with-wf-errorprovider-component.md index c7adc73cd3..c8d8009f90 100644 --- a/dotnet-desktop-guide/winforms/controls/view-errors-within-a-dataset-with-wf-errorprovider-component.md +++ b/dotnet-desktop-guide/winforms/controls/view-errors-within-a-dataset-with-wf-errorprovider-component.md @@ -20,7 +20,7 @@ You can use the Windows Forms componen > [!NOTE] > If you change the error provider's and properties at run time, you should use the method to avoid conflicts. -### To display data errors +## To display data errors 1. Bind the component to a specific column within a data table. diff --git a/dotnet-desktop-guide/winforms/controls/walkthrough-arranging-controls-on-windows-forms-using-a-tablelayoutpanel.md b/dotnet-desktop-guide/winforms/controls/walkthrough-arranging-controls-on-windows-forms-using-a-tablelayoutpanel.md index e99c6a077c..4ffe98a73d 100644 --- a/dotnet-desktop-guide/winforms/controls/walkthrough-arranging-controls-on-windows-forms-using-a-tablelayoutpanel.md +++ b/dotnet-desktop-guide/winforms/controls/walkthrough-arranging-controls-on-windows-forms-using-a-tablelayoutpanel.md @@ -48,7 +48,7 @@ When you are finished, you will have an understanding of the role played by thes The first step is to create the project and set up the form. -#### To create the project +### To create the project 1. Create a Windows Application project called "TableLayoutPanelExample". For more information, see [How to: Create a Windows Forms application project](/visualstudio/ide/step-1-create-a-windows-forms-application-project) . @@ -58,7 +58,7 @@ The first step is to create the project and set up the form. The control allows you to easily arrange controls into rows and columns. -#### To arrange controls in rows and columns using a TableLayoutPanel +### To arrange controls in rows and columns using a TableLayoutPanel 1. Drag a control from the **Toolbox** onto your form. Note that, by default, the control has four cells. @@ -76,7 +76,7 @@ The control allows you to easily ar The anchoring behavior of child controls in a differs from the behavior in other container controls. The docking behavior of child controls is the same as other container controls. -#### Positioning controls within cells +### Positioning controls within cells 1. Select the first control. Change the value of its property to . Note that the control expands to fill its cell. @@ -90,7 +90,7 @@ The anchoring behavior of child controls in a and collections. -#### To set row and column properties +### To set row and column properties 1. Select the control in the **Windows Forms Designer**. @@ -108,7 +108,7 @@ You can set individual properties of rows and columns by using the control adds several new properties to controls at design time. Two of these properties are `RowSpan` and `ColumnSpan`. You can use these properties to make a control span more than one row or column. -#### To span rows and columns with a control +### To span rows and columns with a control 1. Select the control in the first row and first column. @@ -120,7 +120,7 @@ The control adds several new proper You can populate your control by double-clicking controls in the **Toolbox**. -#### To insert controls by double-clicking in the Toolbox +### To insert controls by double-clicking in the Toolbox 1. Drag a control from the **Toolbox** onto your form. @@ -132,7 +132,7 @@ You can populate your control by do When you are inserting controls into the control, you may run out of empty cells for your new controls. The control handles this situation automatically by increasing the number of cells. -#### To observe automatic handling of overflows +### To observe automatic handling of overflows 1. If there are still empty cells in the control, continue inserting new controls until the control is full. @@ -144,7 +144,7 @@ When you are inserting controls into the control and specify its size by drawing its outline in a cell. -#### To insert a Control by drawing its outline +### To insert a Control by drawing its outline 1. Drag a control from the **Toolbox** onto your form. @@ -160,7 +160,7 @@ You can insert a control into a con The control can contain only one child control per cell. -#### To demonstrate that multiple controls within cells are not permitted +### To demonstrate that multiple controls within cells are not permitted - Drag a control from the **Toolbox** into the control and drop it into one of the occupied cells. Note that the control does not allow you to drop the control into the occupied cell. @@ -168,7 +168,7 @@ The control can contain only one ch The control enables you to swap the controls occupying two different cells. -#### To swap controls +### To swap controls - Drag one of the controls from an occupied cell and drop into onto another occupied cell. Note that the two controls are moved from one cell into the other. diff --git a/dotnet-desktop-guide/winforms/controls/walkthrough-updating-status-bar-information-at-run-time.md b/dotnet-desktop-guide/winforms/controls/walkthrough-updating-status-bar-information-at-run-time.md index e563e1da47..79d1468e45 100644 --- a/dotnet-desktop-guide/winforms/controls/walkthrough-updating-status-bar-information-at-run-time.md +++ b/dotnet-desktop-guide/winforms/controls/walkthrough-updating-status-bar-information-at-run-time.md @@ -24,7 +24,7 @@ Often, a program will call for you to update the contents of status bar panels d In the following example, you will use an instance of the class to host a clock. -### To get the status bar ready for updating +## To get the status bar ready for updating 1. Create a new Windows form. diff --git a/dotnet-desktop-guide/winforms/controls/walkthrough-validating-data-in-the-windows-forms-datagridview-control.md b/dotnet-desktop-guide/winforms/controls/walkthrough-validating-data-in-the-windows-forms-datagridview-control.md index a4912f1c8b..7dfb1ebba0 100644 --- a/dotnet-desktop-guide/winforms/controls/walkthrough-validating-data-in-the-windows-forms-datagridview-control.md +++ b/dotnet-desktop-guide/winforms/controls/walkthrough-validating-data-in-the-windows-forms-datagridview-control.md @@ -32,7 +32,7 @@ In order to complete this walkthrough, you will need: ## Creating the Form -#### To validate data entered in a DataGridView +### To validate data entered in a DataGridView 1. Create a class that derives from and contains a control and a component. @@ -69,7 +69,7 @@ In order to complete this walkthrough, you will need: You can now test the form to make sure it behaves as expected. -#### To test the form +### To test the form - Compile and run the application. diff --git a/dotnet-desktop-guide/winforms/controls/walkthrough-working-with-the-maskedtextbox-control.md b/dotnet-desktop-guide/winforms/controls/walkthrough-working-with-the-maskedtextbox-control.md index fc2106c7d0..2cbe1e51f1 100644 --- a/dotnet-desktop-guide/winforms/controls/walkthrough-working-with-the-maskedtextbox-control.md +++ b/dotnet-desktop-guide/winforms/controls/walkthrough-working-with-the-maskedtextbox-control.md @@ -27,7 +27,7 @@ Tasks illustrated in this walkthrough include: ## Creating the Project and Adding a Control -#### To add a MaskedTextBox control to your form +### To add a MaskedTextBox control to your form 1. Open the form on which you want to place the control. @@ -43,7 +43,7 @@ For a summary of the characters that the Mask property supports, see the Remarks ## Alert the User to Input Errors -#### Add a balloon tip for rejected mask input +### Add a balloon tip for rejected mask input 1. Return to the **Toolbox** and add a to your form. @@ -78,7 +78,7 @@ For a summary of the characters that the Mask property supports, see the Remarks ## Alert the User to a Type that Is Not Valid -#### Add a balloon tip for invalid data types +### Add a balloon tip for invalid data types 1. In your form's event handler, assign a object representing the type to the control's property: diff --git a/dotnet-desktop-guide/winforms/forms/events.md b/dotnet-desktop-guide/winforms/forms/events.md index 22f09ed454..0998fd5364 100644 --- a/dotnet-desktop-guide/winforms/forms/events.md +++ b/dotnet-desktop-guide/winforms/forms/events.md @@ -138,7 +138,7 @@ For applications targeting .NET Framework, use traditional patterns with proper --- -### Best practices +## Best practices - **Use async/await consistently**: Don't mix async patterns with blocking calls. - **Handle exceptions**: Always wrap async operations in try-catch blocks in `async void` event handlers. diff --git a/dotnet-desktop-guide/winforms/how-to-change-the-borders-of-windows-forms.md b/dotnet-desktop-guide/winforms/how-to-change-the-borders-of-windows-forms.md index d8d2e4042e..780627db1b 100644 --- a/dotnet-desktop-guide/winforms/how-to-change-the-borders-of-windows-forms.md +++ b/dotnet-desktop-guide/winforms/how-to-change-the-borders-of-windows-forms.md @@ -20,7 +20,7 @@ There is extensive support for this task in Visual Studio. See also [How to: Change the Borders of Windows Forms Using the Designer](/previous-versions/visualstudio/visual-studio-2010/yettzh3e(v=vs.100)). -### To set the border style of Windows Forms programmatically +## To set the border style of Windows Forms programmatically - Set the property to the style you want. The following code example sets the border style of form `DlgBx1` to . diff --git a/dotnet-desktop-guide/winforms/how-to-display-dialog-boxes-for-windows-forms.md b/dotnet-desktop-guide/winforms/how-to-display-dialog-boxes-for-windows-forms.md index 68097c06c6..0706d9da11 100644 --- a/dotnet-desktop-guide/winforms/how-to-display-dialog-boxes-for-windows-forms.md +++ b/dotnet-desktop-guide/winforms/how-to-display-dialog-boxes-for-windows-forms.md @@ -19,7 +19,7 @@ ms.assetid: aaac1b38-c651-495a-8d3d-5a9bfb32fee3 You display a dialog box in the same way you display any other form in an application. The startup form loads automatically when the application is run. To make a second form or dialog box appear in the application, write code to load and display it. Similarly, to make the form or dialog box disappear, write code to unload or hide it. -### To display a dialog box +## To display a dialog box 1. Navigate to the event handler with which you want to open the dialog box. This can happen when a menu command is selected, when a button is clicked, or when any other event occurs. diff --git a/dotnet-desktop-guide/winforms/how-to-respond-to-font-scheme-changes-in-a-windows-forms-application.md b/dotnet-desktop-guide/winforms/how-to-respond-to-font-scheme-changes-in-a-windows-forms-application.md index 0939a4ebe2..f5321475f3 100644 --- a/dotnet-desktop-guide/winforms/how-to-respond-to-font-scheme-changes-in-a-windows-forms-application.md +++ b/dotnet-desktop-guide/winforms/how-to-respond-to-font-scheme-changes-in-a-windows-forms-application.md @@ -18,7 +18,7 @@ In the Windows operating systems, a user can change the system-wide font setting Typically, the default font used by Windows Forms is the font returned by the namespace call to `GetStockObject(DEFAULT_GUI_FONT)`. The font returned by this call only changes when the screen resolution changes. As shown in the following procedure, your code must change the default font to to respond to changes in font size. -### To use the desktop font and respond to font scheme changes +## To use the desktop font and respond to font scheme changes 1. Create your form, and add the controls you want to it. For more information, see [How to: Create a Windows Forms Application from the Command Line](get-started/create-app-visual-studio.md) and [Controls to Use on Windows Forms](./controls/controls-to-use-on-windows-forms.md). diff --git a/dotnet-desktop-guide/wpf/advanced/how-to-enable-visual-styles-in-a-hybrid-application.md b/dotnet-desktop-guide/wpf/advanced/how-to-enable-visual-styles-in-a-hybrid-application.md index c490d13673..f93f34e5e0 100644 --- a/dotnet-desktop-guide/wpf/advanced/how-to-enable-visual-styles-in-a-hybrid-application.md +++ b/dotnet-desktop-guide/wpf/advanced/how-to-enable-visual-styles-in-a-hybrid-application.md @@ -22,7 +22,7 @@ For a complete code listing of the tasks illustrated in this topic, see [Enablin ## Enabling Windows Forms Visual Styles -#### To enable Windows Forms visual styles +### To enable Windows Forms visual styles 1. Create a WPF Application project named `HostingWfWithVisualStyles`. @@ -55,7 +55,7 @@ For a complete code listing of the tasks illustrated in this topic, see [Enablin To disable visual styles, simply remove the call to the method. -#### To disable Windows Forms visual styles +### To disable Windows Forms visual styles 1. Open MainWindow.xaml.vb or MainWindow.xaml.cs in the Code Editor. diff --git a/dotnet-desktop-guide/wpf/advanced/how-to-use-a-resourcedictionary-to-manage-localizable-string-resources.md b/dotnet-desktop-guide/wpf/advanced/how-to-use-a-resourcedictionary-to-manage-localizable-string-resources.md index b70fb7c9a4..48317cefde 100644 --- a/dotnet-desktop-guide/wpf/advanced/how-to-use-a-resourcedictionary-to-manage-localizable-string-resources.md +++ b/dotnet-desktop-guide/wpf/advanced/how-to-use-a-resourcedictionary-to-manage-localizable-string-resources.md @@ -18,7 +18,7 @@ ms.assetid: 19e7d9a5-20df-4ad3-b157-fe6515902e5e This example shows how to use a to package localizable string resources for Windows Presentation Foundation (WPF) applications. -### To use a ResourceDictionary to manage localizable string resources +## To use a ResourceDictionary to manage localizable string resources 1. Create a file in the root of your project named _StringResources.xaml_ that contains the strings you would like to localize. The following code shows an example. diff --git a/dotnet-desktop-guide/wpf/advanced/walkthrough-caching-application-data-in-a-wpf-application.md b/dotnet-desktop-guide/wpf/advanced/walkthrough-caching-application-data-in-a-wpf-application.md index d5f84ff771..2b1adc99ca 100644 --- a/dotnet-desktop-guide/wpf/advanced/walkthrough-caching-application-data-in-a-wpf-application.md +++ b/dotnet-desktop-guide/wpf/advanced/walkthrough-caching-application-data-in-a-wpf-application.md @@ -54,7 +54,7 @@ In order to complete this walkthrough, you will need: You will start by creating a WPF application project. -#### To create a WPF application +### To create a WPF application 1. Start Visual Studio. @@ -86,7 +86,7 @@ Therefore, the next step is to change the .NET Framework target and add a refere > [!NOTE] > The procedure for changing the .NET Framework target is different in a Visual Basic project and in a Visual C# project. -#### To change the target .NET Framework in Visual Basic +### To change the target .NET Framework in Visual Basic 1. In **Solutions Explorer**, right-click the project name, and then click **Properties**. @@ -134,7 +134,7 @@ Therefore, the next step is to change the .NET Framework target and add a refere Next, you will add a button control and create an event handler for the button's `Click` event. Later you will add code to so when you click the button, the contents of the text file are cached and displayed. -#### To add a button control +### To add a button control 1. In **Solution Explorer**, double-click the MainWindow.xaml file to open it. @@ -154,7 +154,7 @@ Next, you will add the code to perform the following tasks: - Display the contents of the cached text file. -#### To create the cache object +### To create the cache object 1. Double-click the button you just added in order to create an event handler in the MainWindow.xaml.cs or MainWindow.Xaml.vb file. @@ -290,7 +290,7 @@ Next, you will add the code to perform the following tasks: You can now test the application. -#### To test caching in the WPF application +### To test caching in the WPF application 1. Press CTRL+F5 to run the application. diff --git a/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-direct3d9-content-for-hosting-in-wpf.md b/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-direct3d9-content-for-hosting-in-wpf.md index b9ff215631..51a8a62c11 100644 --- a/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-direct3d9-content-for-hosting-in-wpf.md +++ b/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-direct3d9-content-for-hosting-in-wpf.md @@ -35,7 +35,7 @@ You need the following components to complete this walkthrough: The first step is to create and configure the Direct3D9 project. -#### To create the Direct3D9 project +### To create the Direct3D9 project 1. Create a new Win32 Project in C++ named `D3DContent`. @@ -73,7 +73,7 @@ The first step is to create and configure the Direct3D9 project. To get the best performance, your Direct3D9 content must use particular settings. The following code shows how to create a Direct3D9 surface that has the best performance characteristics. For more information, see [Performance Considerations for Direct3D9 and WPF Interoperability](performance-considerations-for-direct3d9-and-wpf-interoperability.md). -#### To create the Direct3D9 content +### To create the Direct3D9 content 1. Using Solution Explorer, add three C++ classes to the project named the following. diff --git a/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-your-first-touch-application.md b/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-your-first-touch-application.md index d9cf3cbaf0..5b529ac357 100644 --- a/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-your-first-touch-application.md +++ b/dotnet-desktop-guide/wpf/advanced/walkthrough-creating-your-first-touch-application.md @@ -30,7 +30,7 @@ Additionally, you should have a basic understanding of how to create an applicat ## Creating the Application -#### To create the application +### To create the application 1. Create a new WPF Application project in Visual Basic or Visual C# named `BasicManipulation`. For more information, see [Walkthrough: My first WPF desktop application](../get-started/walkthrough-my-first-wpf-desktop-application.md). diff --git a/dotnet-desktop-guide/wpf/advanced/walkthrough-hosting-a-windows-forms-control-in-wpf-by-using-xaml.md b/dotnet-desktop-guide/wpf/advanced/walkthrough-hosting-a-windows-forms-control-in-wpf-by-using-xaml.md index 957c045a92..9bf85d0f2d 100644 --- a/dotnet-desktop-guide/wpf/advanced/walkthrough-hosting-a-windows-forms-control-in-wpf-by-using-xaml.md +++ b/dotnet-desktop-guide/wpf/advanced/walkthrough-hosting-a-windows-forms-control-in-wpf-by-using-xaml.md @@ -23,7 +23,7 @@ You need Visual Studio to complete this walkthrough. ## Hosting the Windows Forms Control -#### To host the MaskedTextBox control +### To host the MaskedTextBox control 1. Create a WPF Application project named `HostingWfInWpfWithXaml`. diff --git a/dotnet-desktop-guide/wpf/advanced/xaml-syntax-in-detail.md b/dotnet-desktop-guide/wpf/advanced/xaml-syntax-in-detail.md index e97dd23661..ca3c2d314e 100644 --- a/dotnet-desktop-guide/wpf/advanced/xaml-syntax-in-detail.md +++ b/dotnet-desktop-guide/wpf/advanced/xaml-syntax-in-detail.md @@ -53,7 +53,7 @@ For more information about the XAML language specification, download [\[MS-XAML\ XAML is a markup language. The common language runtime (CLR), as implied by its name, enables runtime execution. XAML is not by itself one of the common languages that is directly consumed by the CLR runtime. Instead, you can think of XAML as supporting its own type system. The particular XAML parsing system that is used by WPF is built on the CLR and the CLR type system. XAML types are mapped to CLR types to instantiate a run time representation when the XAML for WPF is parsed. For this reason, the remainder of discussion of syntax in this document will include references to the CLR type system, even though the equivalent syntax discussions in the XAML language specification do not. (Per the XAML language specification level, XAML types could be mapped to any other type system, which does not have to be the CLR, but that would require the creation and use of a different XAML parser.) -#### Members of Types and Class Inheritance +### Members of Types and Class Inheritance Properties and events as they appear as XAML members of a WPF type are often inherited from base types. For example, consider this example: `