FormattedText FormattedText FormattedText Constructors

Definition

Overloads

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, and brush.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, foreground brush, and pixelsPerDip value.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, brush, and number substitution behavior.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, foreground brush, number substitution behavior, and pixelsPerDip value.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, brush, number substitution behavior, and text formatting mode.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, foreground brush, number substitution behavior, and pixelsPerDip value.

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

Warning

This API is now obsolete.

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, and brush.

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.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

Parameters

textToFormat
String String String

The text to be displayed.

culture
CultureInfo CultureInfo CultureInfo

The specific culture of the text.

flowDirection
FlowDirection FlowDirection FlowDirection

The direction the text is read.

typeface
Typeface Typeface Typeface

The font family, weight, style and stretch the text should be formatted with.

emSize
Double Double Double

The font size the text should be formatted at.

foreground
Brush Brush Brush

The brush used to paint the each glyph.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, foreground brush, and pixelsPerDip value.

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

Parameters

textToFormat
String String String

The text to be displayed.

culture
CultureInfo CultureInfo CultureInfo

The specific culture of the text.

flowDirection
FlowDirection FlowDirection FlowDirection

The direction the text is read.

typeface
Typeface Typeface Typeface

The font family, weight, style and stretch the text should be formatted with.

emSize
Double Double Double

The font size for the text's em measure, provided in device-independent units (1/96th inch per unit).

foreground
Brush Brush Brush

The brush used to paint the each glyph.

pixelsPerDip
Double Double Double

The Pixels Per Density Independent Pixel value, which is the equivalent of the scale factor. For example, if the DPI of a screen is 120 (or 1.25 because 120/96 = 1.25) , 1.25 pixel per density independent pixel is drawn. DIP is the unit of measurement used by WPF to be independent of device resolution and DPIs.

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

Warning

This API is now obsolete.

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, brush, and number substitution behavior.

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.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

Parameters

textToFormat
String String String

The text to be displayed.

culture
CultureInfo CultureInfo CultureInfo

The specific culture of the text.

flowDirection
FlowDirection FlowDirection FlowDirection

The direction the text is read.

typeface
Typeface Typeface Typeface

The font family, weight, style and stretch the text should be formatted with.

emSize
Double Double Double

The font size for the text's em measure, provided in device-independent units (1/96th inch per unit).

foreground
Brush Brush Brush

The brush used to paint the each glyph.

numberSubstitution
NumberSubstitution NumberSubstitution NumberSubstitution

The number substitution behavior to apply to the text.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, foreground brush, number substitution behavior, and pixelsPerDip value.

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

Parameters

textToFormat
String String String

The text to display.

culture
CultureInfo CultureInfo CultureInfo

The specific culture of the text.

flowDirection
FlowDirection FlowDirection FlowDirection

The direction the text is read.

typeface
Typeface Typeface Typeface

The font family, weight, style and stretch the text should be formatted with.

emSize
Double Double Double

The font size for the text's em measure, provided in device-independent units (1/96th inch per unit).

foreground
Brush Brush Brush

The brush used to paint the each glyph.

numberSubstitution
NumberSubstitution NumberSubstitution NumberSubstitution

Specifies how numbers in text are displayed, based on NumberSubstitution. This value can be null.

pixelsPerDip
Double Double Double

The Pixels Per Density Independent Pixel value, which is the equivalent of the scale factor. For example, if the DPI of a screen is 120 (or 1.25 because 120/96 = 1.25) , 1.25 pixel per density independent pixel is drawn. DIP is the unit of measurement used by WPF to be independent of device resolution and DPIs.

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

Warning

This API is now obsolete.

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, brush, number substitution behavior, and text formatting mode.

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);
[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

Parameters

textToFormat
String String String

The text to be displayed.

culture
CultureInfo CultureInfo CultureInfo

The specific culture of the text.

flowDirection
FlowDirection FlowDirection FlowDirection

The direction the text is read.

typeface
Typeface Typeface Typeface

The font family, weight, style and stretch the text should be formatted with.

emSize
Double Double Double

The font size for the text's em measure, provided in device-independent units (1/96th inch per unit).

foreground
Brush Brush Brush

The brush used to paint the each glyph.

numberSubstitution
NumberSubstitution NumberSubstitution NumberSubstitution

The number substitution behavior to apply to the text.

textFormattingMode
TextFormattingMode TextFormattingMode TextFormattingMode

The TextFormattingMode to apply to the text.

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

Initializes a new instance of the FormattedText class with the specified text, culture, flow direction, typeface, font size, foreground brush, number substitution behavior, and pixelsPerDip value.

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

Parameters

textToFormat
String String String

The text to display.

culture
CultureInfo CultureInfo CultureInfo

The specific culture of the text.

flowDirection
FlowDirection FlowDirection FlowDirection

The direction the text is read.

typeface
Typeface Typeface Typeface

The font family, weight, style and stretch the text should be formatted with.

emSize
Double Double Double

The font size for the text's em measure, provided in device-independent units (1/96th inch per unit).

foreground
Brush Brush Brush

he brush used to paint the each glyph.

numberSubstitution
NumberSubstitution NumberSubstitution NumberSubstitution

Specifies how numbers in text are displayed, based on NumberSubstitution. This value can be null.

textFormattingMode
TextFormattingMode TextFormattingMode TextFormattingMode

The formatting mode that affects how WPF displays text.

pixelsPerDip
Double Double Double

The Pixels Per Density Independent Pixel value, which is the equivalent of the scale factor. For example, if the DPI of a screen is 120 (or 1.25 because 120/96 = 1.25) , 1.25 pixel per density independent pixel is drawn. DIP is the unit of measurement used by WPF to be independent of device resolution and DPIs.

Applies to