Run Constructores
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Inicializa una nueva instancia de la clase Run.
Sobrecargas
| Nombre | Description |
|---|---|
| Run() |
Inicializa una nueva instancia predeterminada de la Run clase . |
| Run(String) |
Inicializa una nueva instancia de la Run clase , tomando una cadena especificada como el contenido inicial de la ejecución de texto. |
| Run(String, TextPointer) |
Inicializa una nueva instancia de la Run clase , tomando una cadena especificada como el contenido inicial de la ejecución de texto y una especificación de una TextPointer posición de inserción para la ejecución de texto. |
Run()
Inicializa una nueva instancia predeterminada de la Run clase .
public:
Run();
public Run();
Public Sub New ()
Se aplica a
Run(String)
Inicializa una nueva instancia de la Run clase , tomando una cadena especificada como el 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
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 Run clase , tomando una cadena especificada como el contenido inicial de la ejecución de texto y una especificación de una TextPointer 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
- insertionPosition
- TextPointer
Que TextPointer especifica una posición de inserción en la que se va a insertar el texto después de crearlo, o null para ninguna 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)