RichTextBox コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
RichTextBox クラスの新しいインスタンスを初期化します。
オーバーロード
| 名前 | 説明 |
|---|---|
| RichTextBox() |
RichTextBox クラスの新しい既定のインスタンスを初期化します。 |
| RichTextBox(FlowDocument) |
指定したRichTextBoxを初期コンテンツとして追加して、FlowDocument クラスの新しいインスタンスを初期化します。 |
RichTextBox()
RichTextBox クラスの新しい既定のインスタンスを初期化します。
public:
RichTextBox();
public RichTextBox();
Public Sub New ()
注釈
このコンストラクターは、Document プロパティに関連付けられた空の FlowDocument を作成します。 具体的には、空のFlowDocumentには、テキストを含まない単一のParagraphを含む 1 つの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)