The namespace in which the component resides:
System.Windows.Controls
Common Methods for components:
Getdock: Gets the value of the specified element dock () attached property.
Setdock: Sets the specific dock value of the specified element dock () attached property.
Component Common Properties:
LastChildFill: Gets or sets a value that indicates whether the last child element added to DockPanel is scaled to fill the remaining space.
Instance:
Note: You can observe the scaling of the last child element by setting the properties of the DockPanel component to TRUE or False respectively.
MainPage.xaml File Code:
<usercontrol
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"
Xmlns:d= "http://schemas.microsoft.com/expression/blend/2008" xmlns:mc= "http://schemas.openxmlformats.org/ markup-compatibility/2006 "
mc:ignorable= "D" xmlns:controlstoolkit= "clr-namespace:system.windows.controls;assembly= System.Windows.Controls.Toolkit "xmlns:datainput=" clr-namespace:system.windows.controls;assembly= System.Windows.Controls.Data.Input "x:class=" Silverlightclient.mainpage "
D:designwidth= "d:designheight=" >
<grid x:name= "LayoutRoot" width= "" height= "" "background=" "White" >
<border height= "margin=" 8,8,8,0 "verticalalignment=" Top "borderbrush=" Black "borderthickness=" 1 ">
<!--the state of the LastChildFill property set to True-->
<controlstoolkit:dockpanel lastchildfill= "True" >
<datainput:label height= "verticalalignment=" Top "width=" background= "#FF8CBEDA" content= "CT1"/>
<datainput:label height= "verticalalignment=" Top "width=" background= "#FF34E82F" content= "CT2"/>
<datainput:label height= "verticalalignment=" Top "width=" background= "#FFE6F014" content= "CT3"/>
<button content= "CT4"/>
</controlsToolkit:DockPanel>
</Border>
<border margin= "8,113,8,20" borderbrush= "Black" borderthickness= "1" >
<!--the state of the LastChildFill property set to False-->
<controlstoolkit:dockpanel lastchildfill= "False" >
<datainput:label height= "verticalalignment=" Top "width=" background= "#FF8CBEDA" content= "CT1"/>
<datainput:label height= "verticalalignment=" Top "width=" background= "#FF34E82F" content= "CT2"/>
<datainput:label height= "verticalalignment=" Top "width=" background= "#FFE6F014" content= "CT3"/>
<button content= "CT4"/>
</controlsToolkit:DockPanel>
</Border>
</Grid>
</UserControl>