Expanded Library

XAML Layout in Depth

by Thomas Claudius Huber

This course will teach you to build professional user interfaces in XAML-based applications, understand the layout process, and learn about layout-properties, panels, transformations, projections, and advanced topics to create exciting layouts.

What you'll learn

This course is about layout in XAML-based applications. It focuses on all XAML platforms like WPF, WinRT and Silverlight. In this course, you'll learn how the layout process works, and how to build custom panels. You'll see how the different layout properties of elements like Width, Height, Alignments and Margin behave and when they have an effect and when they do not. After those basics, this course focuses on the different Panels available in XAML. You'll learn about the common Panels Grid, StackPanel and Canvas, but also about the VirtualizingStackPanel that is used by some ItemsControl for UI-Virtualization. This course also shows you how to use the WPF-specific Panels WrapPanel and DockPanel and the WinRT-specific Panel VariableSizedWrapGrid. After the Panels, we look at Transformations to rotate, scale, skew and translate (move) your elements. You'll also learn how to work with Projections to give your elements a 3D-like effect. With the knowledge about the layout process, about the properties of elements, about Panels, and about Transformations and Projections in the backpack, we look at advanced topics. You'll learn about the shared size groups supported by the Grid in the WPF, how to change the Panel of an ItemsControl, how to animate a position change of the elements in a Panel, and many other interesting things. Throughout this course, your knowledge is applied to an MVVM-based WPF-application called FriendViewer. The course teaches you how to build the complete layout of that FriendViewer application, including a pinnable navigation, a loading-overlay, a UserControl to display a friend, and a main area that re-positions elements dynamically with an animation.

Table of contents

About the author

Thomas is a Microsoft MVP for Windows Development. He works as a developer, consultant, and trainer in the fields of .NET, C#, TypeScript, XAML, and Azure. Thomas is a well-known speaker and book author. He has written several special interest books in his areas, including an extensive handbook for Windows Presentation Foundation and a handbook on development with TypeScript. Thomas lives in Germany's Black Forest with his wife and their three daughters. In his spare time, he plays football and ... more

Ready to upskill? Get started