FormattedText Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av FormattedText klassen.
Överlagringar
| Name | Description |
|---|---|
| FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush) |
Föråldrad.
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek och pensel. |
| FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, Double) |
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, förgrundspenslar och pixelPerDip-värde. |
| FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution) |
Föråldrad.
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, pensel och nummerersättning. |
| FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, Double) |
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, förgrundspenslar, beteende för nummerersättning och pixelPerDip-värde. |
| FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode) |
Föråldrad.
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, pensel, nummerersättningsbeteende och textformateringsläge. |
| FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode, Double) |
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, förgrundspenslar, beteende för nummerersättning och pixelPerDip-värde. |
FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush)
Varning
Use the PixelsPerDip override
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek och pensel.
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)
Parametrar
- textToFormat
- String
Texten som ska visas.
- culture
- CultureInfo
Textens specifika kultur.
- flowDirection
- FlowDirection
Riktningen som texten läss i.
- typeface
- Typeface
Teckensnittsfamiljen, vikten, stilen och stretchen som texten ska formateras med.
- emSize
- Double
Teckenstorleken som texten ska formateras på.
- foreground
- Brush
Borsten som används för att måla varje glyf.
- Attribut
Gäller för
FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, Double)
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, förgrundspenslar och pixelPerDip-värde.
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)
Parametrar
- textToFormat
- String
Texten som ska visas.
- culture
- CultureInfo
Textens specifika kultur.
- flowDirection
- FlowDirection
Riktningen som texten läss i.
- typeface
- Typeface
Teckensnittsfamiljen, vikten, stilen och stretchen som texten ska formateras med.
- emSize
- Double
Teckenstorleken för textens em-mått, som anges i enhetsoberoende enheter (1/96 tum per enhet).
- foreground
- Brush
Borsten som används för att måla varje glyf.
- pixelsPerDip
- Double
Värdet pixel per densitet oberoende pixel, vilket motsvarar skalningsfaktorn. Om DPI för en skärm till exempel är 120 (eller 1,25 eftersom 120/96 = 1,25) ritas 1,25 bildpunkter per densitet oberoende pixel. DIP är den måttenhet som används av WPF för att vara oberoende av enhetsupplösning och DPI:er.
Gäller för
FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution)
Varning
Use the PixelsPerDip override
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, pensel och nummerersättning.
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)
Parametrar
- textToFormat
- String
Texten som ska visas.
- culture
- CultureInfo
Textens specifika kultur.
- flowDirection
- FlowDirection
Riktningen som texten läss i.
- typeface
- Typeface
Teckensnittsfamiljen, vikten, stilen och stretchen som texten ska formateras med.
- emSize
- Double
Teckenstorleken för textens em-mått, som anges i enhetsoberoende enheter (1/96 tum per enhet).
- foreground
- Brush
Borsten som används för att måla varje glyf.
- numberSubstitution
- NumberSubstitution
Beteendet för nummerersättning som ska tillämpas på texten.
- Attribut
Gäller för
FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, Double)
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, förgrundspenslar, beteende för nummerersättning och pixelPerDip-värde.
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)
Parametrar
- textToFormat
- String
Texten som ska visas.
- culture
- CultureInfo
Textens specifika kultur.
- flowDirection
- FlowDirection
Riktningen som texten läss i.
- typeface
- Typeface
Teckensnittsfamiljen, vikten, stilen och stretchen som texten ska formateras med.
- emSize
- Double
Teckenstorleken för textens em-mått, som anges i enhetsoberoende enheter (1/96 tum per enhet).
- foreground
- Brush
Borsten som används för att måla varje glyf.
- numberSubstitution
- NumberSubstitution
Anger hur tal i text visas baserat på NumberSubstitution. Det här värdet kan vara null.
- pixelsPerDip
- Double
Värdet pixel per densitet oberoende pixel, vilket motsvarar skalningsfaktorn. Om DPI för en skärm till exempel är 120 (eller 1,25 eftersom 120/96 = 1,25) ritas 1,25 bildpunkter per densitet oberoende pixel. DIP är den måttenhet som används av WPF för att vara oberoende av enhetsupplösning och DPI:er.
Gäller för
FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode)
Varning
Use the PixelsPerDip override
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, pensel, nummerersättningsbeteende och textformateringsläge.
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)
Parametrar
- textToFormat
- String
Texten som ska visas.
- culture
- CultureInfo
Textens specifika kultur.
- flowDirection
- FlowDirection
Riktningen som texten läss i.
- typeface
- Typeface
Teckensnittsfamiljen, vikten, stilen och stretchen som texten ska formateras med.
- emSize
- Double
Teckenstorleken för textens em-mått, som anges i enhetsoberoende enheter (1/96 tum per enhet).
- foreground
- Brush
Borsten som används för att måla varje glyf.
- numberSubstitution
- NumberSubstitution
Beteendet för nummerersättning som ska tillämpas på texten.
- textFormattingMode
- TextFormattingMode
Att TextFormattingMode tillämpa på texten.
- Attribut
Gäller för
FormattedText(String, CultureInfo, FlowDirection, Typeface, Double, Brush, NumberSubstitution, TextFormattingMode, Double)
Initierar en ny instans av FormattedText klassen med angiven text, kultur, flödesriktning, typsnitt, teckenstorlek, förgrundspenslar, beteende för nummerersättning och pixelPerDip-värde.
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)
Parametrar
- textToFormat
- String
Texten som ska visas.
- culture
- CultureInfo
Textens specifika kultur.
- flowDirection
- FlowDirection
Riktningen som texten läss i.
- typeface
- Typeface
Teckensnittsfamiljen, vikten, stilen och stretchen som texten ska formateras med.
- emSize
- Double
Teckenstorleken för textens em-mått, som anges i enhetsoberoende enheter (1/96 tum per enhet).
- foreground
- Brush
han borste används för att måla varje glyph.
- numberSubstitution
- NumberSubstitution
Anger hur tal i text visas baserat på NumberSubstitution. Det här värdet kan vara null.
- textFormattingMode
- TextFormattingMode
Formateringsläget som påverkar hur WPF visar text.
- pixelsPerDip
- Double
Värdet pixel per densitet oberoende pixel, vilket motsvarar skalningsfaktorn. Om DPI för en skärm till exempel är 120 (eller 1,25 eftersom 120/96 = 1,25) ritas 1,25 bildpunkter per densitet oberoende pixel. DIP är den måttenhet som används av WPF för att vara oberoende av enhetsupplösning och DPI:er.