WebPartZoneBase.LayoutOrientation プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebPartZoneBase.LayoutOrientation プロパティの意味・解説 

WebPartZoneBase.LayoutOrientation プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

ゾーン内でコントロール縦と横のどちらの方式並べるかを指定する値を取得または設定します

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

Public Overridable Property
 LayoutOrientation As Orientation
Dim instance As WebPartZoneBase
Dim value As Orientation

value = instance.LayoutOrientation

instance.LayoutOrientation = value
public virtual Orientation LayoutOrientation { get;
 set; }
/** @property */
public Orientation get_LayoutOrientation ()

/** @property */
public void set_LayoutOrientation (Orientation
 value)
public function get LayoutOrientation
 () : Orientation

public function set LayoutOrientation
 (value : Orientation)

プロパティ
ゾーン内でコントロール並べ方式決定する Orientation 値。既定方向Vertical です。

例外例外
例外種類条件

ArgumentOutOfRangeException

値が、列挙されOrientation 値ではありません。

解説解説
使用例使用例

WebPartZone コントロールで、LayoutOrientation プロパティ宣言またはプログラムによって使用するコード例次に示します分離コード ソース ファイルおよびこのコードゾーンを含む .aspx ページなどコード例全体については、WebPartZoneBase クラス概要参照してください

LayoutOrientation プロパティは、宣言型マークアップ割り当てる値を持ってます。この値は、ブラウザページ読み込んだ後、WebPartZone1反映されます。ゾーン内の Web パーツ コントロールは、横に並べて表示されます。

<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>
<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>

[Toggle Layout Orientation] ボタンクリックしてゾーン方向変更できます方向切り替えるコードは、部分クラスから抜粋した次のコード例あります

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 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);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からWebPartZoneBase.LayoutOrientation プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWebPartZoneBase.LayoutOrientation プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWebPartZoneBase.LayoutOrientation プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

WebPartZoneBase.LayoutOrientation プロパティのお隣キーワード
検索ランキング

   

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



WebPartZoneBase.LayoutOrientation プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS