SPMobileControlContainer.Weightless Property

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

Namespace:  Microsoft.SharePoint.MobileControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


Public Property Weightless As Boolean

Dim instance As SPMobileControlContainer
Dim value As Boolean

value = instance.Weightless

instance.Weightless = value
public bool Weightless { get; set; }

Property Value

Type: System.Boolean
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.

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

See Also


SPMobileControlContainer Class

SPMobileControlContainer Members

Microsoft.SharePoint.MobileControls Namespace