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されたときに発生します。

注釈

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

適用対象

こちらもご覧ください