Share via


Panel.Paginate プロパティ

定義

Panel コントロールの改ページ位置を自動修正するかどうかを示すブール値を取得または設定します。 この API は、互換性のために残されています。 ASP.NET モバイル アプリケーションを開発する方法については、「ASP.NET を使用した Mobile Apps & サイト」を参照してください。

public:
 virtual property bool Paginate { bool get(); void set(bool value); };
[System.ComponentModel.Bindable(true)]
public virtual bool Paginate { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.Paginate : bool with get, set
Public Overridable Property Paginate As Boolean

プロパティ値

Panel の改ページ位置を自動修正する場合は true。それ以外の場合は false

属性

次のコード例は、ページを改ページするデバイスで表示する場合に、1 つのページに収まるコントロールよりも多くのコントロールを含むパネルをページ分割して、ユーザーがパネル上のすべての項目にアクセスできるようにする方法を示しています。

注意

次のコード サンプルでは、単一ファイルコード モデルを使用しており、分離コード ファイルに直接コピーすると正しく動作しない場合があります。 このコード サンプルは、拡張子が .aspx の空のテキスト ファイルにコピーする必要があります。 詳細については、「ASP.NET Web Forms ページ コード モデル」を参照してください。

<%@ Page Language="C#" 
    Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" %>

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Web.UI.MobileControls.Label lab;

        for (int i = 1; i < 16; i++)
        {
            lab = new System.Web.UI.MobileControls.Label();
            lab.Text = i.ToString() + 
                " - This sentence repeats over and over.";
            Panel1.Controls.Add(lab);
        }
        Form1.Paginate = true;
        Panel1.Paginate = true;
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
    <mobile:form id="Form1" runat="server">
        <mobile:Panel ID="Panel1" Runat="server">
        </mobile:Panel>
    </mobile:form>
</body>
</html>
<%@ Page Language="VB" 
    Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" %>

<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim lab As System.Web.UI.MobileControls.Label

        For i As Integer = 1 To 15
            lab = New System.Web.UI.MobileControls.Label()
            lab.Text = i.ToString() & _
                " - This sentence repeats over and over."
            Panel1.Controls.Add(lab)
        Next
        Form1.Paginate = True
        Panel1.Paginate = True
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
    <mobile:form id="Form1" runat="server">
        <mobile:Panel ID="Panel1" Runat="server">
        </mobile:Panel>
    </mobile:form>
</body>
</html>

注釈

このイベントは Paginated 、フォームの改ページ位置の設定が行われた後に発生します。

注意

プロパティが Paginatefalse設定されている場合でも、フォームの ControlToPaginate プロパティが設定されている場合でも改ページ処理が発生する可能性があります。

注意

フォーム内のコントロールで改ページ位置をPanel許可するには、フォームとパネルの両方で を にtrue設定Paginateする必要があります。

適用対象

こちらもご覧ください