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

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

WebZone.PartStyle プロパティ

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

ゾーンに含まれる境界線および各 Web パーツ コントロールの内容に適用されるスタイル特性を取得します。

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

Public ReadOnly Property
 PartStyle As TableStyle
Dim instance As WebZone
Dim value As TableStyle

value = instance.PartStyle
public TableStyle PartStyle { get; }
public:
property TableStyle^ PartStyle {
    TableStyle^ get ();
}
/** @property */
public TableStyle get_PartStyle ()
public function get PartStyle
 () : TableStyle

プロパティ値
ゾーンの Web パーツ コントロールのスタイル属性を含む TableStyle。

解説解説
使用例使用例

PartStyle プロパティの使用方法を示すコード例を次に示します。宣言型マークアップで参照されるゾーン内に、<asp:calendar> 要素および <asp:literal> 要素があります。どちらのコントロールもゾーン内にあるため、実行時に Web パーツ コントロールとして動作します。カレンダー コントロールの日付をクリックすると、PartStyle プロパティを使用して、プログラムによってゾーン内のすべてのパーツ コントロールの背景色が赤色に変わります。

<%@ page language="VB" %>
<script runat="server">
  Sub cal1_SelectionChanged(ByVal sender As
 Object, _
                            ByVal e As EventArgs)
    WebPartZone1.PartStyle.BackColor = _
        System.Drawing.Color.Red
  End Sub
</script>
<html>
<head id="Head1" runat="server">
  
</head>
<body>
  <form id="Form1" runat="server">
    <asp:webpartmanager id="WebPartManager1" runat="server"
 />
    <asp:webpartzone
      id="WebPartZone1"
      runat="server">
        <zonetemplate>
          <asp:Calendar 
            ID="cal1" 
            Runat="server" 
            Title="My Calendar" 
            OnSelectionChanged="cal1_SelectionChanged"
 />
          <asp:Literal ID="literal1" Runat="server">
            <h2>Favorite Links</h2>
            <a href="http://www.microsoft.com">Microsoft</a>
            <br />
            <a href="http://msdn.microsoft.com">MSDN</a>
          </asp:Literal>
        </zonetemplate>
    </asp:webpartzone>
  </form>
</body>
</html>
<%@ page language="C#" %>
<script runat="server">

  void cal1_SelectionChanged(object sender, EventArgs e)
  {
    WebPartZone1.PartStyle.BackColor = 
        System.Drawing.Color.Red;
  }
</script>
<html>
<head id="Head1" runat="server">
  
</head>
<body>
  <form id="Form1" runat="server">
    <asp:webpartmanager id="WebPartManager1" runat="server"
 />
    <asp:webpartzone
      id="WebPartZone1"
      runat="server">
        <zonetemplate>
          <asp:Calendar 
            ID="cal1" 
            Runat="server" 
            Title="My Calendar" 
            OnSelectionChanged="cal1_SelectionChanged" />
          <asp:Literal ID="literal1" Runat="server">
            <h2>Favorite Links</h2>
            <a href="http://www.microsoft.com">Microsoft</a>
            <br />
            <a href="http://msdn.microsoft.com">MSDN</a>
          </asp:Literal>
        </zonetemplate>
    </asp:webpartzone>
  </form>
</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebZone クラス
WebZone メンバ
System.Web.UI.WebControls.WebParts 名前空間
TableStyle クラス
PartChromeStyle
その他の技術情報
ASP.NET Web パーツ ページ



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



WebZone.PartStyle プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS