Files
docs-desktop/dotnet-desktop-guide/framework/wpf/controls/how-to-create-a-dockpanel.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.0 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Create a DockPanel 03/30/2017
csharp
vb
controls [WPF], DockPanel
DockPanel control [WPF], creating
9194f663-e279-4f1a-86d7-125a57d05c6f

How to: Create a DockPanel

Example

The following example creates and uses an instance of xref:System.Windows.Controls.DockPanel by using code. The example shows you how to partition space by creating five xref:System.Windows.Shapes.Rectangle elements and positioning (docking) them inside a parent xref:System.Windows.Controls.DockPanel. If you retain the default setting, the final rectangle fills all the remaining unallocated space.

[!code-csharpDockPanelCode#1] [!code-vbDockPanelCode#1]

See also