다음을 통해 공유


IWebEditable.WebBrowsableObject 속성

정의

WebPart 컨트롤에서 편집될 EditorPart 컨트롤, 사용자 정의 컨트롤 또는 사용자 지정 컨트롤에 대한 참조를 가져옵니다.

public:
 property System::Object ^ WebBrowsableObject { System::Object ^ get(); };
public object WebBrowsableObject { get; }
member this.WebBrowsableObject : obj
Public ReadOnly Property WebBrowsableObject As Object

속성 값

Object

EditorPart 컨트롤과 연결된 컨트롤에 대한 개체 참조입니다.

예제

다음 코드 예제에서는 사용자 지정 WebPart 컨트롤에서 속성을 재정의 WebBrowsableObject 할 수 있는 방법을 보여 줍니다. 예제를 실행하는 데 필요한 전체 소스 코드는 클래스 개요 항목의 예제 섹션에 IWebEditable 있습니다.

코드 예제에서는 인터페이스의 두 멤버를 재정의합니다 IWebEditable .

public override EditorPartCollection CreateEditorParts()
{
  ArrayList editorArray = new ArrayList();
  TextDisplayEditorPart edPart = new TextDisplayEditorPart();
  edPart.ID = this.ID + "_editorPart1";
  editorArray.Add(edPart);
  EditorPartCollection editorParts = 
    new EditorPartCollection(editorArray);
  return editorParts;
}

public override object WebBrowsableObject
{
  get { return this; }
}
Public Overrides Function CreateEditorParts() _
                            As EditorPartCollection
  Dim editorArray As New ArrayList()
  Dim edPart as New TextDisplayEditorPart()
  edPart.ID = Me.ID & "_editorPart1"
  editorArray.Add(edPart)
  Dim editorParts As New EditorPartCollection(editorArray)
  Return editorParts

End Function

Public Overrides ReadOnly Property WebBrowsableObject() _
                                    As Object
  Get
    Return Me
  End Get
End Property

설명

이 속성은 WebBrowsableObject 컨트롤이 연결된 서버 컨트롤에 대한 참조를 가져오는 방법을 EditorPart 제공합니다.

속성 자체는 읽기 전용이지만 반환하는 개체 참조를 사용하면 컨트롤이 서버 컨트롤의 값을 변경할 수 있습니다 EditorPart .

구현자 참고

일반적으로 서버 컨트롤에서 WebBrowsableObject 속성을 구현할 때 서버 컨트롤 자체에 대한 참조를 반환하기만 하면 됩니다. 클래스의 GenericWebPart 경우 컨트롤로 WebPart 작동할 수 있도록 자식 컨트롤을 래핑하기 때문에 속성의 WebBrowsableObject 구현은 자식 컨트롤에 대한 참조를 반환합니다.

적용 대상

추가 정보