Wrap panel is similar to stack panel, but while stack panel stacks its items, wrap panel wrap them to additional rows and columns according to provided space. It may be used when the list of items is to be shown. When we are not sure about the item count then wrap panel will wrap the items continuously like in windows explorer.
Orientation property of wrap panel is Horizontal by default that is changeable. The above image is simple created by using the following code:
Nested wrap panel can be used in the same way stack panel is used.
Dock panel
Orientation property of wrap panel is Horizontal by default that is changeable. The above image is simple created by using the following code:
<WrapPanel>
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
<WrapPanel Orientation="Vertical">
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
<WrapPanel Orientation="Vertical">
<Button Content="First"></Button>
<Button Content="Second"></Button>
<Button Content="Third"></Button>
<Button Content="Four"></Button>
<Button Content="Five"></Button>
</WrapPanel>
Nested wrap panel can be used in the same way stack panel is used.
Dock panel
Tidak ada komentar:
Posting Komentar