FormattedText Construtores

Definição

Inicializa uma nova instância da FormattedText classe.

Sobrecargas

Name Description
FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush)
Obsoleto.

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte e pincel.

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, Double)

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel de primeiro plano e valor pixelsPerDip.

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution)
Obsoleto.

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção de fluxo, tipografia, tamanho da fonte, pincel e comportamento de substituição numérica.

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, Double)

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel de primeiro plano, comportamento de substituição numérica e valor pixelsPerDip.

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode)
Obsoleto.

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel, comportamento de substituição numérica e modo de formatação de texto.

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode, Double)

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel de primeiro plano, comportamento de substituição numérica e valor pixelsPerDip.

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush)

Atenção

Use the PixelsPerDip override

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte e pincel.

public:
 FormattedText(System::String ^ textToFormat, System::Globalization::CultureInfo ^ culture, System::Windows::FlowDirection flowDirection, System::Windows::Media::Typeface ^ typeface, double emSize, System::Windows::Media::Brush ^ foreground);
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground);
[System.Obsolete("Use the PixelsPerDip override", false)]
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground);
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush -> System.Windows.Media.FormattedText
[<System.Obsolete("Use the PixelsPerDip override", false)>]
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush -> System.Windows.Media.FormattedText
Public Sub New (textToFormat As String, culture As CultureInfo, flowDirection As FlowDirection, typeface As Typeface, emSize As Double, foreground As Brush)

Parâmetros

textToFormat
String

O texto a ser exibido.

culture
CultureInfo

A cultura específica do texto.

flowDirection
FlowDirection

A direção em que o texto é lido.

typeface
Typeface

A família de fontes, o peso, o estilo e o alongamento do texto devem ser formatados.

emSize
Double

O tamanho da fonte em que o texto deve ser formatado.

foreground
Brush

O pincel usado para pintar cada glifo.

Atributos

Aplica-se a

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, Double)

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel de primeiro plano e valor pixelsPerDip.

public:
 FormattedText(System::String ^ textToFormat, System::Globalization::CultureInfo ^ culture, System::Windows::FlowDirection flowDirection, System::Windows::Media::Typeface ^ typeface, double emSize, System::Windows::Media::Brush ^ foreground, double pixelsPerDip);
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground, double pixelsPerDip);
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush * double -> System.Windows.Media.FormattedText
Public Sub New (textToFormat As String, culture As CultureInfo, flowDirection As FlowDirection, typeface As Typeface, emSize As Double, foreground As Brush, pixelsPerDip As Double)

Parâmetros

textToFormat
String

O texto a ser exibido.

culture
CultureInfo

A cultura específica do texto.

flowDirection
FlowDirection

A direção em que o texto é lido.

typeface
Typeface

A família de fontes, o peso, o estilo e o alongamento do texto devem ser formatados.

emSize
Double

O tamanho da fonte para a medida em do texto, fornecido em unidades independentes do dispositivo (1/96 de polegada por unidade).

foreground
Brush

O pincel usado para pintar cada glifo.

pixelsPerDip
Double

O valor de Pixels Por Pixel Independente de Densidade, que equivale ao fator de escala. Por exemplo, se o DPI de um ecrã for 120 (ou 1,25 porque 120/96 = 1,25), desenha-se 1,25 píxel por píxel independente da densidade. DIP é a unidade de medida usada pelo WPF para ser independente da resolução do dispositivo e dos DPIs.

Aplica-se a

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution)

Atenção

Use the PixelsPerDip override

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção de fluxo, tipografia, tamanho da fonte, pincel e comportamento de substituição numérica.

public:
 FormattedText(System::String ^ textToFormat, System::Globalization::CultureInfo ^ culture, System::Windows::FlowDirection flowDirection, System::Windows::Media::Typeface ^ typeface, double emSize, System::Windows::Media::Brush ^ foreground, System::Windows::Media::NumberSubstitution ^ numberSubstitution);
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground, System.Windows.Media.NumberSubstitution numberSubstitution);
[System.Obsolete("Use the PixelsPerDip override", false)]
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground, System.Windows.Media.NumberSubstitution numberSubstitution);
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush * System.Windows.Media.NumberSubstitution -> System.Windows.Media.FormattedText
[<System.Obsolete("Use the PixelsPerDip override", false)>]
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush * System.Windows.Media.NumberSubstitution -> System.Windows.Media.FormattedText
Public Sub New (textToFormat As String, culture As CultureInfo, flowDirection As FlowDirection, typeface As Typeface, emSize As Double, foreground As Brush, numberSubstitution As NumberSubstitution)

Parâmetros

textToFormat
String

O texto a ser exibido.

culture
CultureInfo

A cultura específica do texto.

flowDirection
FlowDirection

A direção em que o texto é lido.

typeface
Typeface

A família de fontes, o peso, o estilo e o alongamento do texto devem ser formatados.

emSize
Double

O tamanho da fonte para a medida em do texto, fornecido em unidades independentes do dispositivo (1/96 de polegada por unidade).

foreground
Brush

O pincel usado para pintar cada glifo.

numberSubstitution
NumberSubstitution

O comportamento de substituição numérica a aplicar ao texto.

Atributos

Aplica-se a

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, Double)

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel de primeiro plano, comportamento de substituição numérica e valor pixelsPerDip.

public:
 FormattedText(System::String ^ textToFormat, System::Globalization::CultureInfo ^ culture, System::Windows::FlowDirection flowDirection, System::Windows::Media::Typeface ^ typeface, double emSize, System::Windows::Media::Brush ^ foreground, System::Windows::Media::NumberSubstitution ^ numberSubstitution, double pixelsPerDip);
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground, System.Windows.Media.NumberSubstitution numberSubstitution, double pixelsPerDip);
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush * System.Windows.Media.NumberSubstitution * double -> System.Windows.Media.FormattedText
Public Sub New (textToFormat As String, culture As CultureInfo, flowDirection As FlowDirection, typeface As Typeface, emSize As Double, foreground As Brush, numberSubstitution As NumberSubstitution, pixelsPerDip As Double)

Parâmetros

textToFormat
String

O texto a ser exibido.

culture
CultureInfo

A cultura específica do texto.

flowDirection
FlowDirection

A direção em que o texto é lido.

typeface
Typeface

A família de fontes, o peso, o estilo e o alongamento do texto devem ser formatados.

emSize
Double

O tamanho da fonte para a medida em do texto, fornecido em unidades independentes do dispositivo (1/96 de polegada por unidade).

foreground
Brush

O pincel usado para pintar cada glifo.

numberSubstitution
NumberSubstitution

Especifica como os números no texto são apresentados, com base em NumberSubstitution. Este valor pode ser null.

pixelsPerDip
Double

O valor de Pixels Por Pixel Independente de Densidade, que equivale ao fator de escala. Por exemplo, se o DPI de um ecrã for 120 (ou 1,25 porque 120/96 = 1,25), desenha-se 1,25 píxel por píxel independente da densidade. DIP é a unidade de medida usada pelo WPF para ser independente da resolução do dispositivo e dos DPIs.

Aplica-se a

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode)

Atenção

Use the PixelsPerDip override

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel, comportamento de substituição numérica e modo de formatação de texto.

public:
 FormattedText(System::String ^ textToFormat, System::Globalization::CultureInfo ^ culture, System::Windows::FlowDirection flowDirection, System::Windows::Media::Typeface ^ typeface, double emSize, System::Windows::Media::Brush ^ foreground, System::Windows::Media::NumberSubstitution ^ numberSubstitution, System::Windows::Media::TextFormattingMode textFormattingMode);
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground, System.Windows.Media.NumberSubstitution numberSubstitution, System.Windows.Media.TextFormattingMode textFormattingMode);
[System.Obsolete("Use the PixelsPerDip override", false)]
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground, System.Windows.Media.NumberSubstitution numberSubstitution, System.Windows.Media.TextFormattingMode textFormattingMode);
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush * System.Windows.Media.NumberSubstitution * System.Windows.Media.TextFormattingMode -> System.Windows.Media.FormattedText
[<System.Obsolete("Use the PixelsPerDip override", false)>]
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush * System.Windows.Media.NumberSubstitution * System.Windows.Media.TextFormattingMode -> System.Windows.Media.FormattedText
Public Sub New (textToFormat As String, culture As CultureInfo, flowDirection As FlowDirection, typeface As Typeface, emSize As Double, foreground As Brush, numberSubstitution As NumberSubstitution, textFormattingMode As TextFormattingMode)

Parâmetros

textToFormat
String

O texto a ser exibido.

culture
CultureInfo

A cultura específica do texto.

flowDirection
FlowDirection

A direção em que o texto é lido.

typeface
Typeface

A família de fontes, o peso, o estilo e o alongamento do texto devem ser formatados.

emSize
Double

O tamanho da fonte para a medida em do texto, fornecido em unidades independentes do dispositivo (1/96 de polegada por unidade).

foreground
Brush

O pincel usado para pintar cada glifo.

numberSubstitution
NumberSubstitution

O comportamento de substituição numérica a aplicar ao texto.

textFormattingMode
TextFormattingMode

O TextFormattingMode para aplicar ao texto.

Atributos

Aplica-se a

FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode, Double)

Inicializa uma nova instância da FormattedText classe com o texto especificado, cultura, direção do fluxo, tipografia, tamanho da fonte, pincel de primeiro plano, comportamento de substituição numérica e valor pixelsPerDip.

public:
 FormattedText(System::String ^ textToFormat, System::Globalization::CultureInfo ^ culture, System::Windows::FlowDirection flowDirection, System::Windows::Media::Typeface ^ typeface, double emSize, System::Windows::Media::Brush ^ foreground, System::Windows::Media::NumberSubstitution ^ numberSubstitution, System::Windows::Media::TextFormattingMode textFormattingMode, double pixelsPerDip);
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground, System.Windows.Media.NumberSubstitution numberSubstitution, System.Windows.Media.TextFormattingMode textFormattingMode, double pixelsPerDip);
new System.Windows.Media.FormattedText : string * System.Globalization.CultureInfo * System.Windows.FlowDirection * System.Windows.Media.Typeface * double * System.Windows.Media.Brush * System.Windows.Media.NumberSubstitution * System.Windows.Media.TextFormattingMode * double -> System.Windows.Media.FormattedText
Public Sub New (textToFormat As String, culture As CultureInfo, flowDirection As FlowDirection, typeface As Typeface, emSize As Double, foreground As Brush, numberSubstitution As NumberSubstitution, textFormattingMode As TextFormattingMode, pixelsPerDip As Double)

Parâmetros

textToFormat
String

O texto a ser exibido.

culture
CultureInfo

A cultura específica do texto.

flowDirection
FlowDirection

A direção em que o texto é lido.

typeface
Typeface

A família de fontes, o peso, o estilo e o alongamento do texto devem ser formatados.

emSize
Double

O tamanho da fonte para a medida em do texto, fornecido em unidades independentes do dispositivo (1/96 de polegada por unidade).

foreground
Brush

O pincel era usado para pintar cada glifo.

numberSubstitution
NumberSubstitution

Especifica como os números no texto são apresentados, com base em NumberSubstitution. Este valor pode ser null.

textFormattingMode
TextFormattingMode

O modo de formatação que afeta a forma como o WPF apresenta texto.

pixelsPerDip
Double

O valor de Pixels Por Pixel Independente de Densidade, que equivale ao fator de escala. Por exemplo, se o DPI de um ecrã for 120 (ou 1,25 porque 120/96 = 1,25), desenha-se 1,25 píxel por píxel independente da densidade. DIP é a unidade de medida usada pelo WPF para ser independente da resolução do dispositivo e dos DPIs.

Aplica-se a