Share via


Run Oluşturucular

Tanım

Run sınıfının yeni bir örneğini başlatır.

Aşırı Yüklemeler

Run()

Sınıfının yeni, varsayılan bir örneğini Run başlatır.

Run(String)

Metin çalıştırmasının ilk içeriği olarak belirtilen dizeyi Run alarak sınıfının yeni bir örneğini başlatır.

Run(String, TextPointer)

Sınıfın Run yeni bir örneğini başlatır, metin çalıştırmasının ilk içeriği olarak belirtilen bir dizeyi alır ve TextPointer metin çalıştırması için ekleme konumunu belirtir.

Run()

Sınıfının yeni, varsayılan bir örneğini Run başlatır.

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

Şunlara uygulanır

Run(String)

Metin çalıştırmasının ilk içeriği olarak belirtilen dizeyi Run alarak sınıfının yeni bir örneğini başlatır.

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)

Parametreler

text
String

Nesnenin ilk içeriğini Run belirten bir dize.

Örnekler

Aşağıdaki örnekte bu oluşturucunun kullanımı gösterilmektedir.

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

Şunlara uygulanır

Run(String, TextPointer)

Sınıfın Run yeni bir örneğini başlatır, metin çalıştırmasının ilk içeriği olarak belirtilen bir dizeyi alır ve TextPointer metin çalıştırması için ekleme konumunu belirtir.

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)

Parametreler

text
String

Nesnenin ilk içeriğini Run belirten bir dize.

insertionPosition
TextPointer

Metin TextPointer oluşturulduktan null sonra ekleneceğini veya otomatik ekleme yapılmayacağını belirten bir ekleme konumu.

Örnekler

Aşağıdaki örnekte bu oluşturucunun kullanımı gösterilmektedir.

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

Şunlara uygulanır