[]
        
(Showing Draft Content)

C1.WinUI.Core.AutomationProperties.SetEnabled

SetEnabled Method

SetEnabled(DependencyObject, bool?)

Sets the value of the EnabledProperty attached property for a specified dependency object.

Declaration
public static bool SetEnabled(DependencyObject element, bool? value)
Public Shared Function SetEnabled(element As DependencyObject, value As Boolean?) As Boolean
Parameters
Type Name Description
DependencyObject element

The element on which to set the property.

bool? value

The new value indicating whether automation is enabled for the element. When set to null, clears the locally set value of the EnabledProperty, causing the element to revert to the inherited or default value.

Returns
Type Description
bool
Exceptions
Type Condition
ArgumentNullException

Thrown if element is null.