FormViewDesigner.SampleRowCount 属性
定义
获取要显示的关联控件的示例行数。Gets the number of sample rows for the associated control to display.
protected:
virtual property int SampleRowCount { int get(); };
protected override int SampleRowCount { get; }
member this.SampleRowCount : int
Protected Overrides ReadOnly Property SampleRowCount As Integer
属性值
示例行数。The number of sample rows.
示例
下面的代码示例演示如何重写 SampleRowCount 从类继承的类中的属性 FormViewDesigner ,以更改设计时在控件的页导航行中显示的页面链接数 FormView 。The following code example shows how to override the SampleRowCount property in a class that is inherited from the FormViewDesigner class to change the number of page links appearing in the pager row of the FormView control at design time. 该示例将导致显示四个页面链接。The example causes four page links to display.
// Determines the number of design-time links in the pager row.
protected override int SampleRowCount
{
get
{
// Render four links in the pager row.
return 4;
}
} // SampleRowCount
' Determines the number of design-time links in the pager row.
Protected Overrides ReadOnly Property SampleRowCount() As Integer
Get
' Render four links in the pager row.
Return 4
End Get
End Property ' SampleRowCount
注解
SampleRowCount始终返回 2 。The SampleRowCount always returns 2. FormView如果 PagerSettings 模式为数值模式,这将导致在设计时在控件的页导航行中显示两个页面链接。This causes two page links to be displayed in the pager row of the FormView control at design time, if the PagerSettings mode is numeric.