Typeface Constructors
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Initialiseert een nieuw exemplaar van de Typeface klasse.
Overloads
| Name | Description |
|---|---|
| Typeface(String) |
Initialiseert een nieuw exemplaar van de Typeface klasse voor de opgegeven lettertypefamilienaam. |
| Typeface(FontFamily, FontStyle, FontWeight, FontStretch) |
Initialiseert een nieuw exemplaar van de Typeface klasse voor de naam van de opgegeven lettertypefamilie, Styleen WeightStretch waarden. |
| Typeface(FontFamily, FontStyle, FontWeight, FontStretch, FontFamily) |
Initialiseert een nieuw exemplaar van de Typeface klasse voor de naam van de opgegeven lettertypefamilie, Styleen WeightStretch waarden. Daarnaast wordt een lettertypefamilie voor terugval opgegeven. |
Typeface(String)
Initialiseert een nieuw exemplaar van de Typeface klasse voor de opgegeven lettertypefamilienaam.
public:
Typeface(System::String ^ typefaceName);
public Typeface(string typefaceName);
new System.Windows.Media.Typeface : string -> System.Windows.Media.Typeface
Public Sub New (typefaceName As String)
Parameters
- typefaceName
- String
De naam van het lettertype voor de opgegeven lettertypefamilie.
Voorbeelden
// Return the typeface for the selected font family name.
Typeface typeface1 = new Typeface("Verdana");
// Return the typeface for the selected font family name and font values.
Typeface typeface2 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles Light"),
FontStyles.Italic,
FontWeights.ExtraBold,
FontStretches.Condensed);
// Return the typeface for the selected font family name, font values, and fallback font family name.
Typeface typeface3 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles"),
FontStyles.Italic,
FontWeights.ExtraBold,
FontStretches.Condensed,
new FontFamily("Arial"));
' Return the typeface for the selected font family name.
Dim typeface1 As New Typeface("Verdana")
' Return the typeface for the selected font family name and font values.
Dim typeface2 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles Light"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed)
' Return the typeface for the selected font family name, font values, and fallback font family name.
Dim typeface3 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed, New FontFamily("Arial"))
Van toepassing op
Typeface(FontFamily, FontStyle, FontWeight, FontStretch)
public:
Typeface(System::Windows::Media::FontFamily ^ fontFamily, System::Windows::FontStyle style, System::Windows::FontWeight weight, System::Windows::FontStretch stretch);
public Typeface(System.Windows.Media.FontFamily fontFamily, System.Windows.FontStyle style, System.Windows.FontWeight weight, System.Windows.FontStretch stretch);
new System.Windows.Media.Typeface : System.Windows.Media.FontFamily * System.Windows.FontStyle * System.Windows.FontWeight * System.Windows.FontStretch -> System.Windows.Media.Typeface
Public Sub New (fontFamily As FontFamily, style As FontStyle, weight As FontWeight, stretch As FontStretch)
Parameters
- fontFamily
- FontFamily
De lettertypefamilie van het lettertype.
- style
- FontStyle
De stijl van het lettertype.
- weight
- FontWeight
Het relatieve gewicht van het lettertype.
- stretch
- FontStretch
De mate waarin het lettertype wordt uitgerekt.
Voorbeelden
// Return the typeface for the selected font family name.
Typeface typeface1 = new Typeface("Verdana");
// Return the typeface for the selected font family name and font values.
Typeface typeface2 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles Light"),
FontStyles.Italic,
FontWeights.ExtraBold,
FontStretches.Condensed);
// Return the typeface for the selected font family name, font values, and fallback font family name.
Typeface typeface3 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles"),
FontStyles.Italic,
FontWeights.ExtraBold,
FontStretches.Condensed,
new FontFamily("Arial"));
' Return the typeface for the selected font family name.
Dim typeface1 As New Typeface("Verdana")
' Return the typeface for the selected font family name and font values.
Dim typeface2 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles Light"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed)
' Return the typeface for the selected font family name, font values, and fallback font family name.
Dim typeface3 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed, New FontFamily("Arial"))
Van toepassing op
Typeface(FontFamily, FontStyle, FontWeight, FontStretch, FontFamily)
public:
Typeface(System::Windows::Media::FontFamily ^ fontFamily, System::Windows::FontStyle style, System::Windows::FontWeight weight, System::Windows::FontStretch stretch, System::Windows::Media::FontFamily ^ fallbackFontFamily);
public Typeface(System.Windows.Media.FontFamily fontFamily, System.Windows.FontStyle style, System.Windows.FontWeight weight, System.Windows.FontStretch stretch, System.Windows.Media.FontFamily fallbackFontFamily);
new System.Windows.Media.Typeface : System.Windows.Media.FontFamily * System.Windows.FontStyle * System.Windows.FontWeight * System.Windows.FontStretch * System.Windows.Media.FontFamily -> System.Windows.Media.Typeface
Public Sub New (fontFamily As FontFamily, style As FontStyle, weight As FontWeight, stretch As FontStretch, fallbackFontFamily As FontFamily)
Parameters
- fontFamily
- FontFamily
De lettertypefamilie van het lettertype.
- style
- FontStyle
De stijl van het lettertype.
- weight
- FontWeight
Het relatieve gewicht van het lettertype.
- stretch
- FontStretch
De mate waarin het lettertype wordt uitgerekt.
- fallbackFontFamily
- FontFamily
De lettertypefamilie die wordt gebruikt wanneer een teken wordt aangetroffen dat de primaire lettertypefamilie (opgegeven door de fontFamily parameter) niet kan worden weergegeven.
Voorbeelden
// Return the typeface for the selected font family name.
Typeface typeface1 = new Typeface("Verdana");
// Return the typeface for the selected font family name and font values.
Typeface typeface2 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles Light"),
FontStyles.Italic,
FontWeights.ExtraBold,
FontStretches.Condensed);
// Return the typeface for the selected font family name, font values, and fallback font family name.
Typeface typeface3 = new Typeface(new FontFamily("file:///C:\\MyFonts\\#Pericles"),
FontStyles.Italic,
FontWeights.ExtraBold,
FontStretches.Condensed,
new FontFamily("Arial"));
' Return the typeface for the selected font family name.
Dim typeface1 As New Typeface("Verdana")
' Return the typeface for the selected font family name and font values.
Dim typeface2 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles Light"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed)
' Return the typeface for the selected font family name, font values, and fallback font family name.
Dim typeface3 As New Typeface(New FontFamily("file:///C:\MyFonts\#Pericles"), FontStyles.Italic, FontWeights.ExtraBold, FontStretches.Condensed, New FontFamily("Arial"))
Opmerkingen
Als null de fallbackFontFamily parameter wordt doorgegeven, worden vaktekens weergegeven voor tekens die niet zijn opgenomen in de primaire lettertypefamilie.