Skip to content

Commit 1b8d720

Browse files
authored
Fix some tables in the create usercontrol article (#1974)
* Update how-to-create-usercontrol.md * Format property tables in markdown.
1 parent bb4408f commit 1b8d720

File tree

1 file changed

+44
-37
lines changed

1 file changed

+44
-37
lines changed

dotnet-desktop-guide/net/winforms/controls-design/how-to-create-usercontrol.md

+44-37
Original file line numberDiff line numberDiff line change
@@ -46,36 +46,40 @@ The user control is made up of _constituent controls_, which are the controls yo
4646

4747
01. With the designer open, the user control design surface should be the selected object. If it's not, click on the design surface to select it. Set the following properties in the **Properties** window:
4848

49-
| Property | Value |
50-
|-------------|------------|
51-
| MinimumSize | `84, 53` |
52-
| Size | `191, 53` |
49+
> [!div class="mx-tableNormal"]
50+
> | Property | Value |
51+
> |-------------|------------|
52+
> | MinimumSize | `84, 53` |
53+
> | Size | `191, 53` |
5354
5455
01. Add a **Label** control. Set the following properties:
5556

56-
| Property | Value |
57-
|----------|------------|
58-
| Name | `lblTitle` |
59-
| Location | `3, 5` |
57+
> [!div class="mx-tableNormal"]
58+
> | Property | Value |
59+
> |----------|------------|
60+
> | Name | `lblTitle` |
61+
> | Location | `3, 5` |
6062
6163
01. Add a **TextBox** control. Set the following properties:
6264

63-
| Property | Value |
64-
|----------|------------|
65-
| Name | `txtValue` |
66-
| Anchor | `Top, Left, Right` |
67-
| Location | `3, 23` |
68-
| Size | `148, 23` |
65+
> [!div class="mx-tableNormal"]
66+
> | Property | Value |
67+
> |----------|------------|
68+
> | Name | `txtValue` |
69+
> | Anchor | `Top, Left, Right` |
70+
> | Location | `3, 23` |
71+
> | Size | `148, 23` |
6972
7073
01. Add a **Button** control. Set the following properties:
7174

72-
| Property | Value |
73-
|----------|------------|
74-
| Name | `btnClear` |
75-
| Anchor | `Top, Right` |
76-
| Location | `157, 23` |
77-
| Size | `31, 23` |
78-
| Text | `` |
75+
> [!div class="mx-tableNormal"]
76+
> | Property | Value |
77+
> |----------|------------|
78+
> | Name | `btnClear` |
79+
> | Anchor | `Top, Right` |
80+
> | Location | `157, 23` |
81+
> | Size | `31, 23` |
82+
> | Text | `` |
7983
8084
The control should look like the following image:
8185

@@ -127,28 +131,31 @@ If you created a new project in the last section, you have a blank Form named **
127131
01. Move back to the designer and separate the controls so that you can see both of them.
128132
01. Select one control and set the following properties:
129133

130-
| Property | Value |
131-
|----------|----------------|
132-
| Name | `ctlFirstName` |
133-
| Location | `12, 12` |
134-
| Size | `191, 53` |
135-
| Title | `First Name` |
134+
> [!div class="mx-tableNormal"]
135+
> | Property | Value |
136+
> |----------|----------------|
137+
> | Name | `ctlFirstName` |
138+
> | Location | `12, 12` |
139+
> | Size | `191, 53` |
140+
> | Title | `First Name` |
136141
137142
01. Select the other control and set the following properties:
138143

139-
| Property | Value |
140-
|----------|---------------|
141-
| Name | `ctlLastName` |
142-
| Location | `12, 71` |
143-
| Size | `191, 53` |
144-
| Title | `Last Name` |
144+
> [!div class="mx-tableNormal"]
145+
> | Property | Value |
146+
> |----------|---------------|
147+
> | Name | `ctlLastName` |
148+
> | Location | `12, 71` |
149+
> | Size | `191, 53` |
150+
> | Title | `Last Name` |
145151
146152
01. Back in the **Toolbox** window, add a label control to the form, and set the following properties:
147153

148-
| Property | Value |
149-
|----------|---------------|
150-
| Name | `lblFullName` |
151-
| Location | `12, 252` |
154+
> [!div class="mx-tableNormal"]
155+
> | Property | Value |
156+
> |----------|---------------|
157+
> | Name | `lblFullName` |
158+
> | Location | `12, 252` |
152159
153160
01. Next, you need to generate the event handlers for the two user controls. In the designer, double-click on the `ctlFirstName` control. This action generates the event handler for the `TextChanged` event, and opens the code editor.
154161
01. Swap back to the designer and double-click the `ctlLastName` control to generate the second event handler.

0 commit comments

Comments
 (0)