Ανάγνωση στα Αγγλικά Επεξεργασία

Κοινή χρήση μέσω


FormattedText Constructors

Definition

Initializes a new instance of the FormattedText class.

Overloads

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

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)

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

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)

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

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)

Caution

Use the PixelsPerDip override

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

C#
public FormattedText(string textToFormat, System.Globalization.CultureInfo culture, System.Windows.FlowDirection flowDirection, System.Windows.Media.Typeface typeface, double emSize, System.Windows.Media.Brush foreground);
C#
[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);

Parameters

textToFormat
String

The text to be displayed.

culture
CultureInfo

The specific culture of the text.

flowDirection
FlowDirection

The direction the text is read.

typeface
Typeface

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

emSize
Double

The font size the text should be formatted at.

foreground
Brush

The brush used to paint the each glyph.

Attributes

Applies to

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις (Καταργήθηκε)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1 (4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
Windows Desktop (3.0, 3.1, 5, 6, 7, 8, 9, 10)

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.

C#
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);

Parameters

textToFormat
String

The text to be displayed.

culture
CultureInfo

The specific culture of the text.

flowDirection
FlowDirection

The direction the text is read.

typeface
Typeface

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

emSize
Double

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

foreground
Brush

The brush used to paint the each glyph.

pixelsPerDip
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

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

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

Caution

Use the PixelsPerDip override

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

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

Parameters

textToFormat
String

The text to be displayed.

culture
CultureInfo

The specific culture of the text.

flowDirection
FlowDirection

The direction the text is read.

typeface
Typeface

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

emSize
Double

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

foreground
Brush

The brush used to paint the each glyph.

numberSubstitution
NumberSubstitution

The number substitution behavior to apply to the text.

Attributes

Applies to

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις (Καταργήθηκε)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1 (4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
Windows Desktop (3.0, 3.1, 5, 6, 7, 8, 9, 10)

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.

C#
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);

Parameters

textToFormat
String

The text to display.

culture
CultureInfo

The specific culture of the text.

flowDirection
FlowDirection

The direction the text is read.

typeface
Typeface

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

emSize
Double

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

foreground
Brush

The brush used to paint the each glyph.

numberSubstitution
NumberSubstitution

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

pixelsPerDip
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

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

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

Caution

Use the PixelsPerDip override

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.

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

Parameters

textToFormat
String

The text to be displayed.

culture
CultureInfo

The specific culture of the text.

flowDirection
FlowDirection

The direction the text is read.

typeface
Typeface

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

emSize
Double

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

foreground
Brush

The brush used to paint the each glyph.

numberSubstitution
NumberSubstitution

The number substitution behavior to apply to the text.

textFormattingMode
TextFormattingMode

The TextFormattingMode to apply to the text.

Attributes

Applies to

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις (Καταργήθηκε)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1 (4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
Windows Desktop (3.0, 3.1, 5, 6, 7, 8, 9, 10)

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.

C#
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);

Parameters

textToFormat
String

The text to display.

culture
CultureInfo

The specific culture of the text.

flowDirection
FlowDirection

The direction the text is read.

typeface
Typeface

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

emSize
Double

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

foreground
Brush

he brush used to paint the each glyph.

numberSubstitution
NumberSubstitution

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

textFormattingMode
TextFormattingMode

The formatting mode that affects how WPF displays text.

pixelsPerDip
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

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10