Write the XAML code to create a DockPanel having four buttons-01673
This subjective question is related to the book/course
vu isl201 Islamic Studies.
It can also be found in
vu isl201 Mid Term Solved Past Paper No. 2.
Question 1: Write the XAML code to create a "DockPanel" having four buttons with dock settings i.e. Top, Bottom, Right and Left.
<Button DockPanel.Dock="Top" Background="Red">1 (Top)</Button>
<Button DockPanel.Dock="Left" Background="Orange">2 (Left)</Button>
<Button DockPanel.Dock="Right" Background="Yellow">3 (Right)</Button>
Layout with Panels
<Button DockPanel.Dock="Bottom" Background="Lime">4 (Bottom)</Button> <Button Background="Aqua">5</Button>
</DockPanel>
Answer:
<DockPanel><Button DockPanel.Dock="Top" Background="Red">1 (Top)</Button>
<Button DockPanel.Dock="Left" Background="Orange">2 (Left)</Button>
<Button DockPanel.Dock="Right" Background="Yellow">3 (Right)</Button>
Layout with Panels
<Button DockPanel.Dock="Bottom" Background="Lime">4 (Bottom)</Button> <Button Background="Aqua">5</Button>
</DockPanel>