Export (0) Print
Expand All

IValueProvider.Value Property

Gets the value of the control.

Namespace: System.Windows.Automation.Provider
Assembly: UIAutomationProvider (in uiautomationprovider.dll)

string Value { get; }
/** @property */
String get_Value ()

function get Value () : String

Not applicable.

Property Value

The value of the control as a string.

Single-line edit controls support programmatic access to their contents by implementing IValueProvider (in addition to ITextProvider). However, multi-line edit controls do not implement IValueProvider.

To retrieve the textual contents of multi-line edit controls, the controls must implement ITextProvider. However, ITextProvider does not support setting the value of a control.

IValueProvider does not support the retrieval of formatting information or substring values. Implement ITextProvider in these scenarios.

The following example shows an implementation of this method for a control that allows its value to be retrieved.

/// <summary>
/// Retrieves the value of the custom control.
/// </summary>
string IValueProvider.Value
{
    get
    {
        return controlValue;
    }
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft