DomainDataSource.PageSize 속성
Data 및 DataView 속성에서 반환된 뷰의 각 페이지에 표시할 항목의 수를 가져오거나 설정하며 0일 경우 페이징되지 않습니다.
네임스페이스: System.Windows.Controls
어셈블리: system.windows.controls.domainservices.dll의 System.Windows.Controls.DomainServices
사용법
‘사용 방법
Dim instance As DomainDataSource
Dim value As Integer
value = instance.PageSize
instance.PageSize = value
구문
‘선언
Public Property PageSize As Integer
public int PageSize { get; set; }
public:
property int PageSize {
int get ();
void set (int value);
}
/** @property */
public int get_PageSize ()
/** @property */
public void set_PageSize (int value)
public function get PageSize () : int
public function set PageSize (value : int)
속성 값
Data 및 DataView 속성에서 반환된 뷰의 각 페이지에 표시할 항목의 수이며 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가 0이면 페이징이 해제되고 Data 속성을 통해 노출되는 항목의 수에는 제한이 없습니다. PageSize의 값이 0이 아니면 각 Load 작업으로 로드되는 엔터티의 수도 서버 쪽 페이징을 사용하여 제한됩니다. PageSize 및 LoadSize가 모두 0이 아니면 엔터티는 LoadSize에 가장 가까운 PageSize의 배수를 사용하여 로드됩니다. 따라서 페이지 일부를 로드하지 않고 여러 페이지를 한번에 로드할 수 있습니다.
PageSize의 값은 항상 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.LoadSize 속성