Επεξεργασία

Κοινή χρήση μέσω


TextRange.GetPropertyValue(DependencyProperty) Method

Definition

Returns the effective value of a specified formatting property on the current selection.

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

Parameters

formattingProperty
DependencyProperty

A formatting property to get the value of with respect to the current selection.

Returns

An object specifying the value of the specified formatting property.

Exceptions

Occurs when formattingProperty does not specify a valid formatting property, or value specifies an invalid value for formattingProperty.

Occurs when formattingProperty is null.

Remarks

In order to return a property value, the entire TextRange must extend over text with only one value for the formattingProperty. If the TextRange extends over text with two or more different values for the formattingProperty, UnsetValue is returned.

Applies to

See also