Run 생성자

정의

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

오버로드

Name Description
Run()

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

Run(String)

지정된 문자열을 텍스트 실행의 Run 초기 내용으로 사용하여 클래스의 새 인스턴스를 초기화합니다.

Run(String, TextPointer)

지정된 문자열을 텍스트 실행의 Run 초기 내용으로 사용하고 텍스트 실행에 TextPointer 대한 삽입 위치를 지정하여 클래스의 새 인스턴스를 초기화합니다.

Run()

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

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

적용 대상

Run(String)

지정된 문자열을 텍스트 실행의 Run 초기 내용으로 사용하여 클래스의 새 인스턴스를 초기화합니다.

public:
 Run(System::String ^ text);
public Run(string text);
new System.Windows.Documents.Run : string -> System.Windows.Documents.Run
Public Sub New (text As String)

매개 변수

text
String

개체의 Run 초기 내용을 지정하는 문자열입니다.

예제

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

Run textRun = new Run("The text contents of this text run.");
Dim textRun As New Run("The text contents of this text run.")

적용 대상

Run(String, TextPointer)

지정된 문자열을 텍스트 실행의 Run 초기 내용으로 사용하고 텍스트 실행에 TextPointer 대한 삽입 위치를 지정하여 클래스의 새 인스턴스를 초기화합니다.

public:
 Run(System::String ^ text, System::Windows::Documents::TextPointer ^ insertionPosition);
public Run(string text, System.Windows.Documents.TextPointer insertionPosition);
new System.Windows.Documents.Run : string * System.Windows.Documents.TextPointer -> System.Windows.Documents.Run
Public Sub New (text As String, insertionPosition As TextPointer)

매개 변수

text
String

개체의 Run 초기 내용을 지정하는 문자열입니다.

insertionPosition
TextPointer

TextPointer 텍스트를 만든 후 또는 null 자동 삽입 없이 삽입할 삽입 위치를 지정하는 것입니다.

예제

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

// Create a new, empty paragraph to host the text run.
Paragraph par = new Paragraph();

// Get a TextPointer for the end of content in the paragraph.
TextPointer insertionPoint = par.ContentEnd;

// This line will create a new text run, initialize it with the supplied string,
// and insert it at the specified insertion point (which happens to be the end of
// content for the host paragraph).
Run textRun = new Run("The text contents of this text run.", insertionPoint);
    ' Create a new, empty paragraph to host the text run.
    Dim par As New Paragraph()

    ' Get a TextPointer for the end of content in the paragraph.
    Dim insertionPoint As TextPointer = par.ContentEnd

    ' This line will create a new text run, initialize it with the supplied string,
    ' and insert it at the specified insertion point (which happens to be the end of
    ' content for the host paragraph).
Dim textRun2 As New Run("The text contents of this text run.", insertionPoint)

적용 대상