RichTextBox Constructors

Definitie

Initialiseert een nieuw exemplaar van de RichTextBox klasse.

Overloads

Name Description
RichTextBox()

Initialiseert een nieuw, standaardexemplaren van de RichTextBox klasse.

RichTextBox(FlowDocument)

Initialiseert een nieuw exemplaar van de RichTextBox klasse, waarbij een opgegeven als de eerste inhoud wordt toegevoegd FlowDocument .

RichTextBox()

Initialiseert een nieuw, standaardexemplaren van de RichTextBox klasse.

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

Opmerkingen

Met deze constructor wordt een lege FlowDocument waarde gemaakt die is gekoppeld aan de eigenschap Document. Met name de lege FlowDocument bevat één Paragraph, die één Run bevat die geen tekst bevat.

Van toepassing op

RichTextBox(FlowDocument)

Initialiseert een nieuw exemplaar van de RichTextBox klasse, waarbij een opgegeven als de eerste inhoud wordt toegevoegd 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)

Parameters

document
FlowDocument

Een FlowDocument die moet worden toegevoegd als de eerste inhoud van de nieuwe RichTextBox.

Voorbeelden

Het volgende voorbeeld illustreert het gebruik van deze constructor.

// 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)

Van toepassing op