EditorPartChrome.CreateEditorPartChromeStyle 메서드

정의

개체에서 렌더링하는 각 EditorPart 컨트롤에 대한 스타일 특성을 제공하는 스타일 개체를 EditorPartChrome 만듭니다.

protected:
 virtual System::Web::UI::WebControls::Style ^ CreateEditorPartChromeStyle(System::Web::UI::WebControls::WebParts::EditorPart ^ editorPart, System::Web::UI::WebControls::WebParts::PartChromeType chromeType);
protected virtual System.Web.UI.WebControls.Style CreateEditorPartChromeStyle(System.Web.UI.WebControls.WebParts.EditorPart editorPart, System.Web.UI.WebControls.WebParts.PartChromeType chromeType);
abstract member CreateEditorPartChromeStyle : System.Web.UI.WebControls.WebParts.EditorPart * System.Web.UI.WebControls.WebParts.PartChromeType -> System.Web.UI.WebControls.Style
override this.CreateEditorPartChromeStyle : System.Web.UI.WebControls.WebParts.EditorPart * System.Web.UI.WebControls.WebParts.PartChromeType -> System.Web.UI.WebControls.Style
Protected Overridable Function CreateEditorPartChromeStyle (editorPart As EditorPart, chromeType As PartChromeType) As Style

매개 변수

editorPart
EditorPart

현재 렌더링 중인 컨트롤입니다.

chromeType
PartChromeType

특정 컨트롤의 크롬 유형입니다. 열거형 값 중 PartChromeType 하나입니다.

반품

에 대한 Style스타일 특성을 포함하는 A editorPart 입니다.

예외

참조하는 editorPart 컨트롤은 .입니다 null.

chromeType 가 아닙니다 PartChromeType.

예제

다음 코드 예제에서는 편집기 파트 컨트롤의 배경색을 변경 하는 메서드를 재정 CreateEditorPartChromeStyle 의 하는 방법을 보여 줍니다. 이러한 컨트롤을 호스트하는 웹 페이지를 포함하여 예제를 실행하는 데 필요한 전체 코드는 클래스 개요의 예제 섹션을 EditorPartChrome 참조하세요.

protected override Style CreateEditorPartChromeStyle(EditorPart editorPart, PartChromeType chromeType)
{
    Style editorStyle = base.CreateEditorPartChromeStyle(editorPart, chromeType);
    editorStyle.BackColor = Color.Bisque;
    return editorStyle;
}
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

설명

메서드는 CreateEditorPartChromeStyle 컨트롤을 Style 렌더링 하는 개체에 EditorPartChrome 의해 사용 되는 개체를 EditorPart 만듭니다.

상속자 참고

클래스에서 상속하는 경우 필요에 따라 메서드를 재정의 EditorPartChromeCreateEditorPartChromeStyle(EditorPart, PartChromeType) 하고 기본 메서드의 스타일 정보를 추가하려는 사용자 지정 스타일 특성과 병합할 수 있습니다. 데모는 예제 섹션을 참조하세요.

적용 대상