Run Construtores
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da Run classe.
Sobrecargas
| Name | Descrição |
|---|---|
| Run() |
Inicializa uma nova instância padrão da Run classe. |
| Run(String) |
Inicializa uma nova instância da Run classe, tomando uma string especificada como conteúdo inicial da execução do texto. |
| Run(String, TextPointer) |
Inicializa uma nova instância da Run classe, tomando uma string especificada como conteúdo inicial da execução de texto, e TextPointer especificando uma posição de inserção para a execução do 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 string especificada como conteúdo inicial da execução do 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
Exemplos
O exemplo seguinte demonstra a utilização deste 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 string especificada como conteúdo inicial da execução de texto, e TextPointer especificando uma posição de inserção para a execução do 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
A TextPointer especificação de uma posição de inserção para inserir o texto é executada após a sua criação, ou null para não haver inserção automática.
Exemplos
O exemplo seguinte demonstra a utilização deste 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)