RichTextBox 생성자

정의

RichTextBox 클래스의 새 인스턴스를 초기화합니다.

오버로드

RichTextBox()

RichTextBox 클래스의 새 기본 인스턴스를 초기화합니다.

RichTextBox(FlowDocument)

지정된 RichTextBox를 초기 콘텐츠로 추가하여 FlowDocument 클래스의 새 인스턴스를 초기화합니다.

RichTextBox()

RichTextBox 클래스의 새 기본 인스턴스를 초기화합니다.

public:
 RichTextBox();
public RichTextBox ();
Public Sub New ()

설명

이 생성자는 Document 속성과 연결된 빈 FlowDocument 항목을 만듭니다. 특히 이 빈 FlowDocument에는 텍스트를 포함하지 않는 단일 Paragraph이 들어 있는 단일 Run가 포함됩니다.

적용 대상

RichTextBox(FlowDocument)

지정된 RichTextBox를 초기 콘텐츠로 추가하여 FlowDocument 클래스의 새 인스턴스를 초기화합니다.

public:
 RichTextBox(System::Windows::Documents::FlowDocument ^ document);
public RichTextBox (System.Windows.Documents.FlowDocument document);
new System.Windows.Controls.RichTextBox : System.Windows.Documents.FlowDocument -> System.Windows.Controls.RichTextBox
Public Sub New (document As FlowDocument)

매개 변수

document
FlowDocument

FlowDocument의 초기 콘텐츠로 추가할 RichTextBox입니다.

예제

다음 예제에서는 이 생성자의 사용을 보여 줍니다.

// Create a simple FlowDocument to serve as the content input for the construtor.
FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("Simple FlowDocument")));
// After this constructor is called, the new RichTextBox rtb will contain flowDoc.
RichTextBox rtb = new RichTextBox(flowDoc);
' Create a simple FlowDocument to serve as the content input for the construtor.
Dim flowDoc As New FlowDocument(New Paragraph(New Run("Simple FlowDocument")))
' After this constructor is called, the new RichTextBox rtb will contain flowDoc.
Dim rtb As New RichTextBox(flowDoc)

적용 대상