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指定无效值时valueformattingProperty发生。
当 formattingProperty 为 null.
注解
为了返回属性值,整个 TextRange 值必须扩展到只有一个值 formattingProperty的文本上。
TextRange如果扩展的文本具有两个或多个不同值formattingProperty,UnsetValue则返回。