Clase FrameworkElementAutomationPeer
TOC
Contraer la tabla de contenido
Expandir la tabla de contenido

FrameworkElementAutomationPeer Class

Expone los tipos derivados de FrameworkElement (incluidos todos los controles) a la automatización de la interfaz de usuario de Microsoft.

Herencia

Object
  DependencyObject
    AutomationPeer
      FrameworkElementAutomationPeer

Sintaxis


public class FrameworkElementAutomationPeer : AutomationPeer

Atributos

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

A continuación se indican los tipos de miembros de FrameworkElementAutomationPeer (Clase):

Constructores

A continuación se indican los constructores de FrameworkElementAutomationPeer (Clase).

ConstructorDescripción
FrameworkElementAutomationPeer Initializes a new instance of the FrameworkElementAutomationPeer class.

 

Métodos

The FrameworkElementAutomationPeer Clase tiene estos métodos. También hereda métodos de Object Clase.

MétodoDescripción
ClearValue Clears the local value of a dependency property. (Se hereda de DependencyObject)
CreatePeerForElement Creates a FrameworkElementAutomationPeer for the specified UIElement.
FromElement Returns the FrameworkElementAutomationPeer for the specified UIElement.
GetAcceleratorKey Gets the accelerator key combinations for the object that is associated with the UI Automation peer. (Se hereda de AutomationPeer)
GetAcceleratorKeyCore Provides the peer's behavior when a Microsoft UI Automation client calls GetAcceleratorKey or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetAccessKey Gets the access key for the element that is associated with the automation peer. (Se hereda de AutomationPeer)
GetAccessKeyCore Provides the peer's behavior when a Microsoft UI Automation client calls GetAccessKey or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Se hereda de DependencyObject)
GetAutomationControlType Gets the control type for the element that is associated with the UI Automation peer. (Se hereda de AutomationPeer)
GetAutomationControlTypeCore Provides the peer's behavior when a Microsoft UI Automation client calls GetAutomationControlType or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetAutomationId Gets the AutomationId of the element that is associated with the automation peer. (Se hereda de AutomationPeer)
GetAutomationIdCore Provides the peer's behavior when a Microsoft UI Automation client calls GetAutomationId or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetBoundingRectangle Gets the Rect object that represents the screen coordinates of the element that is associated with the automation peer. (Se hereda de AutomationPeer)
GetBoundingRectangleCore Provides the peer's behavior when a Microsoft UI Automation client calls GetBoundingRectangle or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetChildren Gets the collection of child elements that are represented in the UI Automation tree as immediate child elements of the automation peer. (Se hereda de AutomationPeer)
GetChildrenCore Provides the peer's behavior when a Microsoft UI Automation client calls GetChildren or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetClassName Gets a name that is used with AutomationControlType, to differentiate the control that is represented by this AutomationPeer. (Se hereda de AutomationPeer)
GetClassNameCore Provides the peer's behavior when a Microsoft UI Automation client calls GetClassName or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetClickablePoint Gets a point on the element that is associated with the automation peer that responds to a mouse click. (Se hereda de AutomationPeer)
GetClickablePointCore Provides the peer's behavior when a Microsoft UI Automation client calls GetClickablePoint or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetControlledPeers Provides the peer's behavior when a Microsoft UI Automation client calls GetControlledPeers or an equivalent Microsoft UI Automation client API such as getting a property value as identified by UIA_ControllerForPropertyId. (Se hereda de AutomationPeer)
GetControlledPeersCore Gets a list of the controlled peers for the current automation peer. (Se hereda de AutomationPeer)
GetHelpText Gets text that describes the functionality of the control that is associated with the automation peer. (Se hereda de AutomationPeer)
GetHelpTextCore Provides the peer's behavior when a Microsoft UI Automation client calls GetHelpText or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetItemStatus Gets text that conveys the visual status of the element that is associated with this automation peer. (Se hereda de AutomationPeer)
GetItemStatusCore Provides the peer's behavior when a Microsoft UI Automation client calls GetItemStatus or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetItemType Gets a string that describes what kind of item an element represents. (Se hereda de AutomationPeer)
GetItemTypeCore Provides the peer's behavior when a Microsoft UI Automation client calls GetItemType or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetLabeledBy Gets the AutomationPeer for the UIElement that is targeted to the element. (Se hereda de AutomationPeer)
GetLabeledByCore Provides the peer's behavior when a Microsoft UI Automation client calls GetLabeledBy or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetLiveSetting Gets the live setting notification behavior information for the object that is associated with the UI Automation peer. (Se hereda de AutomationPeer)
GetLiveSettingCore Provides the peer's behavior when a Microsoft UI Automation client calls GetLiveSetting or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetLocalizedControlType Gets a localized string that represents the AutomationControlType value for the control that is associated with this automation peer. (Se hereda de AutomationPeer)
GetLocalizedControlTypeCore Provides the peer's behavior when a Microsoft UI Automation client calls GetLocalizedControlType or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetName Gets text that describes the element that is associated with this automation peer. The Microsoft UI Automation Name value is the primary identifier used by most assistive technology when they represent your app's UI by interacting with the Microsoft UI Automation framework. (Se hereda de AutomationPeer)
GetNameCore Provides the peer's behavior when a Microsoft UI Automation client calls GetName or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetOrientation Gets a value that indicates the explicit control orientation, if any. (Se hereda de AutomationPeer)
GetOrientationCore Provides the peer's behavior when a Microsoft UI Automation client calls GetOrientation or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetParent Gets the AutomationPeer that is the parent of this AutomationPeer. (Se hereda de AutomationPeer)
GetPattern Gets the control pattern that is associated with the specified PatternInterface. (Se hereda de AutomationPeer)
GetPatternCore Provides the peer's behavior when a Microsoft UI Automation client calls GetPattern or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetPeerFromPoint Gets an AutomationPeer from the specified point. (Se hereda de AutomationPeer)
GetPeerFromPointCore Provides the peer's behavior when a Microsoft UI Automation client calls GetPeerFromPoint or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Se hereda de DependencyObject)
HasKeyboardFocus Gets a value that indicates whether the element that is associated with this automation peer currently has keyboard focus. (Se hereda de AutomationPeer)
HasKeyboardFocusCore Provides the peer's behavior when a Microsoft UI Automation client calls HasKeyboardFocus or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
InvalidatePeer Triggers recalculation of the main properties of the AutomationPeer and raises the PropertyChanged notification to the automation client if the properties have changed. (Se hereda de AutomationPeer)
IsContentElement Gets a value that indicates whether the element that is associated with this automation peer contains data that is presented to the user. (Se hereda de AutomationPeer)
IsContentElementCore Provides the peer's behavior when a Microsoft UI Automation client calls IsContentElement or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
IsControlElement Gets a value that indicates whether the element is understood by the user as interactive or as contributing to the logical structure of the control in the GUI. (Se hereda de AutomationPeer)
IsControlElementCore Provides the peer's behavior when a Microsoft UI Automation client calls IsControlElement or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
IsEnabled Gets a value that indicates whether the element associated with this automation peer supports interaction. (Se hereda de AutomationPeer)
IsEnabledCore Provides the peer's behavior when a Microsoft UI Automation client calls IsEnabled or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
IsKeyboardFocusable Gets a value that indicates whether the element can accept keyboard focus. (Se hereda de AutomationPeer)
IsKeyboardFocusableCore Provides the peer's behavior when a Microsoft UI Automation client calls IsKeyboardFocusable or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
IsOffscreen Gets a value that indicates whether an element is off the screen. (Se hereda de AutomationPeer)
IsOffscreenCore Provides the peer's behavior when a Microsoft UI Automation client calls IsOffscreen or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
IsPassword Gets a value that indicates whether the element contains sensitive content. (Se hereda de AutomationPeer)
IsPasswordCore Provides the peer's behavior when a Microsoft UI Automation client calls IsPassword or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
IsRequiredForForm Gets a value that indicates whether the element that is associated with this peer must be completed on a form. (Se hereda de AutomationPeer)
IsRequiredForFormCore Provides the peer's behavior when a Microsoft UI Automation client calls IsRequiredForForm or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
PeerFromProvider Gets an AutomationPeer for the specified IRawElementProviderSimple proxy. (Se hereda de AutomationPeer)
ProviderFromPeer Gets the IRawElementProviderSimple proxy for the specified AutomationPeer. (Se hereda de AutomationPeer)
RaiseAutomationEvent Raises an automation event. (Se hereda de AutomationPeer)
RaisePropertyChangedEvent Raises an event to notify the automation client of a changed property value. (Se hereda de AutomationPeer)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Se hereda de DependencyObject)
SetFocus Sets the keyboard focus on the element that is associated with this automation peer. (Se hereda de AutomationPeer)
SetFocusCore Provides the peer's behavior when a Microsoft UI Automation client calls SetFocus or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)
SetValue Sets the local value of a dependency property on a DependencyObject. (Se hereda de DependencyObject)
ShowContextMenu Shows the available context menu for the owner element. (Se hereda de AutomationPeer)
ShowContextMenuCore Provides the peer's behavior when a Microsoft UI Automation client calls ShowContextMenu or an equivalent Microsoft UI Automation client API. (Se hereda de AutomationPeer)

 

Propiedades

FrameworkElementAutomationPeerClase tiene estas propiedades.

PropiedadTipo de accesoDescripción

Dispatcher

De sólo lecturaGets the CoreDispatcher that this object is associated with. (Se hereda de DependencyObject)

EventsSource

Lectura/escrituraGets or sets an AutomationPeer that is reported to the automation client as the source for all the events that come from this AutomationPeer. See Remarks. (Se hereda de AutomationPeer)

Owner

De sólo lecturaGets the UIElement owner that is associated with this FrameworkElementAutomationPeer.

 

Comentarios

No hay ninguna clase "ControlAutomationPeer". FrameworkElementAutomationPeer sirve como implementación para todos los escenarios principales de la clase Control relacionados con la automatización de la interfaz de usuario. Esto incluye un comportamiento que no aparece necesariamente como exposición de la API pública, por ejemplo las implementaciones prácticas de muchos de los métodos Core de AutomationPeer.

FrameworkElementAutomationPeer incluye la implementación base completa del comportamiento del mismo nivel que otros elementos del mismo nivel pueden utilizar para notificar información procedente de las clases propietarias en el nivel UIElement y FrameworkElement. Para obtener más información, vea la sección "Implementación base en FrameworkElementAutomationPeer" de Objetos de automatización del mismo nivel personalizados.

Además de las invalidaciones de Core, FrameworkElementAutomationPeer tiene dos métodos de utilidad estáticos que son útiles para obtener un identificador del mismo nivel dentro del código de control, o para generar elementos del mismo nivel desde un contenedor de elemento del mismo nivel para la compatibilidad con la automatización de la interfaz de usuario. Estos son:

Si necesita definir un elemento del mismo nivel de automatización personalizado y no puede identificar una clase del mismo nivel más derivada adecuada para el control o la clase base de la que se deriva la clase propietaria, debe basar el elemento del mismo nivel en FrameworkElementAutomationPeer. Aunque la clase propietaria no sea necesariamente un FrameworkElement, no puede derivar prácticamente elementos del mismo nivel desde AutomationPeer directamente porque FrameworkElementAutomationPeer tiene muchas invalidaciones que proporcionan el comportamiento esperado para el diseño, la automatización y las interacciones de la interfaz de usuario. Necesita derivar la clase propietaria al menos de UIElement; de lo contrario, no hay ninguna forma de crear el elemento del mismo nivel en la carga del árbol de automatización con OnCreateAutomationPeer.

Ejemplos

En este ejemplo se muestran los requisitos básicos de subclase para derivar un elemento del mismo nivel de FrameworkElementAutomationPeer y admitir al menos un patrón de control. El código siguiente es un extracto del ejemplo de accesibilidad de contenido 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 ...
        }


Requisitos

Cliente mínimo admitido

Windows 8 [Solo aplicaciones de la Tienda Windows]

Servidor mínimo admitido

Windows Server 2012 [Solo aplicaciones de la Tienda Windows]

Espacio de nombres

Windows.UI.Xaml.Automation.Peers
Windows::UI::Xaml::Automation::Peers [C++]

Metadatos

Windows.winmd

Vea también

FrameworkElement
Objetos de automatización del mismo nivel personalizados
AutomationPeer
Ejemplo de accesibilidad de XAML

 

 

Mostrar:
© 2018 Microsoft