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)
Syntax
'Declaration
Public Property Weightless As Boolean
Get
Set
'Usage
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.
Remarks
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 mobile 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>
See Also
Reference
SPMobileControlContainer Class