Run Constructores

Definición

Inicializa una nueva instancia de la clase Run.

Sobrecargas

Run()

Inicializa una nueva instancia predeterminada de la clase Run.

Run(String)

Inicializa una nueva instancia de la clase Run, tomando una cadena especificada como contenido inicial de la ejecución de texto.

Run(String, TextPointer)

Inicializa una nueva instancia de la clase Run, tomando una cadena especificada como contenido inicial de la ejecución de texto y un TextPointer que especifica una posición de inserción para la ejecución de texto.

Run()

Inicializa una nueva instancia predeterminada de la clase Run.

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

Se aplica a

Run(String)

Inicializa una nueva instancia de la clase Run, tomando una cadena especificada como contenido inicial de la ejecución 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

Cadena que especifica el contenido inicial del objeto Run.

Ejemplos

En el ejemplo siguiente se muestra el uso de este constructor.

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

Se aplica a

Run(String, TextPointer)

Inicializa una nueva instancia de la clase Run, tomando una cadena especificada como contenido inicial de la ejecución de texto y un TextPointer que especifica una posición de inserción para la ejecución 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

Cadena que especifica el contenido inicial del objeto Run.

insertionPosition
TextPointer

TextPointer que especifica una posición de inserción en la que insertar la ejecución de texto una vez creada o null para que no haya inserción automática.

Ejemplos

En el ejemplo siguiente se muestra el uso de este constructor.

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

Se aplica a