FormattedText.SetFontTypeface メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
FormattedText オブジェクトのフォント タイプフェイスを設定します。
オーバーロード
| 名前 | 説明 |
|---|---|
| SetFontTypeface(Typeface) |
FormattedText オブジェクト内の文字セット全体のフォント タイプフェイスを設定します。 |
| SetFontTypeface(Typeface, Int32, Int32) |
FormattedText オブジェクト内の指定した文字のサブセットのフォントタイプフェイスを設定します。 |
SetFontTypeface(Typeface)
FormattedText オブジェクト内の文字セット全体のフォント タイプフェイスを設定します。
public:
void SetFontTypeface(System::Windows::Media::Typeface ^ typeface);
public void SetFontTypeface(System.Windows.Media.Typeface typeface);
member this.SetFontTypeface : System.Windows.Media.Typeface -> unit
Public Sub SetFontTypeface (typeface As Typeface)
パラメーター
注釈
Typeface は、 FontFamily、 FontWeight、 FontStyle、および FontStretchの組み合わせを表します。 Typeface では、複数のコンストラクターがサポートされています。そのうちの 1 つは書体名に基づくコンストラクトで、もう 1 つは FontFamily、 FontWeight、 FontStyle、および FontStretchの個別の値を受け取ります。
このメソッドは、テキスト文字列全体のフォントタイプフェイスを設定します。 テキスト文字列のサブセットのフォントタイプフェイスを設定するには、 SetFontTypeface(Typeface, Int32, Int32) メソッドを使用します。
適用対象
SetFontTypeface(Typeface, Int32, Int32)
FormattedText オブジェクト内の指定した文字のサブセットのフォントタイプフェイスを設定します。
public:
void SetFontTypeface(System::Windows::Media::Typeface ^ typeface, int startIndex, int count);
public void SetFontTypeface(System.Windows.Media.Typeface typeface, int startIndex, int count);
member this.SetFontTypeface : System.Windows.Media.Typeface * int * int -> unit
Public Sub SetFontTypeface (typeface As Typeface, startIndex As Integer, count As Integer)
パラメーター
- startIndex
- Int32
書体を適用する最初の文字の開始インデックス。
- count
- Int32
書体を適用する文字数。
注釈
Typeface は、 FontFamily、 FontWeight、 FontStyle、および FontStretchの組み合わせを表します。 Typeface では、複数のコンストラクターがサポートされています。そのうちの 1 つは書体名に基づくコンストラクトで、もう 1 つは FontFamily、 FontWeight、 FontStyle、および FontStretchの個別の値を受け取ります。
テキスト文字列全体のフォントタイプフェイスを設定するには、 SetFontTypeface(Typeface) メソッドを使用します。