RichTextBox 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
RichTextBox 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| RichTextBox() |
클래스의 새 기본 인스턴스를 초기화합니다 RichTextBox . |
| RichTextBox(FlowDocument) |
클래스의 새 인스턴스를 RichTextBox 초기화하여 초기 콘텐츠로 지정된 FlowDocument 인스턴스를 추가합니다. |
RichTextBox()
클래스의 새 기본 인스턴스를 초기화합니다 RichTextBox .
public:
RichTextBox();
public RichTextBox();
Public Sub New ()
설명
이 생성자는 Document 속성과 연결된 빈 FlowDocument 항목을 만듭니다. 특히 빈 FlowDocument 항목에는 텍스트가 없는 단일 항목이 포함된 단일 ParagraphRun 항목이 포함됩니다.
적용 대상
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콘텐츠의 초기 콘텐츠로 추가할 A 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)