Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You plan to add a Button control and a StatusBar control to a window.
You need to ensure that the two controls meet the following requirements:
* The StatusBar control sticks to the lower edge of the window.
* The Button control has the minimum required size to display its content.
Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You plan to add a Button control and a StatusBar control to a window.
You need to ensure that the two controls meet the following requirements:
* The StatusBar control sticks to the lower edge of the window.
* The Button control has the minimum required size to display its content.
Which XAML code fragment should you use?

A.
<DockPanel>
<StatusBar DockPanel.Dock="Bottom">Information</StatusBar>
<Button>OK</Button>
</DockPanel>

B.
<StackPanel>
<Button>OK</Button>
<StatusBar>Information</StatusBar>
</StackPanel>

C.
<WrapPanel Orientation="Vertical">
<Button>OK</Button>
<StatusBar>Information</StatusBar>
</WrapPanel>

D.
<DockPanel LastChildFill="False" >
<WrapPanel DockPanel.Dock="Top" >
<Button>OK</Button>
</WrapPanel>
<StatusBar DockPanel.Dock="Bottom">Information</StatusBar>
</DockPanel>



Leave a Reply 0

Your email address will not be published. Required fields are marked *