TextRange.GetPropertyValue(DependencyProperty) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回对当前所选内容指定的格式属性的有效值。
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 未指定有效的格式属性,或 value 为 formattingProperty 指定的值无效时发生。
当 formattingProperty 为 null 时发生。
注解
为了返回属性值,整个TextRange值必须扩展到只有一个值的文本。formattingProperty 如果 扩展TextRange至 具有两个或更多不同值的文本,formattingPropertyUnsetValue则返回 。