DomainDataSource.LoadSize 속성
Load가 실행될 때마다 로드할 최대 항목 수를 가져오거나 설정합니다. 0일 경우 요청한 모든 엔터티가 로드됩니다.
네임스페이스: System.Windows.Controls
어셈블리: system.windows.controls.domainservices.dll의 System.Windows.Controls.DomainServices
사용법
‘사용 방법
Dim instance As DomainDataSource
Dim value As Integer
value = instance.LoadSize
instance.LoadSize = value
구문
‘선언
Public Property LoadSize As Integer
public int LoadSize { get; set; }
public:
property int LoadSize {
int get ();
void set (int value);
}
/** @property */
public int get_LoadSize ()
/** @property */
public void set_LoadSize (int value)
public function get LoadSize () : int
public function set LoadSize (value : int)
속성 값
단일 데이터 로드 작업에서 로드할 항목의 수이며 0일 경우 모든 항목이 로드됨을 나타냅니다.
예제
다음 예제에서는 LoadSize 속성이 30으로, PageSize 속성이 15로 설정된 DomainDataSource 컨트롤을 보여 줍니다.
<Grid x:Name="LayoutRoot" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<riaControls:DomainDataSource PageSize="15" LoadSize="30" Name="source" QueryName="GetProducts" AutoLoad="true">
<riaControls:DomainDataSource.DomainContext>
<domain:ProductDomainContext />
</riaControls:DomainDataSource.DomainContext>
<riaControls:DomainDataSource.SortDescriptors>
<riaControls:SortDescriptor PropertyPath="ListPrice" />
</riaControls:DomainDataSource.SortDescriptors>
</riaControls:DomainDataSource>
<data:DataGrid Grid.Row="0" ItemsSource="{Binding Data, ElementName=source}" />
<data:DataPager Grid.Row="1" Source="{Binding Data, ElementName=source}" />
</Grid>
설명
PageSize 및 LoadSize가 모두 0이 아니면 엔터티는 LoadSize에 가장 가까운 PageSize의 배수를 사용하여 로드됩니다. 따라서 페이지 일부를 로드하지 않고 여러 페이지를 한번에 로드할 수 있습니다.
LoadSize의 값은 항상 DomainDataSource에서 구성한 ResultLimit 속성보다 작거나 같게 지정하십시오.
스레드 보안
이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 모든 인스턴스 멤버는 스레드로부터 안전하지 않을 수 있습니다.
플랫폼
개발 플랫폼
Windows XP Home Edition, Windows XP Professional, Windows Server 2003 , Windows Server 2008 및 Windows 2000
대상 플랫폼
Change History
참고 항목
참조
DomainDataSource 클래스
DomainDataSource 멤버
System.Windows.Controls 네임스페이스
DomainDataSource.LoadInterval 속성
PageSize