CatalogPartChrome.CreateCatalogPartChromeStyle メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CatalogPartChrome.CreateCatalogPartChromeStyle メソッドの意味・解説 

CatalogPartChrome.CreateCatalogPartChromeStyle メソッド

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

CatalogPartChrome オブジェクトによって表示される各 CatalogPart コントロールのスタイル属性を提供するスタイル オブジェクトを作成します。

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

Protected Overridable Function
 CreateCatalogPartChromeStyle ( _
    catalogPart As CatalogPart, _
    chromeType As PartChromeType _
) As Style
Dim catalogPart As CatalogPart
Dim chromeType As PartChromeType
Dim returnValue As Style

returnValue = Me.CreateCatalogPartChromeStyle(catalogPart, chromeType)
protected virtual Style CreateCatalogPartChromeStyle (
    CatalogPart catalogPart,
    PartChromeType chromeType
)
protected:
virtual Style^ CreateCatalogPartChromeStyle (
    CatalogPart^ catalogPart, 
    PartChromeType chromeType
)
protected Style CreateCatalogPartChromeStyle (
    CatalogPart catalogPart, 
    PartChromeType chromeType
)
protected function CreateCatalogPartChromeStyle
 (
    catalogPart : CatalogPart, 
    chromeType : PartChromeType
) : Style

パラメータ

catalogPart

現在表示中のコントロール。

chromeType

特定のコントロールのクロムの種類。PartChromeType 列挙値の 1 つ。

戻り値
catalogPart のスタイル属性を含む Style。

例外例外
例外の種類条件

ArgumentNullException

catalogPart が参照するコントロールが null 参照 (Visual Basic では Nothing) です。

ArgumentOutOfRangeException

chromeType が PartChromeType ではありません。

解説解説

CreateCatalogPartChromeStyle メソッドは、CatalogPartChrome オブジェクトによって CatalogPart コントロールを表示するために使用される Style オブジェクトを作成します。

実装時の注意 CatalogPartChrome クラスから継承した場合は、CreateCatalogPartChromeStyle メソッドをオーバーライドすることもできます。また、基本メソッドのスタイル情報と、追加するカスタム スタイル属性をマージすることもできます。この例については「例」を参照してください。

使用例使用例

CreateCatalogPartChromeStyle メソッドをオーバーライドして、カタログ パーツ コントロールの背景色を変更する方法を次のコード例に示します。これらのコントロールをホストする Web ページなど、この例の実行に必要なコード全体については、CatalogPartChrome クラスの概要の「使用例」を参照してください。

Protected Overrides Function
 CreateCatalogPartChromeStyle(ByVal catalogPart As
 System.Web.UI.WebControls.WebParts.CatalogPart, ByVal chromeType As System.Web.UI.WebControls.WebParts.PartChromeType) As
 System.Web.UI.WebControls.Style
    Dim editorStyle As Style
    editorStyle = MyBase.CreateCatalogPartChromeStyle(catalogPart,
 chromeType)
    editorStyle.BackColor = Drawing.Color.Bisque
    Return editorStyle
End Function
protected override Style  CreateCatalogPartChromeStyle(CatalogPart
 catalogPart, PartChromeType chromeType)
{
    Style catalogStyle = base.CreateCatalogPartChromeStyle(catalogPart,
 chromeType);
    catalogStyle.BackColor = Color.Bisque;
    return catalogStyle;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CatalogPartChrome クラス
CatalogPartChrome メンバ
System.Web.UI.WebControls.WebParts 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

CatalogPartChrome.CreateCatalogPartChromeStyle メソッドのお隣キーワード
検索ランキング

   

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



CatalogPartChrome.CreateCatalogPartChromeStyle メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS