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

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

EditorPartChrome.CreateEditorPartChromeStyle メソッド

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

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

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

Protected Overridable Function
 CreateEditorPartChromeStyle ( _
    editorPart As EditorPart, _
    chromeType As PartChromeType _
) As Style
Dim editorPart As EditorPart
Dim chromeType As PartChromeType
Dim returnValue As Style

returnValue = Me.CreateEditorPartChromeStyle(editorPart, chromeType)
protected virtual Style CreateEditorPartChromeStyle (
    EditorPart editorPart,
    PartChromeType chromeType
)
protected:
virtual Style^ CreateEditorPartChromeStyle (
    EditorPart^ editorPart, 
    PartChromeType chromeType
)
protected Style CreateEditorPartChromeStyle (
    EditorPart editorPart, 
    PartChromeType chromeType
)
protected function CreateEditorPartChromeStyle
 (
    editorPart : EditorPart, 
    chromeType : PartChromeType
) : Style

パラメータ

editorPart

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

chromeType

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

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

例外例外
例外の種類条件

ArgumentNullException

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

ArgumentOutOfRangeException

chromeType が PartChromeType ではありません。

解説解説

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

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

使用例使用例

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

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



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



EditorPartChrome.CreateEditorPartChromeStyle メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS