ElementNotEnabledException class

Applies to Windows and Windows Phone

The exception that is thrown when an attempt is made through UI automation to manipulate a control that is not enabled.

Syntax


Public Class ElementNotEnabledException
    Inherits Exception

Members

The ElementNotEnabledException class has these types of members:

Constructors

The ElementNotEnabledException class has these constructors.

ConstructorDescription
ElementNotEnabledException() Initializes a new instance of the ElementNotEnabledException class.
ElementNotEnabledException(String) Initializes a new instance of the ElementNotEnabledException class with a specified error message.
ElementNotEnabledException(String,Exception) Initializes a new instance of the ElementNotEnabledException class with a specified error message and a reference to the inner exception that is the cause of this exception.

 

Events

The ElementNotEnabledException class has these events.

EventDescription
SerializeObjectState (Inherited from Exception)

 

Methods

The ElementNotEnabledException class has these methods. It also inherits methods from the Object class.

MethodDescription
GetBaseException (Inherited from Exception)
GetObjectData (Inherited from Exception)
GetType (Inherited from Exception)
ToString (Inherited from Exception)

 

Properties

The ElementNotEnabledException class has these properties.

PropertyAccess typeDescription

Data

Read-only (Inherited from Exception)

HelpLink

Read/write (Inherited from Exception)

HResult

Read-only (Inherited from Exception)

InnerException

Read-only (Inherited from Exception)

Message

Read-only (Inherited from Exception)

Source

Read/write (Inherited from Exception)

StackTrace

Read-only (Inherited from Exception)

TargetSite

Read-only (Inherited from Exception)

 

Remarks

In general the concept of being enabled for UI automation purposes is tied to the value of the IsEnabled property of the owner control. However, there are other reasons for a peer to throw this exception and for the exception to be forwarded through an automation element, such as reporting information about an owner control that is not a Control class.

Another case where this exception might be thrown is if the client is trying to use the Invoke pattern but the peer is reporting that the element is unable to be invoked. That might be a result of a temporary condition or some general condition that the owner element determines and passes on through its peer.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Automation

Assembly

System.Runtime.WindowsRuntime.UI.Xaml.dll

See also

Custom automation peers

 

 

Show:
© 2014 Microsoft