
This article focuses on the vertical and horizontal alignment of elements.

In the previous article, WPF Layout: Size, Width, and Height, I discussed how to manage the size of elements. Margins are another vital piece of the layout system. This article focuses on the margins only.

Learn how WPF element Width, Height, minimum and maximum size properties determine the actual rendered size of controls.

In a series of articles, I will discuss the layout process in WPF. The series starts with an understanding of the WPF layout process.


This article demonstrates how to implent virtualization in WPF using VirtualizingStackPanel
Imagine having access to your own personal secretary at your disposal without paying a salary.

The WrapPanel element in XAML represents a Wrap Panel. This tutorial shows how to use a XAML WrapPanel in WPF and C#.
Read this blog about Microsoft Surface and its future.
Learn how scheduling time for email, social media, and text messages can reduce distractions and improve focus and productivity at work.

The ListView element in XAML represents a ListView control. The code example in this tutorial demonstrates how to use a XAML ListView in WPF using C#.

Learn how to create a WPF GridView layout by setting a ListView's View property and defining GridViewColumn headers, widths, and data bindings.

This is a reference tutorial of XAML ListBox element with code examples written in XAML and C#.

Learn how to use XAML Viewbox with code example. <Viewbox> element in XAML represents a Viewbox control of WPF and C#. Viewbox.Stretch and Viewbox.StretchDirection properties.

XAML <TreeView> element represents a TreeView control in WPF. Here are a few XAML TreeView code examples.

The <Toolbar> element in XAML and the Toolbar class in WPF represent a Toolbar control. This tutorial consists of several code examples of how to create a Toolbar and add buttons to a toolbar control in WPF using XAML and C#.

XAML ToolTip element represent a ToolTip of control that can be set using the ToolTip property of a WPF control. Here are some code examples of how to show tool tips of controls in WPF.

The element in XAML represents a TextBox control. Code examples of how to use XAML TextBox.

XAML TextBlock element represents a TextBlock control. These code examples demo how to declare and use a XAML Text Block.



Implement vertical and horizontal scrolling in your WPF applications using ScrollViewer. Control content visibility with properties like VerticalScrollBarVisibility and HorizontalScrollBarVisibility for seamless user experience.
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterMembers onlyWrite an article and earn +1,000 SHARP when it is approved.
Write an article