DomainDataSource.LoadSize Property

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Gets or sets the maximum number of items to load each time a Load is executed. When equal to 0, all requested entities will be loaded.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.DomainServices (in System.Windows.Controls.DomainServices.dll)

public int LoadSize { get; set; }

Property Value

Type: System.Int32
The number of items to load in a single data loading operation, or 0 to indicate all items should be loaded.

When PageSize and LoadSize are both non-zero, entities will be loaded using the multiple of PageSize nearest LoadSize. This allows multiple pages to be loaded at once without loading partial pages.

Always specify a value for LoadSize that is less than or equal to any ResultLimit property configured on the DomainDataSource.

The following example shows a DomainDataSource control with the LoadSize property set to 30 and PageSize property set to 15.

<Grid x:Name="LayoutRoot" Background="White">  
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
    <riaControls:DomainDataSource PageSize="15" LoadSize="30" x:Name="source" QueryName="GetProducts" AutoLoad="true">
            <domain:ProductDomainContext />
            <riaData:SortDescriptor PropertyPath="ListPrice" />
    <data:DataGrid Grid.Row="0" ItemsSource="{Binding Data, ElementName=source}" />
    <data:DataPager Grid.Row="1" Source="{Binding Data, ElementName=source}" />