FrameworkElementAutomationPeer 类

定义

公开 FrameworkElement 派生类型 (包括 microsoft UI 自动化) 的所有控件。

/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class FrameworkElementAutomationPeer : AutomationPeer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class FrameworkElementAutomationPeer : AutomationPeer
Public Class FrameworkElementAutomationPeer
Inherits AutomationPeer
继承
Object IInspectable DependencyObject AutomationPeer FrameworkElementAutomationPeer
派生
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

示例

此示例演示从 FrameworkElementAutomationPeer 派生对等项并支持至少一个控件模式的基本子类要求。

此代码摘自 XAML 辅助功能示例

注意

此示例未维护,可能无法编译。

        public class MediaContainerAP : FrameworkElementAutomationPeer, IRangeValueProvider, IToggleProvider
        {
            MediaElement _mediaElement;
            FrameworkElement _labeledBy;
// nondefault ctors omitted
            protected override object GetPatternCore(PatternInterface patternInterface)
            {
                if (patternInterface == PatternInterface.RangeValue)
                {
                    return this;
                }
                else if (patternInterface == PatternInterface.Toggle)
                {
                    return this;
                }
                return null;
            }


            protected override AutomationControlType GetAutomationControlTypeCore()
            {
                return AutomationControlType.Group;
            }

            protected override string GetLocalizedControlTypeCore()
            {
                return "Video";
            }

            protected override string GetClassNameCore()
            {
                return "MediaElementContainer";
            }
// pattern implementation omitted ...
        }

下面的 C++/WinRT 代码示例的 MIDL 3.0 文件。

// MediaElementContainer.idl
namespace MyNamespace
{
    runtimeclass MediaElementContainer : Windows.UI.Xaml.Controls.ContentControl
    {
        MediaElementContainer(Windows.UI.Xaml.Controls.Panel parent);
        ...
    };
}
// MediaContainerAP.idl
import "MediaElementContainer.idl";

namespace MyNamespace
{
    runtimeclass MediaContainerAP : Windows.UI.Xaml.Automation.Peers.FrameworkElementAutomationPeer,
        Windows.UI.Xaml.Automation.Provider.IRangeValueProvider,
        Windows.UI.Xaml.Automation.Provider.IToggleProvider
    {
        MediaContainerAP(MediaElementContainer owner, Windows.UI.Xaml.Controls.MediaElement mediaElement);
        ...
    };
}
// MediaContainerAP.h
struct MediaContainerAP : MediaContainerAPT<MediaContainerAP>
{
    MediaContainerAP() = delete;
	// Non-default ctors omitted.

    Windows::Foundation::IInspectable GetPatternCore(Windows::UI::Xaml::Automation::Peers::PatternInterface const& patternInterface)
    {
        if (patternInterface == Windows::UI::Xaml::Automation::Peers::PatternInterface::RangeValue)
        {
            return *this;
        }
        else if (patternInterface == Windows::UI::Xaml::Automation::Peers::PatternInterface::Toggle)
        {
            return *this;
        }
        return nullptr;
    }

    Windows::UI::Xaml::Automation::Peers::AutomationControlType GetAutomationControlTypeCore()
    {
        return Windows::UI::Xaml::Automation::Peers::AutomationControlType::Group;
    }

    winrt::hstring GetLocalizedControlTypeCore()
    {
        return L"Video";
    }

    winrt::hstring GetClassNameCore()
    {
        return L"MediaElementContainer";
    }

	// Pattern implementation omitted.
};
// header
        public ref class MediaContainerAP sealed :  Windows::UI::Xaml::Automation::Peers::FrameworkElementAutomationPeer
                                                    ,Windows::UI::Xaml::Automation::Provider::IRangeValueProvider
                                                    ,Windows::UI::Xaml::Automation::Provider::IToggleProvider
        {
// nondefault ctors omitted
        protected: 
            virtual Object^ GetPatternCore(PatternInterface patternInterface) override
            {
                if (patternInterface == PatternInterface::RangeValue)
                {
                    return this;
                }
                else if (patternInterface == PatternInterface::Toggle)
                {
                    return this;
                }
                return nullptr;
            }

        protected:
            virtual  AutomationControlType GetAutomationControlTypeCore() override
            {
                return  AutomationControlType::Group;
            }

        protected:
            virtual Platform::String^ GetLocalizedControlTypeCore() override
            {
                return "Video";
            }

        protected:
            virtual Platform::String^ GetClassNameCore() override
            {
                return "MediaElementContainer";
            }
// pattern implementation omitted
    Public Class MediaContainerAP
        Inherits FrameworkElementAutomationPeer
        Implements IRangeValueProvider
        Implements IToggleProvider
' nondefault ctors omitted ...

        Protected Overrides Function GetPatternCore(patternInterface__1 As PatternInterface) As Object
            If patternInterface__1 = PatternInterface.RangeValue Then
                Return Me
            ElseIf patternInterface__1 = PatternInterface.Toggle Then
                Return Me
            End If
            Return Nothing
        End Function


        Protected Overrides Function GetAutomationControlTypeCore() As AutomationControlType
            Return AutomationControlType.Group
        End Function

        Protected Overrides Function GetLocalizedControlTypeCore() as String
            Return "Video"
        End Function

        Protected Overrides Function GetClassNameCore() As String
            Return "MediaElementContainer"
        End Function
' pattern implementation omitted ...
End Class

注解

没有“ControlAutomationPeer”类。 FrameworkElementAutomationPeer 充当涉及 Microsoft UI 自动化的所有基本 Control 类方案的实现。 这包括不一定显示为公共 API 公开的行为,例如 AutomationPeer 中许多核心方法的实际实现。

FrameworkElementAutomationPeer 包括对等行为的广泛基本实现,其他对等方可以使用这些基本实现来报告来自 UIElementFrameworkElement 级别的所有者类的信息。 有关详细信息,请参阅 自定义自动化对等节点的“FrameworkElementAutomationPeer 中的基本实现”部分。

除了 Core 替代之外,FrameworkElementAutomationPeer 还有两个静态实用工具方法,这些方法可用于从控制代码中获取对等句柄,或从项容器对等方生成项对等方,以便获得 Microsoft UI 自动化支持。 它们是:

如果需要定义自定义自动化对等,并且无法标识与要从中派生所有者类的控件或基类配对的派生程度更高的对等类,则应将对等基于 FrameworkElementAutomationPeer。 即使所有者类不一定是 FrameworkElement,你实际上也无法直接从 AutomationPeer 派生对等,因为 FrameworkElementAutomationPeer 具有许多替代,这些替代提供布局、自动化和 UI 交互的预期行为。 至少需要从 UIElement 派生所有者类,否则无法通过 OnCreateAutomationPeer 在自动化树加载上创建对等。

FrameworkElementAutomationPeer 派生类

FrameworkElementAutomationPeer 是几个直接派生类的父类,这些类实现对Windows 运行时控件和元素的对等支持。 其中一些对等类是与控件基类匹配的对等类,而不是实际控件。 例如,存在 ButtonBaseAutomationPeer,以便它可以为支持从 ButtonBase 派生的实用 Button 类的多个类定义共享对等行为。 下面是直接从 FrameworkElementAutomationPeer 派生的类的列表:

构造函数

FrameworkElementAutomationPeer(FrameworkElement)

初始化 FrameworkElementAutomationPeer 类的新实例。

属性

Dispatcher

获取与此 对象关联的 CoreDispatcherCoreDispatcher 表示可以访问 UI 线程上的 DependencyObject 的工具,即使代码是由非 UI 线程启动的。

(继承自 DependencyObject)
EventsSource

获取或设置一个 AutomationPeer,它作为来自此 AutomationPeer 的所有事件的源报告给 自动化客户端。 请参阅“备注”。

(继承自 AutomationPeer)
Owner

获取与此 FrameworkElementAutomationPeer 关联的 UIElement 所有者。

方法

ClearValue(DependencyProperty)

清除依赖属性的本地值。

(继承自 DependencyObject)
CreatePeerForElement(UIElement)

为指定的 UIElement 创建 FrameworkElementAutomationPeer

FromElement(UIElement)

返回指定 UIElement 的 FrameworkElementAutomationPeer

GetAcceleratorKey()

获取与 UI 自动化对等方关联的 对象的快捷键组合。

(继承自 AutomationPeer)
GetAcceleratorKeyCore()

提供 Microsoft UI 自动化客户端调用 GetAcceleratorKey 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
GetAccessKey()

获取与自动化对等关联的元素的访问密钥。

(继承自 AutomationPeer)
GetAccessKeyCore()

在 Microsoft UI 自动化客户端调用 GetAccessKey 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetAnimationBaseValue(DependencyProperty)

返回为依赖属性建立的任何基值,该基值适用于动画未处于活动状态的情况。

(继承自 DependencyObject)
GetAnnotations()

获取对当前自动化对等的 UI 自动化注释列表的引用。

(继承自 AutomationPeer)
GetAnnotationsCore()

在 Microsoft UI 自动化客户端调用 GetAnnotations 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetAutomationControlType()

获取与 UI 自动化对等方关联的元素的控件类型。

(继承自 AutomationPeer)
GetAutomationControlTypeCore()

在 Microsoft UI 自动化客户端调用 GetAutomationControlType 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetAutomationId()

获取与自动化对等方关联的元素的 AutomationId

(继承自 AutomationPeer)
GetAutomationIdCore()

在 Microsoft UI 自动化客户端调用 GetAutomationId 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetBoundingRectangle()

获取表示与自动化对等关联的元素的屏幕坐标的 Rect 对象。

(继承自 AutomationPeer)
GetBoundingRectangleCore()

提供 Microsoft UI 自动化客户端调用 GetBoundingRectangle 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
GetChildren()

获取子元素的集合,这些子元素在 UI 自动化树中表示为自动化对等的直接子元素。

(继承自 AutomationPeer)
GetChildrenCore()

在 Microsoft UI 自动化客户端调用 GetChildren 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetClassName()

获取与 AutomationControlType 一起使用的名称,以区分由此 AutomationPeer 表示的控件。

(继承自 AutomationPeer)
GetClassNameCore()

在 Microsoft UI 自动化客户端调用 GetClassName 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetClickablePoint()

获取元素上的一个点,该点与响应鼠标单击的自动化对等方相关联。

(继承自 AutomationPeer)
GetClickablePointCore()

在 Microsoft UI 自动化客户端调用 GetClickablePoint 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetControlledPeers()

在 Microsoft UI 自动化客户端调用 GetControlledPeers 或等效的 Microsoft UI 自动化客户端 API(例如获取由 UIA_ControllerForPropertyId 标识的属性值)时提供对等行为。

(继承自 AutomationPeer)
GetControlledPeersCore()

获取当前自动化对等的受控对等的列表。

(继承自 AutomationPeer)
GetCulture()

调用 GetCultureCore 以获取与自动化对等体关联的元素的区域性值。

(继承自 AutomationPeer)
GetCultureCore()

获取与自动化对等方关联的元素的区域性值。

(继承自 AutomationPeer)
GetDescribedByCore()

获取元素的集合,这些元素提供有关自动化元素的详细信息。

(继承自 AutomationPeer)
GetElementFromPoint(Point)

从指定点获取元素。

(继承自 AutomationPeer)
GetElementFromPointCore(Point)

在 Microsoft UI 自动化客户端调用 GetElementFromPoint 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetFlowsFromCore()

提供 Microsoft UI 自动化客户端调用 GetFlowsFrom 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
GetFlowsToCore()

在 Microsoft UI 自动化客户端调用 GetFlowsTo 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetFocusedElement()

获取当前具有焦点的元素。

(继承自 AutomationPeer)
GetFocusedElementCore()

在 Microsoft UI 自动化客户端调用 GetFocusedElement 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetFullDescription()

获取一个本地化字符串,该字符串描述图像或图像控件等内容的实际视觉外观或内容。

(继承自 AutomationPeer)
GetFullDescriptionCore()

在 Microsoft UI 自动化客户端调用 GetFullDescription 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetHeadingLevel()

获取与此自动化对等关联的 UI 自动化元素的标题级别。

(继承自 AutomationPeer)
GetHeadingLevelCore()

在 Microsoft UI 自动化客户端调用 GetHeadingLevel 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetHelpText()

获取描述与自动化同级关联的控件的功能的文本。

(继承自 AutomationPeer)
GetHelpTextCore()

在 Microsoft UI 自动化客户端调用 GetHelpText 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetItemStatus()

获取可传达与此自动化同级关联的元素的可视状态的文本。

(继承自 AutomationPeer)
GetItemStatusCore()

提供 Microsoft UI 自动化客户端调用 GetItemStatus 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
GetItemType()

获取一个字符串,该字符串描述元素表示的项类型。

(继承自 AutomationPeer)
GetItemTypeCore()

在 Microsoft UI 自动化客户端调用 GetItemType 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetLabeledBy()

获取面向 元素的 UIElementAutomationPeer

(继承自 AutomationPeer)
GetLabeledByCore()

在 Microsoft UI 自动化客户端调用 GetLabeledBy 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetLandmarkType()

获取此自动化对等的陆标类型。

(继承自 AutomationPeer)
GetLandmarkTypeCore()

在 Microsoft UI 自动化客户端调用 GetLandmarkType 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetLevel()

返回与自动化对等关联的元素的级别 (层次结构) 的从 1 开始的整数。

(继承自 AutomationPeer)
GetLevelCore()

提供 Microsoft UI 自动化客户端调用 GetLevel 或等效的 Microsoft UI 自动化客户端 API 时对等行为。

(继承自 AutomationPeer)
GetLiveSetting()

获取与 UI 自动化对等方关联的对象的实时设置通知行为信息。

(继承自 AutomationPeer)
GetLiveSettingCore()

在 Microsoft UI 自动化客户端调用 GetLiveSetting 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetLocalizedControlType()

获取一个本地化字符串,该字符串表示与此自动化对等关联的控件的 AutomationControlType 值。

(继承自 AutomationPeer)
GetLocalizedControlTypeCore()

在 Microsoft UI 自动化客户端调用 GetLocalizedControlType 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetLocalizedLandmarkType()

获取一个本地化字符串,该字符串表示与此自动化对等关联的元素的 AutomationLandmarkType 值。

(继承自 AutomationPeer)
GetLocalizedLandmarkTypeCore()

在 Microsoft UI 自动化客户端调用 GetLocalizedLandmarkType 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetName()

获取描述与此自动化同级关联的元素的文本。 Microsoft UI 自动化 名称 值是大多数辅助技术通过与 Microsoft UI 自动化框架交互来表示应用的 UI 时使用的主要标识符。

(继承自 AutomationPeer)
GetNameCore()

提供 Microsoft UI 自动化客户端调用 GetName 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
GetOrientation()

获取指示显式控件方向(如果有)的值。

(继承自 AutomationPeer)
GetOrientationCore()

在 Microsoft UI 自动化客户端调用 GetOrientation 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetParent()

获取此 AutomationPeer 的父级的 AutomationPeer

(继承自 AutomationPeer)
GetPattern(PatternInterface)

获取与指定的 PatternInterface 关联的控件模式。

(继承自 AutomationPeer)
GetPatternCore(PatternInterface)

在 Microsoft UI 自动化客户端调用 GetPattern 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetPeerFromPoint(Point)

从指定点获取 AutomationPeer

(继承自 AutomationPeer)
GetPeerFromPointCore(Point)

在 Microsoft UI 自动化客户端调用 GetPeerFromPoint 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetPositionInSet()

返回与自动化对等关联的元素的集中序号位置的从 1 开始的整数。

(继承自 AutomationPeer)
GetPositionInSetCore()

提供 Microsoft UI 自动化客户端调用 GetPositionInSet 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
GetSizeOfSet()

返回与自动化对等关联的元素所在的集大小的从 1 开始的整数。

(继承自 AutomationPeer)
GetSizeOfSetCore()

在 Microsoft UI 自动化客户端调用 GetSizeOfSet 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
GetValue(DependencyProperty)

DependencyObject 返回依赖属性的当前有效值。

(继承自 DependencyObject)
HasKeyboardFocus()

获取一个值,该值指示与此自动化同级关联的元素当前是否具有键盘焦点。

(继承自 AutomationPeer)
HasKeyboardFocusCore()

提供 Microsoft UI 自动化客户端调用 HasKeyboardFocus 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
InvalidatePeer()

触发对 AutomationPeer main 属性的重新计算,并在属性发生更改时向自动化客户端引发 PropertyChanged 通知。

(继承自 AutomationPeer)
IsContentElement()

获取一个值,该值指示与此自动化对等方关联的元素是否包含向用户显示的数据。

(继承自 AutomationPeer)
IsContentElementCore()

提供 Microsoft UI 自动化客户端调用 IsContentElement 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
IsControlElement()

获取一个值,该值指示元素是被用户理解为交互式元素,还是作为 GUI 中控件逻辑结构的贡献。

(继承自 AutomationPeer)
IsControlElementCore()

在 Microsoft UI 自动化客户端调用 IsControlElement 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
IsDataValidForForm()

获取一个布尔值,该值指示输入的值或所选值对于与自动化元素关联的表单规则是否有效。

(继承自 AutomationPeer)
IsDataValidForFormCore()

提供 Microsoft UI 自动化客户端访问 IsDataValidForForm 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
IsDialog()

获取一个值,该值指示与此自动化对等关联的元素是否为对话框窗口。

(继承自 AutomationPeer)
IsDialogCore()

在 Microsoft UI 自动化客户端调用 IsDialog 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
IsEnabled()

获取一个值,该值指示与此自动化同级关联的元素是否支持交互。

(继承自 AutomationPeer)
IsEnabledCore()

在 Microsoft UI 自动化客户端调用 IsEnabled 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
IsKeyboardFocusable()

获取一个值,该值指示此元素是否可以接受键盘焦点。

(继承自 AutomationPeer)
IsKeyboardFocusableCore()

在 Microsoft UI 自动化客户端调用 IsKeyboardFocusable 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
IsOffscreen()

获取一个值,该值指示元素是否不在屏幕上。

(继承自 AutomationPeer)
IsOffscreenCore()

提供 Microsoft UI 自动化客户端调用 IsOffscreen 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
IsPassword()

获取一个值,该值指示元素是否包含敏感内容。

(继承自 AutomationPeer)
IsPasswordCore()

在 Microsoft UI 自动化客户端调用 IsPassword 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
IsPeripheral()

获取一个布尔值,该值指示自动化元素是否表示外围 UI。

(继承自 AutomationPeer)
IsPeripheralCore()

提供 Microsoft UI 自动化客户端访问 IsPeripheral 或等效的 Microsoft UI 自动化客户端 API 时的对等行为。

(继承自 AutomationPeer)
IsRequiredForForm()

获取一个值,该值指示是否必须在窗体中完成与此同级关联的元素。

(继承自 AutomationPeer)
IsRequiredForFormCore()

在 Microsoft UI 自动化客户端调用 IsRequiredForForm 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
Navigate(AutomationNavigationDirection)

获取 UI 自动化树中指定方向的元素。

(继承自 AutomationPeer)
NavigateCore(AutomationNavigationDirection)

在 Microsoft UI 自动化客户端调用 Navigate 或等效的 Microsoft UI 自动化客户端 API 时提供对等行为。

(继承自 AutomationPeer)
PeerFromProvider(IRawElementProviderSimple)

获取指定 IRawElementProviderSimple 代理的 AutomationPeer

(继承自 AutomationPeer)
ProviderFromPeer(AutomationPeer)

获取指定 AutomationPeerIRawElementProviderSimple 代理。

(继承自 AutomationPeer)
RaiseAutomationEvent(AutomationEvents)

引发自动化事件。

(继承自 AutomationPeer)
RaiseNotificationEvent(AutomationNotificationKind, AutomationNotificationProcessing, String, String)

启动通知事件。

(继承自 AutomationPeer)
RaisePropertyChangedEvent(AutomationProperty, Object, Object)

引发事件以通知自动化客户端已更改的属性值。

(继承自 AutomationPeer)
RaiseStructureChangedEvent(AutomationStructureChangeType, AutomationPeer)

引发事件以通知 Microsoft UI 自动化核心树结构已更改。

(继承自 AutomationPeer)
RaiseTextEditTextChangedEvent(AutomationTextEditChangeType, IVectorView<String>)

引发事件以通知 Microsoft UI 自动化核心文本控件已以编程方式更改文本。

(继承自 AutomationPeer)
ReadLocalValue(DependencyProperty)

如果设置了本地值,则返回依赖属性的本地值。

(继承自 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

注册一个通知函数,用于侦听此 DependencyObject 实例上特定 DependencyProperty 的更改。

(继承自 DependencyObject)
SetFocus()

对与此自动化同级关联的元素设置键盘焦点。

(继承自 AutomationPeer)
SetFocusCore()

提供 Microsoft UI 自动化客户端调用 SetFocus 或等效的 Microsoft UI 自动化客户端 API 时对等的行为。

(继承自 AutomationPeer)
SetParent(AutomationPeer)

设置此 AutomationPeer 的父级的 AutomationPeer

(继承自 AutomationPeer)
SetValue(DependencyProperty, Object)

设置 DependencyObject 上依赖属性的本地值。

(继承自 DependencyObject)
ShowContextMenu()

显示所有者元素的可用上下文菜单。

(继承自 AutomationPeer)
ShowContextMenuCore()

提供 Microsoft UI 自动化客户端调用 ShowContextMenu 或等效的 Microsoft UI 自动化客户端 API 时的对等行为。

(继承自 AutomationPeer)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

取消以前通过调用 RegisterPropertyChangedCallback 注册的更改通知。

(继承自 DependencyObject)

适用于

另请参阅