Share via


TextRange.GetPropertyValue(DependencyProperty) メソッド

定義

現在の選択範囲の指定した書式設定プロパティの有効な値を返します。

public:
 System::Object ^ GetPropertyValue(System::Windows::DependencyProperty ^ formattingProperty);
public object GetPropertyValue (System.Windows.DependencyProperty formattingProperty);
member this.GetPropertyValue : System.Windows.DependencyProperty -> obj
Public Function GetPropertyValue (formattingProperty As DependencyProperty) As Object

パラメーター

formattingProperty
DependencyProperty

現在の選択範囲について値を取得する書式設定プロパティ。

戻り値

指定された書式設定プロパティの値を指定するオブジェクト。

例外

formattingProperty が有効な書式設定プロパティを指定していない場合、または valueformattingProperty の無効な値を指定している場合に発生します。

formattingPropertynull の場合に発生します。

注釈

プロパティ値を返すには、 の値が 1 つだけのテキスト全体 TextRange を拡張する formattingProperty必要があります。 が TextRange の 2 つ以上の異なる値を持つテキストの上にformattingPropertyUnsetValue拡張されている場合は、 が返されます。

適用対象

こちらもご覧ください