Cette documentation est archivée et n’est pas conservée.

SPMobileControlContainer.Weightless, propriété (Microsoft.SharePoint.MobileControls)

Windows SharePoint Services 3
Gets or sets a value indicating whether the control should be considered weightless (having zero characters) for purposes of pagination.

Espace de noms : Microsoft.SharePoint.MobileControls
Assembly : Microsoft.SharePoint (dans microsoft.sharepoint.dll)

public bool Weightless { get; set; }

Valeur de la propriété

true if the control should be considered weightless; otherwise, false. The default is false.

Setting Weightless to false effectively gives the control a weight of 50 for purposes of pagination. Setting it to true gives it a weight of zero, which ensures that all the child controls of a container are kept together on a single page. For example, normally you want the title rendering control and the control that renders a separator between the title and the rest of the mobile page to stay together. Putting them in a SPMobileControlContainer and setting Weightless to true ensures that they stay together.

The following excerpt from the default mobile home page file, mbllists.aspx, illustrates this use.

<HeaderTemplate>
  <SPMobile:SPMobileControlContainer RunAt="Server" Weightless="true">
    <SPMobile:SPMobilePageTitle RunAt="Server" />
    <SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileDefaultSeparator" />
  </SPMobile:SPMobileControlContainer>
</HeaderTemplate>
Afficher: