WebPartZoneBase クラスとは? わかりやすく解説

WebPartZoneBase クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

WebPart (または他のサーバーまたはユーザー) コントロールコンテナとして機能するすべてのゾーン コントロール基本クラスとして機能します

名前空間: System.Web.UI.WebControls.WebParts
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public MustInherit Class
 WebPartZoneBase
    Inherits WebZone
    Implements IPostBackEventHandler
Dim instance As WebPartZoneBase
public abstract class WebPartZoneBase : WebZone,
 IPostBackEventHandler
public ref class WebPartZoneBase abstract :
 public WebZone, IPostBackEventHandler
public abstract class WebPartZoneBase extends
 WebZone implements IPostBackEventHandler
public abstract class WebPartZoneBase extends
 WebZone implements IPostBackEventHandler
解説解説

Web パーツ コントロール セットでは、ゾーンHTML テーブルとして表示される複合コントロールであり、Web ページの定義済み領域に他のコントロール格納しますWebPartZoneBase クラスは、WebZone 基本クラスから継承されるゾーンで、WebPart コントロールサーバー コントロールユーザー コントロール格納する派生ゾーン動作基本セット用意されています。WebPartZoneBase ゾーンWebPart (および他のサーバー) コントロール組み合わされて、ユーザーがほとんど常にやり取りしているページ標準ビューである Web パーツ アプリケーション主要な UI形成されます。

すべてのゾーンには、それに含まれるコントロールの共通の UI 要素セット用意されています。すべてのゾーンに共通の UI 要素詳細については、WebZone クラス概要トピック参照してくださいWebPartZoneBase ゾーンには、サーバー コントロールを含む本体セクションと、含まれているコントロールおよびそのクロム要素 (動詞境界線など) の表示使用される関連 WebPartChrome オブジェクト含まれます。

WebZone クラスから継承される機能の他に、WebPartZoneBase クラスは、クライアント側コントロールドラッグ固有の動詞 (コントロール最小化終了削除、および編集などの共通の UI アクション有効にする)、その他のスタイル機能追加しますWebPartZoneBase クラスは、データベース ドリブンカスタム ゾーンデザインする場合継承元のクラスでもあります。たとえば、カスタム天候予測 Web パーツ ゾーン作成するときは、WebPartZoneBase から継承され、データバインドで、気象情報表示する WebPart コントロールレイアウト機能およびその他のサービス格納して提供するようにデザインされゾーン作成できます

WebPartZoneBase クラスには、ゾーンスタイル属性使用される多数プロパティ含まれます。境界線についてのプロパティは、BorderStyle や BorderWidth など複数ありますゾーンヘッダー表示できるメニュースタイル属性使用されるプロパティ グループには、MenuLabelStyle や MenuVerbStyle などがあります

WebPartZoneBase クラスには、ゾーン内の動詞処理するためのメンバ多数含まれています。これらのメンバは、ゾーンパーツ コントロール表示される動詞関連付けられています。WebPartZoneBase ゾーンには、ゾーン レベル動詞追加できますが、既定ではこのゾーンには動詞指定されていません。Web パーツ コントロール セットには、パーツ コントロール使用できる標準動詞セット用意されていますが、開発者カスタム動詞追加することもできます動詞使用できる重要なプロパティには、CloseVerb、ConnectVerb、DeleteVerb、EditVerb、HelpVerb、およびMinimizeVerb プロパティのように標準動詞オブジェクト参照するプロパティあります標準動詞は、ゾーン格納されている各コントロールタイトル バーにある動詞メニュー (通常ドロップダウン メニューとして UI存在) に表示されます。また、UI動詞を表すクリック可能なオブジェクトタイプ指定できる VerbButtonType プロパティあります

動詞使用される他の重要なメンバには、動詞作成プロセスカスタム ハンドリングを行うためにオーバーライドできるイベント ハンドラである OnCreateVerbs メソッド、および CreateVerbs イベントあります

WebPartZoneBase クラスには、ゾーン内に含まれる WebPart コントロール使用される多数メンバありますWebParts プロパティは、ゾーン内のすべての WebPart (およびその他のサーバー) コントロールコレクション参照します。ユーザーゾーンWebPart コントロール実行できる標準動詞または標準アクションには、CloseWebPart、ConnectWebPart、EditWebPart などの複数メソッド対応してます。

WebPartZoneBase クラスには、ゾーン内の WebPart コントロールレイアウトまたは配置関係するメンバ多数あります。AllowLayoutChange プロパティは、ユーザーコントロールゾーン間で移動したり、ゾーン内で再配置したりできるかどうか決定します。LayoutOrientation プロパティでは、ゾーンコントロール縦と横のどちらの方式並べるかを指定できます

WebPartZoneBase クラスの他のメソッドでは、ゾーンさまざまな領域表示プログラム詳細に制御できます。これらのメソッド多くは、WebZone クラスから継承される基本メソッドオーバーライドして、WebPart コントロールを含むゾーン表示カスタマイズます。重要なメソッドには、Render、RenderBody、RenderDropCue、および RenderHeader があります

使用例使用例

WebPartZoneBase クラス使用方法を示すコード例次に示しますコードでは、派生クラス WebPartZone を Web パーツ ページ宣言使用して WebPart コントロール含め方法示しますコード例には 4 つセクションあります最初3 つのセクションコード ファイル記述4 つ目はコード実行方法説明です。

コード例最初部分は、ユーザーページさまざまな表示モード切り替えることができるようにするユーザー コントロールです。Web パーツ表示モード詳細、およびこのコントロールコード説明については、「チュートリアル : Web パーツ ページでの表示モード変更」を参照してください

<%@ control language="vb" classname="DisplayModeMenuVB"%>
<script runat="server">
  ' Use a field to reference the current WebPartManager.
  Dim _manager As WebPartManager

  Sub Page_Init(ByVal sender As
 Object, ByVal e As EventArgs)
    AddHandler Page.InitComplete, AddressOf
 InitComplete
  End Sub

  Sub InitComplete(ByVal sender As
 Object, ByVal e As System.EventArgs)
    _manager = WebPartManager.GetCurrentWebPartManager(Page)
      
    Dim browseModeName As String
 = WebPartManager.BrowseDisplayMode.Name
      
    ' Fill the dropdown with the names of supported display modes.
    Dim mode As WebPartDisplayMode
    For Each mode In _manager.SupportedDisplayModes
      Dim modeName As String
 = mode.Name
      ' Make sure a mode is enabled before adding it.
      If mode.IsEnabled(_manager) Then
        Dim item As New
 ListItem(modeName, modeName)
        DisplayModeDropdown.Items.Add(item)
      End If
    Next mode
      
    ' If shared scope is allowed for this user, display the scope-switching
    ' UI and select the appropriate radio button for the current user
 scope.
    If _manager.Personalization.CanEnterSharedScope Then
      Panel2.Visible = True
      If _manager.Personalization.Scope = PersonalizationScope.User
 Then
        RadioButton1.Checked = True
      Else
        RadioButton2.Checked = True
      End If
    End If
   
  End Sub

  ' Change the page to the selected display mode.
  Sub DisplayModeDropdown_SelectedIndexChanged(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    Dim selectedMode As String
 = DisplayModeDropdown.SelectedValue   
    Dim mode As WebPartDisplayMode = _
      _manager.SupportedDisplayModes(selectedMode)
    If Not (mode Is Nothing)
 Then
      _manager.DisplayMode = mode
    End If

  End Sub
   
  ' Set the selected item equal to the current display mode.
  Sub Page_PreRender(ByVal sender As
 Object, ByVal e As EventArgs)
    Dim items As ListItemCollection = DisplayModeDropdown.Items
    Dim selectedIndex As Integer
 = _
      items.IndexOf(items.FindByText(_manager.DisplayMode.Name))
    DisplayModeDropdown.SelectedIndex = selectedIndex

  End Sub

  ' Reset all of a user's personalization data for the page.
  Protected Sub LinkButton1_Click(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    _manager.Personalization.ResetPersonalizationState()
    
  End Sub

  ' If not in User personalization scope, toggle into it.
  Protected Sub RadioButton1_CheckedChanged(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    If _manager.Personalization.Scope = PersonalizationScope.Shared
 Then
      _manager.Personalization.ToggleScope()
    End If

  End Sub
   
  ' If not in Shared scope, and if user is allowed, toggle the scope.
  Protected Sub RadioButton2_CheckedChanged(ByVal
 sender As Object, _
    ByVal e As EventArgs)
    
    If _manager.Personalization.CanEnterSharedScope AndAlso
 _
      _manager.Personalization.Scope = PersonalizationScope.User Then
      _manager.Personalization.ToggleScope()
    End If

  End Sub

</script>
<div>
  <asp:Panel ID="Panel1" runat="server"
 
    Borderwidth="1" 
    Width="230" 
    BackColor="lightgray"
    Font-Names="Verdana, Arial, Sans Serif" >
    <asp:Label ID="Label1" runat="server"
 
      Text="&nbsp;Display Mode" 
      Font-Bold="true"
      Font-Size="8"
      Width="120" />
    <asp:DropDownList ID="DisplayModeDropdown"
 runat="server"  
      AutoPostBack="true" 
      Width="120"
      OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged"
 />
    <asp:LinkButton ID="LinkButton1" runat="server"
      Text="Reset User State" 
      ToolTip="Reset the current user's personalization data for
 the page."
      Font-Size="8" 
      OnClick="LinkButton1_Click" />
    <asp:Panel ID="Panel2" runat="server"
 
      GroupingText="Personalization Scope"
      Font-Bold="true"
      Font-Size="8" 
      Visible="false" >
      <asp:RadioButton ID="RadioButton1" runat="server"
 
        Text="User" 
        AutoPostBack="true"
        GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged"
 />
      <asp:RadioButton ID="RadioButton2" runat="server"
 
        Text="Shared" 
        AutoPostBack="true"
        GroupName="Scope" 
        OnCheckedChanged="RadioButton2_CheckedChanged"
 />
    </asp:Panel>
  </asp:Panel>
</div>
<%@ control language="C#" classname="DisplayModeMenuCS"%>
<script runat="server">
  
 // Use a field to reference the current WebPartManager.
  WebPartManager _manager;

  void Page_Init(object sender, EventArgs e)
  {
    Page.InitComplete += new EventHandler(InitComplete);
  }  

  void InitComplete(object sender, System.EventArgs e)
  {
    _manager = WebPartManager.GetCurrentWebPartManager(Page);

    String browseModeName = WebPartManager.BrowseDisplayMode.Name;

    // Fill the dropdown with the names of supported display modes.
    foreach (WebPartDisplayMode mode in _manager.SupportedDisplayModes)
    {
      String modeName = mode.Name;
      // Make sure a mode is enabled before adding it.
      if (mode.IsEnabled(_manager))
      {
        ListItem item = new ListItem(modeName, modeName);
        DisplayModeDropdown.Items.Add(item);
      }
    }

    // If shared scope is allowed for this user, display the scope-switching
    // UI and select the appropriate radio button for the current user
 scope.
    if (_manager.Personalization.CanEnterSharedScope)
    {
      Panel2.Visible = true;
      if (_manager.Personalization.Scope == PersonalizationScope.User)
        RadioButton1.Checked = true;
      else
        RadioButton2.Checked = true;
    }
    
  }
 
  // Change the page to the selected display mode.
  void DisplayModeDropdown_SelectedIndexChanged(object sender,
 EventArgs e)
  {
    String selectedMode = DisplayModeDropdown.SelectedValue;

    WebPartDisplayMode mode = _manager.SupportedDisplayModes[selectedMode];
    if (mode != null)
      _manager.DisplayMode = mode;
  }

  // Set the selected item equal to the current display mode.
  void Page_PreRender(object sender, EventArgs e)
  {
    ListItemCollection items = DisplayModeDropdown.Items;
    int selectedIndex = 
      items.IndexOf(items.FindByText(_manager.DisplayMode.Name));
    DisplayModeDropdown.SelectedIndex = selectedIndex;
  }

  // Reset all of a user's personalization data for the page.
  protected void LinkButton1_Click(object sender,
 EventArgs e)
  {
    _manager.Personalization.ResetPersonalizationState();
  }

  // If not in User personalization scope, toggle into it.
  protected void RadioButton1_CheckedChanged(object
 sender, EventArgs e)
  {
    if (_manager.Personalization.Scope == PersonalizationScope.Shared)
      _manager.Personalization.ToggleScope();
  }

  // If not in Shared scope, and if user is allowed, toggle the scope.
  protected void RadioButton2_CheckedChanged(object
 sender, EventArgs e)
  {
    if (_manager.Personalization.CanEnterSharedScope &&
 
        _manager.Personalization.Scope == PersonalizationScope.User)
      _manager.Personalization.ToggleScope();
  }
</script>
<div>
  <asp:Panel ID="Panel1" runat="server" 
    Borderwidth="1" 
    Width="230" 
    BackColor="lightgray"
    Font-Names="Verdana, Arial, Sans Serif" >
    <asp:Label ID="Label1" runat="server" 
      Text="&nbsp;Display Mode" 
      Font-Bold="true"
      Font-Size="8"
      Width="120" />
    <asp:DropDownList ID="DisplayModeDropdown" runat="server"
  
      AutoPostBack="true" 
      Width="120"
      OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged"
 />
    <asp:LinkButton ID="LinkButton1" runat="server"
      Text="Reset User State" 
      ToolTip="Reset the current user's personalization data for
 the page."
      Font-Size="8" 
      OnClick="LinkButton1_Click" />
    <asp:Panel ID="Panel2" runat="server" 
      GroupingText="Personalization Scope"
      Font-Bold="true"
      Font-Size="8" 
      Visible="false" >
      <asp:RadioButton ID="RadioButton1" runat="server" 
        Text="User" 
        AutoPostBack="true"
        GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged"
 />
      <asp:RadioButton ID="RadioButton2" runat="server" 
        Text="Shared" 
        AutoPostBack="true"
        GroupName="Scope" 
        OnCheckedChanged="RadioButton2_CheckedChanged" />
    </asp:Panel>
  </asp:Panel>
</div>

コード例2 つ目の部分は、メインWeb ページイベント処理するコードを含むコード ビサイド ファイルです。このファイルコードは、主要な WebPartZoneBase メンバ一部プログラム使用する方法示します

Imports System
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts

Partial Public Class WebPartZoneBase_overview

  Inherits System.Web.UI.Page

  Protected Sub Page_Load(ByVal
 sender As [Object], ByVal e As
 EventArgs) 
    Label1.Text = DateTime.Now.ToLongDateString()
    Label2.Text = String.Empty
  End Sub
  
  Protected Sub Button1_Click(ByVal
 sender As Object, ByVal
 e As EventArgs) 
    If WebPartZone2.VerbButtonType = ButtonType.Button Then
        WebPartZone2.VerbButtonType = ButtonType.Link
    Else
        WebPartZone2.VerbButtonType = ButtonType.Button
    End If
  End Sub
 
  Protected Sub Button2_Click(ByVal
 sender As Object, ByVal
 e As EventArgs) 
    If WebPartZone1.LayoutOrientation = Orientation.Vertical Then
        WebPartZone1.LayoutOrientation = Orientation.Horizontal
    Else
        WebPartZone1.LayoutOrientation = Orientation.Vertical
    End If
    Page_Load(sender, e)
  End Sub 
  
  Protected Sub Button3_Click(ByVal
 sender As Object, ByVal
 e As EventArgs) 
    Dim builder As New StringBuilder()
    builder.AppendLine("<strong>WebPartZone2 WebPart IDs</strong><br
 />")
    Dim part As WebPart
    For Each part In  WebPartZone1.WebParts
      builder.AppendLine("ID: " + part.ID + ";
 Type: " _
                          + part.GetType().ToString() _
                          + "<br />")
    Next part
    Label2.Text = builder.ToString()
    Label2.Visible = True
  End Sub 

  Protected Sub Button4_Click(ByVal
 sender As Object, ByVal
 e As EventArgs)
    Dim builder As New StringBuilder()
    builder.AppendLine("<strong>WebPartZone1 DisplayTitle
 Property</strong><br />")
    builder.AppendLine(WebPartZone1.DisplayTitle + "<br />")
    Label2.Text = builder.ToString()
    Label2.Visible = True
  End Sub

End Class
using System;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class WebPartZoneBase_overview
 : System.Web.UI.Page
{
  protected void Page_Load(Object sender, EventArgs
 e)
  {
    Label1.Text = DateTime.Now.ToLongDateString();
    Label2.Text = String.Empty;
  }

  protected void Button1_Click(object sender,
 EventArgs e)
  {
    if (WebPartZone2.VerbButtonType == ButtonType.Button)
      WebPartZone2.VerbButtonType = ButtonType.Link;
    else
      WebPartZone2.VerbButtonType = ButtonType.Button;
  }

  protected void Button2_Click(object sender,
 EventArgs e)
  {
    if (WebPartZone1.LayoutOrientation == Orientation.Vertical)
      WebPartZone1.LayoutOrientation = Orientation.Horizontal;
    else
      WebPartZone1.LayoutOrientation = Orientation.Vertical;
    Page_Load(sender, e);
  }

  protected void Button3_Click(object sender,
 EventArgs e)
  {
    StringBuilder builder = new StringBuilder();
    builder.AppendLine(@"<strong>WebPartZone1 WebPart IDs</strong><br
 />");
    foreach (WebPart part in WebPartZone1.WebParts)
    {
      builder.AppendLine("ID: " + part.ID 
                          + "; Type:  " + part.GetType() 
                          + @"<br />");
    }
    Label2.Text = builder.ToString();
    Label2.Visible = true;
  }

  protected void Button4_Click(object sender,
 EventArgs e)
  {
    StringBuilder builder = new StringBuilder();
    builder.AppendLine(@"<strong>WebPartZone1 DisplayTitle Property</strong><br
 />");
    builder.AppendLine(WebPartZone1.DisplayTitle + @"<br />");
    Label2.Text = builder.ToString();
    Label2.Visible = true;
  }
}

コード例3 つ目の部分は、WebPartZoneBase 基本クラスからの動作を示す WebPartZone コントロール、およびゾーン含まれる WebPart コントロールを含む Web ページです。

<%@ Page Language="VB" 
  Codefile="webpartzonebase_overview.vb"
  Inherits="WebPartZoneBase_overview"
  %>
<%@ register TagPrefix="uc1" 
  TagName="DisplayModeMenuVB" 
  Src="DisplayModeMenuVB.ascx" %>

<html  >
<head id="Head1" runat="server">
    <title>WebPartZoneBase Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:WebPartManager ID="WebPartManager1"
 Runat="server" />
      <uc1:DisplayModeMenuVB ID="DisplayModeMenu1"
 runat="server" />
      <table width="75%">
        <tr>
          <td>
            <asp:WebPartZone 
              ID="WebPartZone1" 
              Runat="server"
              LayoutOrientation="Vertical" >
              <EditVerb Text="Edit WebPart" />
              <SelectedPartChromeStyle BackColor="LightBlue"
 />
              <ZoneTemplate>
                <asp:BulletedList 
                  ID="BulletedList1" 
                  Runat="server"
                  DisplayMode="HyperLink" 
                  Title="Favorite Links" >
                  <asp:ListItem Value="http://msdn.microsoft.com">
                    MSDN
                  </asp:ListItem>
                  <asp:ListItem Value="http://www.asp.net">
                    ASP.NET
                  </asp:ListItem>
                  <asp:ListItem Value="http://www.msn.com">
                    MSN
                  </asp:ListItem>
                </asp:BulletedList>
                <asp:Calendar ID="Calendar1" Runat="server"
 
                  Title="My Calendar" />
              </ZoneTemplate>
            </asp:WebPartZone>
          </td>
          <td valign="top" align="right">
            <asp:WebPartZone 
              ID="WebPartZone2"
              Runat="server" 
              DragHighlightColor="#00ff00"
              AllowLayoutChange="true"
              EmptyZoneText="Add WebParts to this empty Zone."
              BorderWidth="2"
              BorderColor="DarkBlue"
              BorderStyle="Dashed" 
              MenuLabelText="Verbs Menu" 
              MenuPopupImageUrl="label.gif" >
              <VerbStyle Font-Italic="true" />
              <MenuLabelStyle BackColor="Lime"
 BorderWidth="1"  />
              <MenuLabelHoverStyle Font-Bold="true"
 />
              <MenuVerbHoverStyle BackColor="LightGrey"
 />
              <MenuVerbStyle Font-Italic="true"
 /> 
              <ZoneTemplate>
                <asp:Label ID="Label1" Runat="server"
 Title="Date" />
              </ZoneTemplate>
            </asp:WebPartZone>
          </td>
        </tr>
        <tr>
          <td>
            <asp:EditorZone ID="EditorZone1" Runat="server">
              <ZoneTemplate>
                <asp:AppearanceEditorPart ID="AppearanceEditorPart1"
 
                  Runat="server" />
                <asp:LayoutEditorPart ID="LayoutEditorPart1"
 
                  Runat="server" />
              </ZoneTemplate>
            </asp:EditorZone>      
          </td>
        </tr>
      </table>
    </div>
    <asp:Button ID="Button1" Runat="server"
 
      Width="200" Text="Toggle
 WebPartZone2 Buttons" 
      OnClick="Button1_Click" />
    <br />
    <asp:Button ID="Button2" Runat="server"
 
      Width="200"  Text="Toggle
 Layout Orientation" 
      OnClick="Button2_Click" />
    <br />
    <asp:Button ID="Button3" Runat="server"
 
      Width="200" Text="List WebPartZone1
 WebParts" 
      OnClick="Button3_Click" />
    <br />
    <asp:Button ID="Button4" Runat="server"
 
      Width="200" Text="WebPartZone1
 Display Title" 
      OnClick="Button4_Click" />
    <br />
    <asp:Label ID="Label2" Runat="server"
 Visible="false" />
    </form>
</body>
</html>
<%@ Page Language="C#" 
  Codefile="webpartzonebase_overview.cs"
  Inherits="WebPartZoneBase_overview"  %>
<%@ register TagPrefix="uc1" 
  TagName="DisplayModeMenuCS" 
  Src="DisplayModeMenuCS.ascx" %>

<html  >
<head runat="server">
    <title>WebPartZoneBase Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:WebPartManager ID="WebPartManager1" Runat="server"
 />
      <uc1:DisplayModeMenuCS ID="DisplayModeMenu1" runat="server"
 />
      <table width="75%">
        <tr>
          <td>
            <asp:WebPartZone 
              ID="WebPartZone1" 
              Runat="server"
              LayoutOrientation="Vertical" >
              <EditVerb Text="Edit WebPart" />
              <SelectedPartChromeStyle BackColor="LightBlue" />
              <ZoneTemplate>
                <asp:BulletedList 
                  ID="BulletedList1" 
                  Runat="server"
                  DisplayMode="HyperLink" 
                  Title="Favorite Links" >
                  <asp:ListItem Value="http://msdn.microsoft.com">
                    MSDN
                  </asp:ListItem>
                  <asp:ListItem Value="http://www.asp.net">
                    ASP.NET
                  </asp:ListItem>
                  <asp:ListItem Value="http://www.msn.com">
                    MSN
                  </asp:ListItem>
                </asp:BulletedList>
                <asp:Calendar ID="Calendar1" Runat="server"
 
                  Title="My Calendar" />
              </ZoneTemplate>
            </asp:WebPartZone>
          </td>
          <td valign="top" align="right">
            <asp:WebPartZone 
              ID="WebPartZone2"
              Runat="server" 
              DragHighlightColor="#00ff00"
              AllowLayoutChange="true"
              EmptyZoneText="Add WebParts to this empty Zone."
              BorderWidth="2"
              BorderColor="DarkBlue"
              BorderStyle="Dashed" 
              MenuLabelText="Verbs Menu" 
              MenuPopupImageUrl="label.gif" >
              <VerbStyle Font-Italic="true" />
              <MenuLabelStyle BackColor="Lime" BorderWidth="1"
  />
              <MenuLabelHoverStyle Font-Bold="true"
 />
              <MenuVerbHoverStyle BackColor="LightGrey" />
              <MenuVerbStyle Font-Italic="true" />
 
              <ZoneTemplate>
                <asp:Label ID="Label1" Runat="server" Title="Date"
 />
              </ZoneTemplate>
            </asp:WebPartZone>
          </td>
        </tr>
        <tr>
          <td>
            <asp:EditorZone ID="EditorZone1" Runat="server">
              <ZoneTemplate>
                <asp:AppearanceEditorPart ID="AppearanceEditorPart1"
 
                  Runat="server" />
                <asp:LayoutEditorPart ID="LayoutEditorPart1" 
                  Runat="server" />
              </ZoneTemplate>
            </asp:EditorZone>      
          </td>
        </tr>
      </table>
    </div>
    <asp:Button ID="Button1" Runat="server" 
      Width="200" Text="Toggle WebPartZone2 Buttons" 
      OnClick="Button1_Click" />
    <br />
    <asp:Button ID="Button2" Runat="server" 
      Width="200"  Text="Toggle Layout Orientation" 
      OnClick="Button2_Click" />
    <br />
    <asp:Button ID="Button3" Runat="server" 
      Width="200" Text="List WebPartZone1 WebParts" 
      OnClick="Button3_Click" />
    <br />
    <asp:Button ID="Button4" Runat="server" 
      Width="200" Text="WebPartZone1 Display Title" 
      OnClick="Button4_Click" />
    <br />
    <asp:Label ID="Label2" Runat="server" Visible="false"
 />
    </form>
</body>
</html>

ブラウザWeb ページ読み込みます。[Display Mode] ドロップダウン リスト コントロール使用してページデザイン モード切り替えますWebPart コントロールクリックして表示されているゾーン間でドラッグしてみます。また、ページいくつかのボタンクリックしてWebPartZoneBase クラスさまざまなメンバ使用した効果確認します次にページ編集モード切り替えますWebPart コントロールWebPartZone2配置されていることを確認しコントロールタイトル バーにある動詞メニュークリックします。さらに、[編集] をクリックしてコントロール編集します。そのコントロール編集終わったら、他のゾーンにあるコントロールいずれか編集します。これらの手順を実行すると、WebPartZoneBase クラスさまざまなメンバ使用した結果現れるコントロールおよびゾーンUI スタイル違い確認できます

.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.Web.UI.Control
     System.Web.UI.WebControls.WebControl
       System.Web.UI.WebControls.CompositeControl
         System.Web.UI.WebControls.WebParts.WebZone
          System.Web.UI.WebControls.WebParts.WebPartZoneBase
             System.Web.UI.WebControls.WebParts.WebPartZone
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「WebPartZoneBase クラス」の関連用語

WebPartZoneBase クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WebPartZoneBase クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS