SelectionPattern.Current 属性

定义

获取此 SelectionPattern 的当前 UI 自动化UI Automation 属性值。Gets the current UI 自动化UI Automation property values for this SelectionPattern.

public:
 property System::Windows::Automation::SelectionPattern::SelectionPatternInformation Current { System::Windows::Automation::SelectionPattern::SelectionPatternInformation get(); };
public System.Windows.Automation.SelectionPattern.SelectionPatternInformation Current { get; }
member this.Current : System.Windows.Automation.SelectionPattern.SelectionPatternInformation
Public ReadOnly Property Current As SelectionPattern.SelectionPatternInformation

属性值

一个结构,它包含此控件模式的当前 UI 自动化UI Automation 属性值。A structure containing the current UI 自动化UI Automation property values for the control pattern.

注解

此模式必须来自AutomationElement Full具有引用的, 才能获取当前值。This pattern must be from an AutomationElement with an Full reference in order to get current values. 如果是AutomationElement使用None获取的, 则它只包含缓存的数据, 并且尝试获取任何属性的当前值会引发异常。If the AutomationElement was obtained using None, it contains only cached data, and attempting to get the current value of any property raises an exception. 使用Cached获取以前CacheRequest使用指定的属性的已缓存值。Use Cached to get the cached value of a property that was previously specified using a CacheRequest.

有关可用属性及其用法的信息, 请参阅SelectionPattern.SelectionPatternInformationFor information on the properties available and their use, see SelectionPattern.SelectionPatternInformation.

适用于