Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties:...

7
Layout With Panels

Transcript of Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties:...

Page 1: Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.

Layout With Panels

Page 2: Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.

Canvas

• Most basic panel• Position with explicit coordinates• Attached properties: Left, Top, Right, Bottom• HorizontalAlignment and VerticalAlignment could not be used inside• ZIndex

Page 3: Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.

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

Page 4: Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.

WrapPanel

• No attached properties fro controlling element positions• Properties for controlling its behavior• Orientation• ItemHeight• ItemWidth

Page 5: Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.

DockPanel

• Attacked property• System.Windows.Controls.Dock

• Top• Left• Right• Bottom

Page 6: Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.

Grid

• Most versatile panel• Sizing the rows and columns• Absolute sizing• Autosizing• Proportional sizing (star sizing)

• GridSplitter• SharedSizeGroup

Page 7: Layout With Panels. Canvas Most basic panel Position with explicit coordinates Attached properties: Left, Top, Right, Bottom HorizontalAlignment and VerticalAlignment.

Handling Content Overflow

• Clipping (before RenderTransforms applied)• Scrolling (ScrollViewer)• Scaling• Wrapping• Trimming