Layout With Panels
Canvas
• Most basic panel• Position with explicit coordinates• Attached properties: Left, Top, Right, Bottom• HorizontalAlignment and VerticalAlignment could not be used inside• ZIndex
StackPanel
• Stacks its children sequentially• System.Windows.Controls.Orientation: Horizontal, Vertical
• No own attached properties
• System.Windows.Controls.VirtualizingPanel• VirtualizingStackPanel -> data binding to a really large number of child
elements
WrapPanel
• No attached properties fro controlling element positions• Properties for controlling its behavior• Orientation• ItemHeight• ItemWidth
DockPanel
• Attacked property• System.Windows.Controls.Dock
• Top• Left• Right• Bottom
Grid
• Most versatile panel• Sizing the rows and columns• Absolute sizing• Autosizing• Proportional sizing (star sizing)
• GridSplitter• SharedSizeGroup
Handling Content Overflow
• Clipping (before RenderTransforms applied)• Scrolling (ScrollViewer)• Scaling• Wrapping• Trimming