mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-08 16:06:07 +02:00
Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14) * Breadcrumb / TOC / Move net5 to net folder (#15) * change path from net5 to net * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Mess with bread/toc * Add .net 5 winforms placeholder article (#16) * added some metadata and adjusted net5 placeholder * corrections * corrections * corrections * Test1 * Swapping landing page vs concept * fix links * Fix links * Fix desc
This commit is contained in:
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Perform common tasks using designer actions on controls
|
||||
ms.date: "02/13/2019"
|
||||
helpviewer_keywords:
|
||||
- "designer actions"
|
||||
ms.assetid: cac337e6-00f6-4584-80f4-75728f5ea113
|
||||
author: jillre
|
||||
ms.author: jillfra
|
||||
manager: jillfra
|
||||
---
|
||||
# Walkthrough: Perform common tasks using designer actions
|
||||
|
||||
As you construct forms and controls for your Windows Forms application, there are many tasks you'll perform repeatedly. The following list shows some of the commonly performed tasks you'll come across:
|
||||
|
||||
- Adding or removing a tab on a <xref:System.Windows.Forms.TabControl>.
|
||||
- Docking a control to its parent.
|
||||
- Changing the orientation of a <xref:System.Windows.Forms.SplitContainer> control.
|
||||
|
||||
To speed development, many controls offer designer actions, which are context-sensitive menus that allow you to perform common tasks like these in a single gesture at design time. These tasks are called *designer actions verbs*.
|
||||
|
||||
Designer actions remain attached to a control instance for its lifetime in the designer and are always available.
|
||||
|
||||
## Create the project
|
||||
|
||||
The first step is to create the project and set up the form.
|
||||
|
||||
1. In Visual Studio, create a Windows-based application project called **DesignerActionsExample**.
|
||||
|
||||
2. Select the form in the **Windows Forms Designer**.
|
||||
|
||||
## Use designer actions
|
||||
|
||||
Designer actions are always available at design time on controls that offer them.
|
||||
|
||||
1. Drag a <xref:System.Windows.Forms.TabControl> from the **Toolbox** onto your form. Note the designer actions glyph () that appears on the side of the <xref:System.Windows.Forms.TabControl>.
|
||||
|
||||
2. Click the designer actions glyph. In the shortcut menu that appears next to the glyph, select the **Add Tab** item. Observe that a new tab page is added to the <xref:System.Windows.Forms.TabControl>.
|
||||
|
||||
3. Drag a <xref:System.Windows.Forms.TableLayoutPanel> control from the **Toolbox** onto your form.
|
||||
|
||||
4. Click the designer actions glyph. In the shortcut menu that appears next to the glyph, select the **Add Column** item. Observe that a new column is added to the <xref:System.Windows.Forms.TableLayoutPanel> control.
|
||||
|
||||
5. Drag a <xref:System.Windows.Forms.SplitContainer> control from the **Toolbox** onto your form.
|
||||
|
||||
6. Click the designer actions glyph. In the shortcut menu that appears next to the glyph, select the **Horizontal Splitter Orientation** item. Observe that the <xref:System.Windows.Forms.SplitContainer> control's splitter bar is now oriented horizontally.
|
||||
|
||||
## See also
|
||||
|
||||
- <xref:System.Windows.Forms.TextBox>
|
||||
- <xref:System.Windows.Forms.TabControl>
|
||||
- <xref:System.Windows.Forms.SplitContainer>
|
||||
- <xref:System.ComponentModel.Design.DesignerActionList>
|
||||
Reference in New Issue
Block a user