From 436afcf02496c33541936e6b9185f4a0e71c1308 Mon Sep 17 00:00:00 2001
From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com>
Date: Mon, 24 Jan 2022 11:07:36 -0800
Subject: [PATCH 1/3] minor updates to get new build (#1281)
---
.../wpf/advanced/xaml-syntax-in-detail.md | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md b/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md
index 820c3b5f46..3d30cea348 100644
--- a/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md
+++ b/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md
@@ -33,6 +33,7 @@ helpviewer_keywords:
ms.assetid: 67cce290-ca26-4c41-a797-b68aabc45479
---
# XAML Syntax In Detail
+
This topic defines the terms that are used to describe the elements of XAML syntax. These terms are used frequently throughout the remainder of this documentation, both for WPF documentation specifically and for the other frameworks that use XAML or the basic XAML concepts enabled by the XAML language support at the System.Xaml level. This topic expands on the basic terminology introduced in the topic [XAML in WPF](xaml-in-wpf.md).
@@ -46,9 +47,9 @@ This topic defines the terms that are used to describe the elements of XAML synt
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
- Properties and events as they appear as XAML members of a [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] type are often inherited from base types. For example, consider this example: ``. The property is not an immediately declared property on the class, if you were to look at the class definition, reflection results, or the documentation. Instead, is inherited from the base class.
+ Properties and events as they appear as XAML members of a WPF type are often inherited from base types. For example, consider this example: ``. The property is not an immediately declared property on the class, if you were to look at the class definition, reflection results, or the documentation. Instead, is inherited from the base class.
- The class inheritance behavior of [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] XAML elements is a significant departure from a schema-enforced interpretation of XML markup. Class inheritance can become complex, particularly when intermediate base classes are abstract, or when interfaces are involved. This is one reason that the set of XAML elements and their permissible attributes is difficult to represent accurately and completely using the schema types that are typically used for XML programming, such as DTD or XSD format. Another reason is that extensibility and type-mapping features of the XAML language itself preclude completeness of any fixed representation of the permissible types and members.
+ The class inheritance behavior of WPF XAML elements is a significant departure from a schema-enforced interpretation of XML markup. Class inheritance can become complex, particularly when intermediate base classes are abstract, or when interfaces are involved. This is one reason that the set of XAML elements and their permissible attributes is difficult to represent accurately and completely using the schema types that are typically used for XML programming, such as DTD or XSD format. Another reason is that extensibility and type-mapping features of the XAML language itself preclude completeness of any fixed representation of the permissible types and members.
## Object Element Syntax
@@ -69,7 +70,7 @@ This topic defines the terms that are used to describe the elements of XAML synt
[!code-xaml[XAMLOvwSupport#ThisIsATextBox](~/samples/snippets/csharp/VS_Snippets_Wpf/XAMLOvwSupport/CSharp/Page1.xaml#thisisatextbox)]
### Content Models
- A class might support a usage as a XAML object element in terms of the syntax, but that element will only function properly in an application or page when it is placed in an expected position of an overall content model or element tree. For example, a should typically only be placed as a child of a derived class such as . Content models for specific elements are documented as part of the remarks on the class pages for controls and other [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] classes that can be used as XAML elements.
+ A class might support a usage as a XAML object element in terms of the syntax, but that element will only function properly in an application or page when it is placed in an expected position of an overall content model or element tree. For example, a should typically only be placed as a child of a derived class such as . Content models for specific elements are documented as part of the remarks on the class pages for controls and other WPF classes that can be used as XAML elements.
## Properties of Object Elements
@@ -227,10 +228,10 @@ This topic defines the terms that are used to describe the elements of XAML synt
[!code-xaml[XAMLOvwSupport#SyntaxContent](~/samples/snippets/csharp/VS_Snippets_Wpf/XAMLOvwSupport/CSharp/page5.xaml#syntaxcontent)]
- Note that neither the property element for nor the element for the is required in the markup. This is a design feature of XAML so that recursively contained elements that define a [!INCLUDE[TLA2#tla_ui](../../../includes/tla2sharptla-ui-md.md)] are more intuitively represented as a tree of nested elements with immediate parent-child element relationships, without intervening property element tags or collection objects. In fact, cannot be specified explicitly in markup as an object element, by design. Because its only intended use is as an implicit collection, does not expose a public parameterless constructor and thus cannot be instantiated as an object element.
+ Note that neither the property element for nor the element for the is required in the markup. This is a design feature of XAML so that recursively contained elements that define a UI are more intuitively represented as a tree of nested elements with immediate parent-child element relationships, without intervening property element tags or collection objects. In fact, cannot be specified explicitly in markup as an object element, by design. Because its only intended use is as an implicit collection, does not expose a public parameterless constructor and thus cannot be instantiated as an object element.
### Mixing Property Elements and Object Elements in an Object with a Content Property
- The XAML specification declares that a XAML processor can enforce that object elements that are used to fill the XAML content property within an object element must be contiguous, and must not be mixed. This restriction against mixing property elements and content is enforced by the [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] XAML processors.
+ The XAML specification declares that a XAML processor can enforce that object elements that are used to fill the XAML content property within an object element must be contiguous, and must not be mixed. This restriction against mixing property elements and content is enforced by the WPF XAML processors.
You can have a child object element as the first immediate markup within an object element. Then you can introduce property elements. Or, you can specify one or more property elements, then content, then more property elements. But once a property element follows content, you cannot introduce any further content, you can only add property elements.
@@ -238,7 +239,7 @@ This topic defines the terms that are used to describe the elements of XAML synt
## XAML Namespaces
- None of the preceding syntax examples specified a XAML namespace other than the default XAML namespace. In typical [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] applications, the default XAML namespace is specified to be the [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] namespace. You can specify XAML namespaces other than the default XAML namespace and still use similar syntax. But then, anywhere where a class is named that is not accessible within the default XAML namespace, that class name must be preceded with the prefix of the XAML namespace as mapped to the corresponding CLR namespace. For example, `` is object element syntax to instantiate an instance of the `Example` class, where the CLR namespace containing that class (and possibly the external assembly information that contains backing types) was previously mapped to the `custom` prefix.
+ None of the preceding syntax examples specified a XAML namespace other than the default XAML namespace. In typical WPF applications, the default XAML namespace is specified to be the WPF namespace. You can specify XAML namespaces other than the default XAML namespace and still use similar syntax. But then, anywhere where a class is named that is not accessible within the default XAML namespace, that class name must be preceded with the prefix of the XAML namespace as mapped to the corresponding CLR namespace. For example, `` is object element syntax to instantiate an instance of the `Example` class, where the CLR namespace containing that class (and possibly the external assembly information that contains backing types) was previously mapped to the `custom` prefix.
For more information about XAML namespaces, see [XAML Namespaces and Namespace Mapping for WPF XAML](xaml-namespaces-and-namespace-mapping-for-wpf-xaml.md).
@@ -246,7 +247,7 @@ This topic defines the terms that are used to describe the elements of XAML synt
## Markup Extensions
XAML defines a markup extension programming entity that enables an escape from the normal XAML processor handling of string attribute values or object elements, and defers the processing to a backing class. The character that identifies a markup extension to a XAML processor when using attribute syntax is the opening curly brace ({), followed by any character other than a closing curly brace (}). The first string following the opening curly brace must reference the class that provides the particular extension behavior, where the reference may omit the substring "Extension" if that substring is part of the true class name. Thereafter, a single space may appear, and then each succeeding character is used as input by the extension implementation, up until the closing curly brace is encountered.
- The .NET XAML implementation uses the abstract class as the basis for all of the markup extensions supported by [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] as well as other frameworks or technologies. The markup extensions that [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] specifically implements are often intended to provide a means to reference other existing objects, or to make deferred references to objects that will be evaluated at run time. For example, a simple WPF data binding is accomplished by specifying the `{Binding}` markup extension in place of the value that a particular property would ordinarily take. Many of the WPF markup extensions enable an attribute syntax for properties where an attribute syntax would not otherwise be possible. For example, a object is a relatively complex type that contains a nested series of objects and properties. Styles in WPF are typically defined as a resource in a , and then referenced through one of the two WPF markup extensions that request a resource. The markup extension defers the evaluation of the property value to a resource lookup and enables providing the value of the property, taking type , in attribute syntax as in the following example:
+ The .NET XAML implementation uses the abstract class as the basis for all of the markup extensions supported by WPF as well as other frameworks or technologies. The markup extensions that WPF specifically implements are often intended to provide a means to reference other existing objects, or to make deferred references to objects that will be evaluated at run time. For example, a simple WPF data binding is accomplished by specifying the `{Binding}` markup extension in place of the value that a particular property would ordinarily take. Many of the WPF markup extensions enable an attribute syntax for properties where an attribute syntax would not otherwise be possible. For example, a object is a relatively complex type that contains a nested series of objects and properties. Styles in WPF are typically defined as a resource in a , and then referenced through one of the two WPF markup extensions that request a resource. The markup extension defers the evaluation of the property value to a resource lookup and enables providing the value of the property, taking type , in attribute syntax as in the following example:
``
@@ -275,7 +276,7 @@ This topic defines the terms that are used to describe the elements of XAML synt
|||
|-|-|
|``|End of object element for the root. Object is not closed yet because the element contains child elements|
From 0358914363282fb51785c5cd5e7c3ffba6fa31af Mon Sep 17 00:00:00 2001
From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com>
Date: Mon, 24 Jan 2022 11:07:43 -0800
Subject: [PATCH 2/3] Upgrade framework winforms-outlook article (#1280)
* upgrade winforms-outlook article
* change readme name; add description
* change readme name; add description
---
...ipane-user-interface-with-windows-forms.md | 206 +++++-------------
.../form.png | Bin 0 -> 5509 bytes
.../Form1.Designer.cs | 147 +++++++++++++
.../Form1.cs | 16 ++
.../Form1.resx | 120 ++++++++++
.../Program.cs | 22 ++
.../project.csproj | 65 ++++++
.../readme.txt | 1 +
8 files changed, 420 insertions(+), 157 deletions(-)
create mode 100644 dotnet-desktop-guide/framework/winforms/controls/media/how-to-create-a-multipane-user-interface-with-windows-forms/form.png
create mode 100644 dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.Designer.cs
create mode 100644 dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.cs
create mode 100644 dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.resx
create mode 100644 dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Program.cs
create mode 100644 dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/project.csproj
create mode 100644 dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/readme.txt
diff --git a/dotnet-desktop-guide/framework/winforms/controls/how-to-create-a-multipane-user-interface-with-windows-forms.md b/dotnet-desktop-guide/framework/winforms/controls/how-to-create-a-multipane-user-interface-with-windows-forms.md
index 6e1039d55c..56473879e6 100644
--- a/dotnet-desktop-guide/framework/winforms/controls/how-to-create-a-multipane-user-interface-with-windows-forms.md
+++ b/dotnet-desktop-guide/framework/winforms/controls/how-to-create-a-multipane-user-interface-with-windows-forms.md
@@ -1,6 +1,7 @@
---
title: Create a Multipane User Interface
-ms.date: "03/30/2017"
+description: Describes how to layout Windows Forms controls to mimic a Microsoft Outlook email application.
+ms.date: 01/21/2022
dev_langs:
- "csharp"
- "vb"
@@ -14,162 +15,53 @@ helpviewer_keywords:
ms.assetid: e79f6bcc-3740-4d1e-b46a-c5594d9b7327
---
# How to: Create a Multipane User Interface with Windows Forms
-In the following procedure, you will create a multipane user interface that is similar to the one used in Microsoft Outlook, with a **Folder** list, a **Messages** pane, and a **Preview** pane. This arrangement is achieved chiefly through docking controls with the form.
-
- When you dock a control, you determine which edge of the parent container a control is fastened to. Thus, if you set the property to , the right edge of the control will be docked to the right edge of its parent control. Additionally, the docked edge of the control is resized to match that of its container control. For more information about how the property works, see [How to: Dock Controls on Windows Forms](how-to-dock-controls-on-windows-forms.md).
-
- This procedure focuses on arranging the and the other controls on the form, not on adding functionality to make the application mimic Microsoft Outlook.
-
- To create this user interface, you place all the controls within a control, which contains a control in the left-hand panel. The right-hand panel of the control contains a second control with a control above a control. These controls enable independent resizing of the other controls on the form. You can adapt the techniques in this procedure to craft custom user interfaces of your own.
-
-### To create an Outlook-style user interface programmatically
-
-1. Within a form, declare each control that comprises your user interface. For this example, use the , , , and controls to mimic the Microsoft Outlook user interface.
-
- ```vb
- Private WithEvents treeView1 As System.Windows.Forms.TreeView
- Private WithEvents listView1 As System.Windows.Forms.ListView
- Private WithEvents richTextBox1 As System.Windows.Forms.RichTextBox
- Private WithEvents splitContainer1 As _
- System.Windows.Forms.SplitContainer
- Private WithEvents splitContainer2 As _
- System.Windows.Forms.SplitContainer
- ```
-
- ```csharp
- private System.Windows.Forms.TreeView treeView1;
- private System.Windows.Forms.ListView listView1;
- private System.Windows.Forms.RichTextBox richTextBox1;
- private System.Windows.Forms. SplitContainer splitContainer2;
- private System.Windows.Forms. SplitContainer splitContainer1;
- ```
-
-2. Create a procedure that defines your user interface. The following code sets the properties so that the form will resemble the user interface in Microsoft Outlook. However, by using other controls or docking them differently, it is just as easy to create other user interfaces that are equally flexible.
-
- ```vb
- Public Sub CreateOutlookUI()
- ' Create an instance of each control being used.
- Me.components = New System.ComponentModel.Container()
- Me.treeView1 = New System.Windows.Forms.TreeView()
- Me.listView1 = New System.Windows.Forms.ListView()
- Me.richTextBox1 = New System.Windows.Forms.RichTextBox()
- Me.splitContainer1 = New System.Windows.Forms.SplitContainer()
- Me.splitContainer2= New System.Windows.Forms. SplitContainer()
-
- ' Should you develop this into a working application,
- ' use the AddHandler method to hook up event procedures here.
-
- ' Set properties of TreeView control.
- ' Use the With statement to avoid repetitive code.
- With Me.treeView1
- .Dock = System.Windows.Forms.DockStyle.Fill
- .TabIndex = 0
- .Nodes.Add("treeView")
- End With
-
- ' Set properties of ListView control.
- With Me.listView1
- .Dock = System.Windows.Forms.DockStyle.Top
- .TabIndex = 2
- .Items.Add("listView")
- End With
-
- ' Set properties of RichTextBox control.
- With Me.richTextBox1
- .Dock = System.Windows.Forms.DockStyle.Fill
- .TabIndex = 3
- .Text = "richTextBox1"
- End With
-
- ' Set properties of the first SplitContainer control.
- With Me.splitContainer1
- .Dock = System.Windows.Forms.DockStyle.Fill
- .TabIndex = 1
- .SplitterWidth = 4
- .SplitterDistance = 150
- .Orientation = Orientation.Horizontal
- .Panel1.Controls.Add(Me.listView1)
- .Panel2.Controls.Add(Me.richTextBox1)
- End With
-
- ' Set properties of the second SplitContainer control.
- With Me.splitContainer2
- .Dock = System.Windows.Forms.DockStyle.Fill
- .TabIndex = 4
- .SplitterWidth = 4
- .SplitterDistance = 100
- .Panel1.Controls.Add(Me.treeView1)
- .Panel2.Controls.Add(Me.SplitContainer1)
- End With
-
- ' Add the main SplitContainer control to the form.
- Me.Controls.Add(Me.splitContainer2)
- Me.Text = "Intricate UI Example"
- End Sub
- ```
-
- ```csharp
- public void createOutlookUI()
- {
- // Create an instance of each control being used.
- treeView1 = new System.Windows.Forms.TreeView();
- listView1 = new System.Windows.Forms.ListView();
- richTextBox1 = new System.Windows.Forms.RichTextBox();
- splitContainer2 = new System.Windows.Forms.SplitContainer();
- splitContainer1 = new System.Windows.Forms.SplitContainer();
-
- // Insert code here to hook up event methods.
-
- // Set properties of TreeView control.
- treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
- treeView1.TabIndex = 0;
- treeView1.Nodes.Add("treeView");
-
- // Set properties of ListView control.
- listView1.Dock = System.Windows.Forms.DockStyle.Top;
- listView1.TabIndex = 2;
- listView1.Items.Add("listView");
-
- // Set properties of RichTextBox control.
- richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
- richTextBox1.TabIndex = 3;
- richTextBox1.Text = "richTextBox1";
-
- // Set properties of first SplitContainer control.
- splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
- splitContainer2.TabIndex = 1;
- splitContainer2.SplitterWidth = 4;
- splitContainer2.SplitterDistance = 150;
- splitContainer2.Orientation = Orientation.Horizontal;
- splitContainer2.Panel1.Controls.Add(this.listView1);
- splitContainer2.Panel1.Controls.Add(this.richTextBox1);
-
- // Set properties of second SplitContainer control.
- splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
- splitContainer2.TabIndex = 4;
- splitContainer2.SplitterWidth = 4;
- splitContainer2.SplitterDistance = 100;
- splitContainer2.Panel1.Controls.Add(this.treeView1);
- splitContainer2.Panel1.Controls.Add(this.splitContainer1);
-
- // Add the main SplitContainer control to the form.
- this.Controls.Add(this.splitContainer2);
- this.Text = "Intricate UI Example";
- }
- ```
-
-3. In Visual Basic, add a call to the procedure you just created in the `New()` procedure. In Visual C#, add this line of code to the constructor for the form class.
-
- ```vb
- ' Add this to the New procedure.
- CreateOutlookUI()
- ```
-
- ```csharp
- // Add this to the form class's constructor.
- createOutlookUI();
- ```
-
+
+By arranging controls on a form, you can create a multi-pane user interface that's similar to the one used in Microsoft Outlook, with a **Folder** list, a **Messages** pane, and a **Preview** pane. This arrangement is achieved chiefly through docking controls with the form.
+
+When you dock a control, you determine which edge of the parent container a control is fastened to. If you set the property to , the right edge of the control will be docked to the right edge of its parent control. Additionally, the docked edge of the control is resized to match that of its container control. For more information about how the property works, see [How to: Dock Controls on Windows Forms](how-to-dock-controls-on-windows-forms.md).
+
+This procedure focuses on arranging the and the other controls on the form, not on adding functionality to make the application mimic Microsoft Outlook.
+
+:::image type="content" source="media/how-to-create-a-multipane-user-interface-with-windows-forms/form.png" alt-text="A form that's designed to look like an Outlook mail window.":::
+
+To create this user interface, you place all the controls within a control. The `SplitContainer` contains a control in the left-hand panel and another `SplitContainer` on the right-hand panel. The second `SplitContainer` contains a control on top and a control on the bottom.
+
+These controls enable independent resizing of the other controls on the form. You can adapt the techniques in this procedure to craft custom user interfaces of your own.
+
+## Control layout
+
+The following table describes how the controls are configured to mimic Microsoft Outlook:
+
+| Control | Property | Value |
+|----------------|------------------|--------------------------------------------------|
+| SplitContainer | Name | `splitContainer1` |
+| | Dock | `Fill` |
+| | TabIndex | `4` |
+| | SplitterWidth | `4` |
+| | SplitterDistance | `100` |
+| | Panel1.Controls | Add the `treeView1` control to this panel. |
+| | Panel2.Controls | Add the `splitContainer2` control to this panel. |
+| TreeView | Name | `treeView1` |
+| | Dock | `Fill` |
+| | TabIndex | `0` |
+| | Nodes | Add a new node named `Node0` |
+| SplitContainer | Name | `splitContainer2` |
+| | Dock | `Fill` |
+| | TabIndex | `1` |
+| | SplitterWidth | `4` |
+| | SplitterDistance | `150` |
+| | Orientation | `Horizontal` |
+| | Panel1.Controls | Add the `listView1` control to this panel. |
+| | Panel2.Controls | Add the `richTextBox1` control to this panel. |
+| ListView | Name | `listView1` |
+| | Dock | `Fill` |
+| | TabIndex | `2` |
+| | Items | Add a new item and set the text to `item1`. |
+| RichTextBox | Name | `richTextBox1` |
+| | Dock | `Fill` |
+| | TabIndex | `3` |
+| | Text | `richTextBox1` |
+
## See also
-
diff --git a/dotnet-desktop-guide/framework/winforms/controls/media/how-to-create-a-multipane-user-interface-with-windows-forms/form.png b/dotnet-desktop-guide/framework/winforms/controls/media/how-to-create-a-multipane-user-interface-with-windows-forms/form.png
new file mode 100644
index 0000000000000000000000000000000000000000..c916fe2fac7be9cb224322ef4945e71d2103f678
GIT binary patch
literal 5509
zcmeI0cTm$=yT^ZGUlmlOC6rxQ8%>cHL8=8o7X<`D37sIYv{0oa6m_K}B*?PTq%1^5
z2q6SXs0k>LfKnC_A}ygTMXFg!fE3>NwmW<0-nsYA>^t+`x%ZFXoH@@Q=Xd6u@ALVd
z=Sj7;G(Ykc=qmsKj@-OqY6AdbP5`j0^1wb(1eYv{5DmM+ZOpF%l|AyGM3X(fS8iVc
z08;uPzUN-i{9wopr*HreZ~gM^V!&T|1Ar9hrs);CXt$*?_dvJlxE4+k`|>rv`=<_*
zBbLszC7rS;zhnP>=rf429e($diw8&jWe&w5;ed14^dA228MuRRNP5!p+=IZPiq6Z;=OE`>8*t%w16gD4T7>?v0
zSJ}ePUWyqD8*jNEdo3+^zl37iSYs3;St;Hz*c>Z=mLaEN^Y0ilEFY
zPPLM@J-@kDYNDX++mj}z?IUmE5R7^3A8|#yiWSEli{>rWPOTR0AYBkkQvT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1t!S3kvEtxX^0JpssO;Z4nw&0A
zFfMr4nVJDnSKAFJ$%*=CMu?5J&!0n@wq~Ach0k>5h&pDso?ax3LRryMm~9e_@wP+N
zSkW-L3h9C0Z1XY*`}IZ)t}Nb!(8*ds(umA0J~VTp_d(eV54qg*diD9V&1SsoB9Vin
z(K_P^W$~DH0g4d)G|9{9^E{rY>9D)hsz{LxB^<7R5~Oz|8n
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Node0");
+ System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("item1");
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.treeView1 = new System.Windows.Forms.TreeView();
+ this.splitContainer2 = new System.Windows.Forms.SplitContainer();
+ this.listView1 = new System.Windows.Forms.ListView();
+ this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
+ this.splitContainer2.Panel1.SuspendLayout();
+ this.splitContainer2.Panel2.SuspendLayout();
+ this.splitContainer2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer1.Name = "splitContainer1";
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.treeView1);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
+ this.splitContainer1.Size = new System.Drawing.Size(448, 366);
+ this.splitContainer1.SplitterDistance = 100;
+ this.splitContainer1.TabIndex = 1;
+ //
+ // treeView1
+ //
+ this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.treeView1.Location = new System.Drawing.Point(0, 0);
+ this.treeView1.Name = "treeView1";
+ treeNode1.Name = "Node0";
+ treeNode1.Text = "Node0";
+ this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
+ treeNode1});
+ this.treeView1.Size = new System.Drawing.Size(100, 366);
+ this.treeView1.TabIndex = 0;
+ //
+ // splitContainer2
+ //
+ this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer2.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer2.Name = "splitContainer2";
+ this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // splitContainer2.Panel1
+ //
+ this.splitContainer2.Panel1.Controls.Add(this.listView1);
+ //
+ // splitContainer2.Panel2
+ //
+ this.splitContainer2.Panel2.Controls.Add(this.richTextBox1);
+ this.splitContainer2.Size = new System.Drawing.Size(344, 366);
+ this.splitContainer2.SplitterDistance = 156;
+ this.splitContainer2.TabIndex = 1;
+ //
+ // listView1
+ //
+ this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listView1.HideSelection = false;
+ this.listView1.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
+ listViewItem1});
+ this.listView1.Location = new System.Drawing.Point(0, 0);
+ this.listView1.Name = "listView1";
+ this.listView1.Size = new System.Drawing.Size(344, 156);
+ this.listView1.TabIndex = 2;
+ this.listView1.UseCompatibleStateImageBehavior = false;
+ //
+ // richTextBox1
+ //
+ this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.richTextBox1.Location = new System.Drawing.Point(0, 0);
+ this.richTextBox1.Name = "richTextBox1";
+ this.richTextBox1.Size = new System.Drawing.Size(344, 206);
+ this.richTextBox1.TabIndex = 3;
+ this.richTextBox1.Text = "richTextBox1";
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(448, 366);
+ this.Controls.Add(this.splitContainer1);
+ this.Margin = new System.Windows.Forms.Padding(2);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+ this.splitContainer1.ResumeLayout(false);
+ this.splitContainer2.Panel1.ResumeLayout(false);
+ this.splitContainer2.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
+ this.splitContainer2.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.TreeView treeView1;
+ private System.Windows.Forms.SplitContainer splitContainer2;
+ private System.Windows.Forms.ListView listView1;
+ private System.Windows.Forms.RichTextBox richTextBox1;
+ }
+}
+
diff --git a/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.cs b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.cs
new file mode 100644
index 0000000000..a7cac9af99
--- /dev/null
+++ b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace project
+{
+ public partial class Form1 : Form
+ {
+ //Windows Form application
+ public Form1()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.resx b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.resx
new file mode 100644
index 0000000000..1af7de150c
--- /dev/null
+++ b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Program.cs b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Program.cs
new file mode 100644
index 0000000000..b7580e129c
--- /dev/null
+++ b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/Program.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace project
+{
+ static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git a/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/project.csproj b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/project.csproj
new file mode 100644
index 0000000000..1c2538b11f
--- /dev/null
+++ b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/project.csproj
@@ -0,0 +1,65 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {50B5AD53-1181-46C6-91EE-0E65BADF34E1}
+ WinExe
+ project
+ project
+ v4.8
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ CurrentArchitecture
+ CurrentRuntime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+ Form1.cs
+
+
+
+
\ No newline at end of file
diff --git a/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/readme.txt b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/readme.txt
new file mode 100644
index 0000000000..47cb859fbb
--- /dev/null
+++ b/dotnet-desktop-guide/framework/winforms/controls/snippets/how-to-create-a-multipane-user-interface-with-windows-forms/readme.txt
@@ -0,0 +1 @@
+This code is used to generate the screenshot referenced in the parent article.
From a5e3c44dcb224c8e8991bfb0618fb12d09955ab5 Mon Sep 17 00:00:00 2001
From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com>
Date: Mon, 24 Jan 2022 11:08:12 -0800
Subject: [PATCH 3/3] Migrate code;widen xaml snip ref (#1279)
---
...s-by-using-columndefinitionscollections.md | 6 +--
.../csharp/Window1.xaml | 54 +++++++++++++++++++
.../csharp}/Window1.xaml.cs | 0
.../csharp/app.config | 3 ++
.../csharp}/app.xaml | 0
.../csharp}/app.xaml.cs | 0
.../csharp}/columndefinitions_grid.csproj | 14 +++--
.../csharp/snippets.5000.json | 3 ++
.../vb}/ColumnDefinitionsGrid.vbproj | 14 +++--
.../vb}/Window1.xaml | 0
.../vb}/Window1.xaml.vb | 0
.../vb/app.config | 23 ++++++++
.../vb}/app.xaml | 0
.../vb/snippets.5000.json | 3 ++
.../ColumnDefinitionsGrid/CSharp/Window1.xaml | 54 -------------------
15 files changed, 111 insertions(+), 63 deletions(-)
create mode 100644 dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml
rename dotnet-desktop-guide/{samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp}/Window1.xaml.cs (100%)
create mode 100644 dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.config
rename dotnet-desktop-guide/{samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp}/app.xaml (100%)
rename dotnet-desktop-guide/{samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp}/app.xaml.cs (100%)
rename dotnet-desktop-guide/{samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp}/columndefinitions_grid.csproj (76%)
create mode 100644 dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/snippets.5000.json
rename dotnet-desktop-guide/{samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb}/ColumnDefinitionsGrid.vbproj (74%)
rename dotnet-desktop-guide/{samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb}/Window1.xaml (100%)
rename dotnet-desktop-guide/{samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb}/Window1.xaml.vb (100%)
create mode 100644 dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/app.config
rename dotnet-desktop-guide/{samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic => framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb}/app.xaml (100%)
create mode 100644 dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/snippets.5000.json
delete mode 100644 dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml
diff --git a/dotnet-desktop-guide/framework/wpf/controls/manipulate-columns-and-rows-by-using-columndefinitionscollections.md b/dotnet-desktop-guide/framework/wpf/controls/manipulate-columns-and-rows-by-using-columndefinitionscollections.md
index 16d6f1877d..3f0b2ac5ed 100644
--- a/dotnet-desktop-guide/framework/wpf/controls/manipulate-columns-and-rows-by-using-columndefinitionscollections.md
+++ b/dotnet-desktop-guide/framework/wpf/controls/manipulate-columns-and-rows-by-using-columndefinitionscollections.md
@@ -16,12 +16,12 @@ This example shows how to use the methods in the element with a of `grid1`. The contains a that holds elements, each controlled by a different collection method. When you click a , it activates a method call in the code-behind file.
- [!code-xaml[ColumnDefinitionsGrid#1](~/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml#1)]
+:::code language="xaml" source="snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml" id="Snippet1":::
This example defines a series of custom methods, each corresponding to a event in the [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] file. You can change the number of columns and rows in the in several ways, which includes adding or removing rows and columns; and counting the total number of rows and columns. To prevent and exceptions, you can use the error-checking functionality that the method provides.
- [!code-csharp[ColumnDefinitionsGrid#2](~/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml.cs#2)]
- [!code-vb[ColumnDefinitionsGrid#2](~/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/Window1.xaml.vb#2)]
+:::code language="csharp" source="snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml.cs" id="Snippet2":::
+:::code language="vb" source="snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/Window1.xaml.vb" id="Snippet2":::
## See also
diff --git a/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml
new file mode 100644
index 0000000000..1c7b6bfac2
--- /dev/null
+++ b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml
@@ -0,0 +1,54 @@
+
+
+
+
+
+ Grid Column and Row Collections
+ Click any of the buttons below to invoke the associated methods and properties of ColumnDefinition and RowDefinition Collections.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml.cs b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml.cs
similarity index 100%
rename from dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml.cs
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/Window1.xaml.cs
diff --git a/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.config b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.config
new file mode 100644
index 0000000000..3e0e37cfc8
--- /dev/null
+++ b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/app.xaml b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.xaml
similarity index 100%
rename from dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/app.xaml
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.xaml
diff --git a/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/app.xaml.cs b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.xaml.cs
similarity index 100%
rename from dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/app.xaml.cs
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/app.xaml.cs
diff --git a/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/columndefinitions_grid.csproj b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/columndefinitions_grid.csproj
similarity index 76%
rename from dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/columndefinitions_grid.csproj
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/columndefinitions_grid.csproj
index 925a490e5f..5ad2143bbe 100644
--- a/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/columndefinitions_grid.csproj
+++ b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/columndefinitions_grid.csproj
@@ -1,14 +1,19 @@
-
+SDKSamplewinexeDebug2.0bin\$(Configuration)\
- v4.0
+ v4.8{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Client
+
+ 10.0.20821
+ {4BDD3A99-C878-405A-9108-7C948EA50659}
+
+
+ false
@@ -44,4 +49,7 @@
Code
+
+
+
\ No newline at end of file
diff --git a/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/snippets.5000.json b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/snippets.5000.json
new file mode 100644
index 0000000000..9493e73361
--- /dev/null
+++ b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/csharp/snippets.5000.json
@@ -0,0 +1,3 @@
+{
+ "host": "visualstudio"
+}
\ No newline at end of file
diff --git a/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/ColumnDefinitionsGrid.vbproj b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/ColumnDefinitionsGrid.vbproj
similarity index 74%
rename from dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/ColumnDefinitionsGrid.vbproj
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/ColumnDefinitionsGrid.vbproj
index 6aa710cbc9..c6947d7ad4 100644
--- a/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/ColumnDefinitionsGrid.vbproj
+++ b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/ColumnDefinitionsGrid.vbproj
@@ -1,14 +1,19 @@
-
+SDKSamplewinexeDebug2.0bin\$(Configuration)\
- v4.0
+ v4.8{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
- Client
+
+ 10.0.20821
+ {9CD74B47-FC44-43A0-B18E-FFF7B4EA3EF8}
+
+
+ false
@@ -39,4 +44,7 @@
Code
+
+
+
\ No newline at end of file
diff --git a/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/Window1.xaml b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/Window1.xaml
similarity index 100%
rename from dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/Window1.xaml
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/Window1.xaml
diff --git a/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/Window1.xaml.vb b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/Window1.xaml.vb
similarity index 100%
rename from dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/Window1.xaml.vb
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/Window1.xaml.vb
diff --git a/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/app.config b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/app.config
new file mode 100644
index 0000000000..b5cb6d50fc
--- /dev/null
+++ b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/app.config
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/app.xaml b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/app.xaml
similarity index 100%
rename from dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/ColumnDefinitionsGrid/VisualBasic/app.xaml
rename to dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/app.xaml
diff --git a/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/snippets.5000.json b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/snippets.5000.json
new file mode 100644
index 0000000000..9493e73361
--- /dev/null
+++ b/dotnet-desktop-guide/framework/wpf/controls/snippets/manipulate-columns-and-rows-by-using-columndefinitionscollections/vb/snippets.5000.json
@@ -0,0 +1,3 @@
+{
+ "host": "visualstudio"
+}
\ No newline at end of file
diff --git a/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml b/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml
deleted file mode 100644
index 2a15d60cfb..0000000000
--- a/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/ColumnDefinitionsGrid/CSharp/Window1.xaml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- Grid Column and Row Collections
- Click any of the buttons below to invoke the associated methods and properties of ColumnDefinition and RowDefinition Collections.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-