Run Construtores

Definição

Inicializa uma nova instância da classe Run.

Sobrecargas

Nome Description
Run()

Inicializa uma nova instância padrão da Run classe.

Run(String)

Inicializa uma nova instância da Run classe, tomando uma cadeia de caracteres especificada como o conteúdo inicial da execução de texto.

Run(String, TextPointer)

Inicializa uma nova instância da Run classe, tomando uma cadeia de caracteres especificada como o conteúdo inicial da execução de texto e especificando uma TextPointer posição de inserção para a execução de texto.

Run()

Inicializa uma nova instância padrão da Run classe.

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

Aplica-se a

Run(String)

Inicializa uma nova instância da Run classe, tomando uma cadeia de caracteres especificada como o conteúdo inicial da execução de texto.

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)

Parâmetros

text
String

Uma cadeia de caracteres que especifica o conteúdo inicial do Run objeto.

Exemplos

O exemplo a seguir demonstra o uso desse construtor.

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

Aplica-se a

Run(String, TextPointer)

Inicializa uma nova instância da Run classe, tomando uma cadeia de caracteres especificada como o conteúdo inicial da execução de texto e especificando uma TextPointer posição de inserção para a execução de texto.

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)

Parâmetros

text
String

Uma cadeia de caracteres que especifica o conteúdo inicial do Run objeto.

insertionPosition
TextPointer

Uma TextPointer especificação de uma posição de inserção na qual inserir a execução de texto após a criação ou null para nenhuma inserção automática.

Exemplos

O exemplo a seguir demonstra o uso desse construtor.

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

Aplica-se a