IValueProvider IValueProvider IValueProvider Interface

Exposes methods and properties to support access by a Microsoft UI Automation client to controls that have an intrinsic value that does not span a range and that can be represented as a string. Implement this interface in order to support the capabilities that an automation client requests with a GetPattern(Windows.UI.Xaml.Automation.Peers.PatternInterface) call and PatternInterface.

Syntax

Declaration

public interface IValueProviderpublic interface IValueProviderPublic Interface IValueProvider

Remarks

The value string can be editable, depending on the control and its settings. This pattern has guidelines and conventions that aren't fully documented here. For more info on what this pattern is for, see Value Control Pattern.

IValueProvider is implemented by the existing Windows Runtime class ComboBoxAutomationPeer.

The text models supported by Windows Runtime text controls such as TextBox and RichTextBlock don't use the IValueProvider pattern.

Use ValuePatternIdentifiers if you want to reference the IValueProvider pattern properties from control code when you fire automation events or call RaisePropertyChangedEvent(Windows.UI.Xaml.Automation.AutomationProperty,System.Object,System.Object).

Properties summary

Gets a value that indicates whether the value of a control is read-only.

Gets the value of the control.

Methods summary

Sets the value of a control.

Properties

  • IsReadOnly
    IsReadOnly
    IsReadOnly
    IsReadOnly

    Gets a value that indicates whether the value of a control is read-only.

    public bool IsReadOnly { get; }public bool IsReadOnly { get; }Public ReadOnly Property IsReadOnly As bool

    Property Value

    • bool
      bool
      bool

      true if the value is read-only; false if it can be modified.

  • Value
    Value
    Value
    Value

    Gets the value of the control.

    public string Value { get; }public string Value { get; }Public ReadOnly Property Value As string

    Property Value

    • string
      string
      string

      The value of the control.

Methods

  • SetValue(System.String)
    SetValue(System.String)
    SetValue(System.String)
    SetValue(System.String)

    Sets the value of a control.

    public void SetValue(System.String)public void SetValue(System.String)Public Function SetValue(System.String) As void

    Parameters

    • value
      System.String
      System.String
      System.String

      The value to set. The provider is responsible for converting the value to the appropriate data type.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.GuidAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.UI.Xaml.Automation.Provider.dll