Silverlight's DockPanel component

Source: Internet
Author: User
Tags xmlns silverlight

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.