Browse Source

Improve automation XML docs. (#17405)

* Add extra docs to AutomationPeer.

Detail the mapping of each individual "property" to win32 and macOS APIs.

* Add extra docs to AutomationProperties.

- Describe which `AutomationPeer` "property" they affect
- Describe which properties currently have no effect

* Add extra docs to automation providers.

Detail the mapping of each individual "property" to win32 and macOS APIs.
pull/17426/head
Steven Kirk 1 year ago
committed by GitHub
parent
commit
b44afa3597
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 120
      src/Avalonia.Controls/Automation/AutomationProperties.cs
  2. 251
      src/Avalonia.Controls/Automation/Peers/AutomationPeer.cs
  3. 8
      src/Avalonia.Controls/Automation/Provider/IEmbeddedRootProvider.cs
  4. 67
      src/Avalonia.Controls/Automation/Provider/IExpandCollapseProvider.cs
  5. 12
      src/Avalonia.Controls/Automation/Provider/IInvokeProvider.cs
  6. 92
      src/Avalonia.Controls/Automation/Provider/IRangeValueProvider.cs
  7. 38
      src/Avalonia.Controls/Automation/Provider/IRootProvider.cs
  8. 96
      src/Avalonia.Controls/Automation/Provider/IScrollProvider.cs
  9. 65
      src/Avalonia.Controls/Automation/Provider/ISelectionItemProvider .cs
  10. 38
      src/Avalonia.Controls/Automation/Provider/ISelectionProvider.cs
  11. 24
      src/Avalonia.Controls/Automation/Provider/IToggleProvider.cs
  12. 38
      src/Avalonia.Controls/Automation/Provider/IValueProvider.cs

120
src/Avalonia.Controls/Automation/AutomationProperties.cs

@ -38,6 +38,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.AcceleratorKey attached property.
/// </summary>
/// <remarks>
/// This property affects the default value for <see cref="AutomationPeer.GetAcceleratorKey"/>.
/// </remarks>
public static readonly AttachedProperty<string?> AcceleratorKeyProperty =
AvaloniaProperty.RegisterAttached<StyledElement, string?>(
"AcceleratorKey",
@ -46,6 +49,11 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.AccessibilityView attached property.
/// </summary>
/// <remarks>
/// The value of this property affects the default value of the
/// <see cref="AutomationPeer.IsContentElement"/> and
/// <see cref="AutomationPeer.IsControlElement"/> properties.
/// </remarks>
public static readonly AttachedProperty<AccessibilityView> AccessibilityViewProperty =
AvaloniaProperty.RegisterAttached<StyledElement, AccessibilityView>(
"AccessibilityView",
@ -54,6 +62,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.AccessKey attached property
/// </summary>
/// <remarks>
/// This property affects the default value for <see cref="AutomationPeer.GetAccessKey"/>.
/// </remarks>
public static readonly AttachedProperty<string?> AccessKeyProperty =
AvaloniaProperty.RegisterAttached<StyledElement, string?>(
"AccessKey",
@ -62,6 +73,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.AutomationId attached property.
/// </summary>
/// <remarks>
/// This property affects the default value for <see cref="AutomationPeer.GetAutomationId"/>.
/// </remarks>
public static readonly AttachedProperty<string?> AutomationIdProperty =
AvaloniaProperty.RegisterAttached<StyledElement, string?>(
"AutomationId",
@ -70,6 +84,10 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.ControlTypeOverride attached property.
/// </summary>
/// <remarks>
/// This property affects the default value for
/// <see cref="AutomationPeer.GetAutomationControlType"/>.
/// </remarks>
public static readonly AttachedProperty<AutomationControlType?> ControlTypeOverrideProperty =
AvaloniaProperty.RegisterAttached<StyledElement, AutomationControlType?>(
"ControlTypeOverride",
@ -78,6 +96,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.HelpText attached property.
/// </summary>
/// <remarks>
/// This property affects the default value for <see cref="AutomationPeer.GetHelpText"/>.
/// </remarks>
public static readonly AttachedProperty<string?> HelpTextProperty =
AvaloniaProperty.RegisterAttached<StyledElement, string?>(
"HelpText",
@ -86,6 +107,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.IsColumnHeader attached property.
/// </summary>
/// <remarks>
/// This property currently has no effect.
/// </remarks>
public static readonly AttachedProperty<bool> IsColumnHeaderProperty =
AvaloniaProperty.RegisterAttached<StyledElement, bool>(
"IsColumnHeader",
@ -95,6 +119,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.IsRequiredForForm attached property.
/// </summary>
/// <remarks>
/// This property currently has no effect.
/// </remarks>
public static readonly AttachedProperty<bool> IsRequiredForFormProperty =
AvaloniaProperty.RegisterAttached<StyledElement, bool>(
"IsRequiredForForm",
@ -104,6 +131,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.IsRowHeader attached property.
/// </summary>
/// <remarks>
/// This property currently has no effect.
/// </remarks>
public static readonly AttachedProperty<bool> IsRowHeaderProperty =
AvaloniaProperty.RegisterAttached<StyledElement, bool>(
"IsRowHeader",
@ -113,6 +143,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.IsOffscreenBehavior attached property.
/// </summary>
/// <remarks>
/// This property affects the default value for <see cref="AutomationPeer.IsOffscreen"/>.
/// </remarks>
public static readonly AttachedProperty<IsOffscreenBehavior> IsOffscreenBehaviorProperty =
AvaloniaProperty.RegisterAttached<StyledElement, IsOffscreenBehavior>(
"IsOffscreenBehavior",
@ -122,6 +155,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.ItemStatus attached property.
/// </summary>
/// <remarks>
/// This property currently has no effect.
/// </remarks>
public static readonly AttachedProperty<string?> ItemStatusProperty =
AvaloniaProperty.RegisterAttached<StyledElement, string?>(
"ItemStatus",
@ -130,6 +166,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.ItemType attached property.
/// </summary>
/// <remarks>
/// This property currently has no effect.
/// </remarks>
public static readonly AttachedProperty<string?> ItemTypeProperty =
AvaloniaProperty.RegisterAttached<StyledElement, string?>(
"ItemType",
@ -138,6 +177,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.LabeledBy attached property.
/// </summary>
/// <remarks>
/// This property affects the default value for <see cref="AutomationPeer.GetLabeledBy"/>.
/// </remarks>
public static readonly AttachedProperty<Control> LabeledByProperty =
AvaloniaProperty.RegisterAttached<StyledElement, Control>(
"LabeledBy",
@ -146,6 +188,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.LiveSetting attached property.
/// </summary>
/// <remarks>
/// This property currently has no effect.
/// </remarks>
public static readonly AttachedProperty<AutomationLiveSetting> LiveSettingProperty =
AvaloniaProperty.RegisterAttached<StyledElement, AutomationLiveSetting>(
"LiveSetting",
@ -155,6 +200,9 @@ namespace Avalonia.Automation
/// <summary>
/// Defines the AutomationProperties.Name attached attached property.
/// </summary>
/// <remarks>
/// This property affects the default value for <see cref="AutomationPeer.GetName"/>.
/// </remarks>
public static readonly AttachedProperty<string?> NameProperty =
AvaloniaProperty.RegisterAttached<StyledElement, string?>(
"Name",
@ -164,6 +212,8 @@ namespace Avalonia.Automation
/// Defines the AutomationProperties.PositionInSet attached property.
/// </summary>
/// <remarks>
/// NOTE: This property currently has no effect.
///
/// The PositionInSet property describes the ordinal location of the element within a set
/// of elements which are considered to be siblings. PositionInSet works in coordination
/// with the SizeOfSet property to describe the ordinal location in the set.
@ -178,6 +228,8 @@ namespace Avalonia.Automation
/// Defines the AutomationProperties.SizeOfSet attached property.
/// </summary>
/// <remarks>
/// NOTE: This property currently has no effect.
///
/// The SizeOfSet property describes the count of automation elements in a group or set
/// that are considered to be siblings. SizeOfSet works in coordination with the PositionInSet
/// property to describe the count of items in the set.
@ -189,7 +241,7 @@ namespace Avalonia.Automation
AutomationSizeOfSetDefault);
/// <summary>
/// Helper for setting AcceleratorKey property on a StyledElement.
/// Helper for setting the value of the <see cref="AcceleratorKeyProperty"/> on a StyledElement.
/// </summary>
public static void SetAcceleratorKey(StyledElement element, string value)
{
@ -198,7 +250,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading AcceleratorKey property from a StyledElement.
/// Helper for reading the value of the <see cref="AcceleratorKeyProperty"/> on a StyledElement.
/// </summary>
public static string? GetAcceleratorKey(StyledElement element)
{
@ -207,7 +259,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting AccessibilityView property on a StyledElement.
/// Helper for setting the value of the <see cref="AccessibilityViewProperty"/> on a StyledElement.
/// </summary>
public static void SetAccessibilityView(StyledElement element, AccessibilityView value)
{
@ -216,7 +268,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading AccessibilityView property from a StyledElement.
/// Helper for reading the value of the <see cref="AccessibilityViewProperty"/> on a StyledElement.
/// </summary>
public static AccessibilityView GetAccessibilityView(StyledElement element)
{
@ -225,7 +277,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting AccessKey property on a StyledElement.
/// Helper for setting the value of the <see cref="AccessKeyProperty"/> on a StyledElement.
/// </summary>
public static void SetAccessKey(StyledElement element, string value)
{
@ -234,7 +286,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading AccessKey property from a StyledElement.
/// Helper for reading the value of the <see cref="AccessKeyProperty"/> on a StyledElement.
/// </summary>
public static string? GetAccessKey(StyledElement element)
{
@ -243,7 +295,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting AutomationId property on a StyledElement.
/// Helper for setting the value of the <see cref="AutomationIdProperty"/> on a StyledElement.
/// </summary>
public static void SetAutomationId(StyledElement element, string? value)
{
@ -252,7 +304,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading AutomationId property from a StyledElement.
/// Helper for reading the value of the <see cref="AutomationIdProperty"/> on a StyledElement.
/// </summary>
public static string? GetAutomationId(StyledElement element)
{
@ -261,7 +313,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting ControlTypeOverride property on a StyledElement.
/// Helper for setting the value of the <see cref="ControlTypeOverrideProperty"/> on a StyledElement.
/// </summary>
public static void SetControlTypeOverride(StyledElement element, AutomationControlType? value)
{
@ -270,7 +322,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading ControlTypeOverride property from a StyledElement.
/// Helper for reading the value of the <see cref="ControlTypeOverrideProperty"/> on a StyledElement.
/// </summary>
public static AutomationControlType? GetControlTypeOverride(StyledElement element)
{
@ -279,7 +331,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting HelpText property on a StyledElement.
/// Helper for setting the value of the <see cref="HelpTextProperty"/> on a StyledElement.
/// </summary>
public static void SetHelpText(StyledElement element, string? value)
{
@ -288,7 +340,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading HelpText property from a StyledElement.
/// Helper for reading the value of the <see cref="HelpTextProperty"/> on a StyledElement.
/// </summary>
public static string? GetHelpText(StyledElement element)
{
@ -297,7 +349,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting IsColumnHeader property on a StyledElement.
/// Helper for setting the value of the <see cref="IsColumnHeaderProperty"/> on a StyledElement.
/// </summary>
public static void SetIsColumnHeader(StyledElement element, bool value)
{
@ -306,7 +358,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading IsColumnHeader property from a StyledElement.
/// Helper for reading the value of the <see cref="IsColumnHeaderProperty"/> on a StyledElement.
/// </summary>
public static bool GetIsColumnHeader(StyledElement element)
{
@ -315,7 +367,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting IsRequiredForForm property on a StyledElement.
/// Helper for setting the value of the <see cref="IsRequiredForFormProperty"/> on a StyledElement.
/// </summary>
public static void SetIsRequiredForForm(StyledElement element, bool value)
{
@ -324,7 +376,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading IsRequiredForForm property from a StyledElement.
/// Helper for reading the value of the <see cref="IsRequiredForFormProperty"/> on a StyledElement.
/// </summary>
public static bool GetIsRequiredForForm(StyledElement element)
{
@ -333,7 +385,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading IsRowHeader property from a StyledElement.
/// Helper for reading the value of the <see cref="IsRowHeaderProperty"/> on a StyledElement.
/// </summary>
public static bool GetIsRowHeader(StyledElement element)
{
@ -342,7 +394,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting IsRowHeader property on a StyledElement.
/// Helper for setting the value of the <see cref="IsRowHeaderProperty"/> on a StyledElement.
/// </summary>
public static void SetIsRowHeader(StyledElement element, bool value)
{
@ -351,7 +403,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting IsOffscreenBehavior property on a StyledElement.
/// Helper for setting the value of the <see cref="IsOffscreenBehaviorProperty"/> on a StyledElement.
/// </summary>
public static void SetIsOffscreenBehavior(StyledElement element, IsOffscreenBehavior value)
{
@ -360,7 +412,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading IsOffscreenBehavior property from a StyledElement.
/// Helper for reading the value of the <see cref="IsOffscreenBehaviorProperty"/> on a StyledElement.
/// </summary>
public static IsOffscreenBehavior GetIsOffscreenBehavior(StyledElement element)
{
@ -369,7 +421,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting ItemStatus property on a StyledElement.
/// Helper for setting the value of the <see cref="ItemStatusProperty"/> on a StyledElement.
/// </summary>
public static void SetItemStatus(StyledElement element, string? value)
{
@ -378,7 +430,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading ItemStatus property from a StyledElement.
/// Helper for reading the value of the <see cref="ItemStatusProperty"/> on a StyledElement.
/// </summary>
public static string? GetItemStatus(StyledElement element)
{
@ -387,7 +439,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting ItemType property on a StyledElement.
/// Helper for setting the value of the <see cref="ItemTypeProperty"/> on a StyledElement.
/// </summary>
public static void SetItemType(StyledElement element, string? value)
{
@ -396,7 +448,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading ItemType property from a StyledElement.
/// Helper for reading the value of the <see cref="ItemTypeProperty"/> on a StyledElement.
/// </summary>
public static string? GetItemType(StyledElement element)
{
@ -405,7 +457,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting LabeledBy property on a StyledElement.
/// Helper for setting the value of the <see cref="LabeledByProperty"/> on a StyledElement.
/// </summary>
public static void SetLabeledBy(StyledElement element, Control value)
{
@ -414,7 +466,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading LabeledBy property from a StyledElement.
/// Helper for reading the value of the <see cref="LabeledByProperty"/> on a StyledElement.
/// </summary>
public static Control GetLabeledBy(StyledElement element)
{
@ -423,7 +475,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting LiveSetting property on a StyledElement.
/// Helper for setting the value of the <see cref="LiveSettingProperty"/> on a StyledElement.
/// </summary>
public static void SetLiveSetting(StyledElement element, AutomationLiveSetting value)
{
@ -432,7 +484,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading LiveSetting property from a StyledElement.
/// Helper for reading the value of the <see cref="LiveSettingProperty"/> on a StyledElement.
/// </summary>
public static AutomationLiveSetting GetLiveSetting(StyledElement element)
{
@ -441,7 +493,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting Name property on a StyledElement.
/// Helper for setting the value of the <see cref="NameProperty"/> on a StyledElement.
/// </summary>
public static void SetName(StyledElement element, string? value)
{
@ -450,7 +502,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading Name property from a StyledElement.
/// Helper for reading the value of the <see cref="NameProperty"/> on a StyledElement.
/// </summary>
public static string? GetName(StyledElement element)
{
@ -459,7 +511,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting PositionInSet property on a StyledElement.
/// Helper for setting the value of the <see cref="PositionInSetProperty"/> on a StyledElement.
/// </summary>
public static void SetPositionInSet(StyledElement element, int value)
{
@ -468,7 +520,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading PositionInSet property from a StyledElement.
/// Helper for reading the value of the <see cref="PositionInSetProperty"/> on a StyledElement.
/// </summary>
public static int GetPositionInSet(StyledElement element)
{
@ -477,7 +529,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for setting SizeOfSet property on a StyledElement.
/// Helper for setting the value of the <see cref="SizeOfSetProperty"/> on a StyledElement.
/// </summary>
public static void SetSizeOfSet(StyledElement element, int value)
{
@ -486,7 +538,7 @@ namespace Avalonia.Automation
}
/// <summary>
/// Helper for reading SizeOfSet property from a StyledElement.
/// Helper for reading the value of the <see cref="SizeOfSetProperty"/> on a StyledElement.
/// </summary>
public static int GetSizeOfSet(StyledElement element)
{

251
src/Avalonia.Controls/Automation/Peers/AutomationPeer.cs

@ -63,99 +63,335 @@ namespace Avalonia.Automation.Peers
/// Gets the accelerator key combinations for the element that is associated with the UI
/// Automation peer.
/// </summary>
/// <remarks>
/// An accelerator key (sometimes called a shortcut key) exposes a key combination for
/// which can be used to invoke an action, for example, an "Open..." menu item on Windows
/// often has an accelerator key of "Ctrl+O".
///
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_AcceleratorKeyPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping</description>
/// </item>
/// </list>
/// </remarks>
public string? GetAcceleratorKey() => GetAcceleratorKeyCore();
/// <summary>
/// Gets the access key for the element that is associated with the automation peer.
/// </summary>
/// <remarks>
/// An access key (sometimes called a mnemonic) is a character in the text of a menu, menu
/// item, or label of a control such as a button, that activates the associated function.
/// For example, to open the File menu, for which the access key is typically F, the user
/// would press ALT+F.
///
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_AccessKeyPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping</description>
/// </item>
/// </list>
/// </remarks>
public string? GetAccessKey() => GetAccessKeyCore();
/// <summary>
/// Gets the control type for the element that is associated with the UI Automation peer.
/// </summary>
/// <remarks>
/// Gets the type of the element.
///
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_ControlTypePropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityRole</c></description>
/// </item>
/// </list>
/// </remarks>
public AutomationControlType GetAutomationControlType() => GetControlTypeOverrideCore();
/// <summary>
/// Gets the automation ID of the element that is associated with the UI Automation peer.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_AutomationIdPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityIdentifier</c></description>
/// </item>
/// </list>
/// </remarks>
public string? GetAutomationId() => GetAutomationIdCore();
/// <summary>
/// Gets the bounding rectangle of the element that is associated with the automation peer
/// in top-level coordinates.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRawElementProviderFragment.get_BoundingRectangle</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityFrame</c></description>
/// </item>
/// </list>
/// </remarks>
public Rect GetBoundingRectangle() => GetBoundingRectangleCore();
/// <summary>
/// Gets the child automation peers.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRawElementProviderFragment.Navigate</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityChildren</c></description>
/// </item>
/// </list>
/// </remarks>
public IReadOnlyList<AutomationPeer> GetChildren() => GetOrCreateChildrenCore();
/// <summary>
/// Gets a string that describes the class of the element.
/// </summary>
/// <remarks>
/// A string containing the class name for the automation element as assigned by the
/// control developer. This is often the C# class name of the control.
///
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_ClassNamePropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
public string GetClassName() => GetClassNameCore() ?? string.Empty;
/// <summary>
/// Gets the automation peer for the label that is targeted to the element.
/// </summary>
/// <returns></returns>
/// <remarks>
/// Identifies an automation peer representing an element which that contains the text
/// label for this element.
///
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_LabeledByPropertyId</c> (not yet implemented)</description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityLabelUIElements</c> (not yet implemented)</description>
/// </item>
/// </list>
/// </remarks>
public AutomationPeer? GetLabeledBy() => GetLabeledByCore();
/// <summary>
/// Gets a human-readable localized string that represents the type of the control that is
/// associated with this automation peer.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_LocalizedControlTypePropertyId</c> (not yet implemented)</description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
public string GetLocalizedControlType() => GetLocalizedControlTypeCore();
/// <summary>
/// Gets text that describes the element that is associated with this automation peer.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_NamePropertyId</c> (not yet implemented)</description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// When the control type is <see cref="AutomationControlType.Text"/>, this value is
/// exposed by both <c>NSAccessibilityProtocol.accessibilityTitle</c> and
/// <c>NSAccessibilityProtocol.accessibilityValue</c> .
/// </description>
/// </item>
/// </list>
/// </remarks>
public string GetName() => GetNameCore() ?? string.Empty;
/// <summary>
/// Gets text that provides help for the element that is associated with this automation peer.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_HelpTextPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityHelp</c></description>
/// </item>
/// </list>
/// </remarks>
public string GetHelpText() => GetHelpTextCore() ?? string.Empty;
/// <summary>
/// Gets the <see cref="AutomationPeer"/> that is the parent of this <see cref="AutomationPeer"/>.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRawElementProviderFragment.Navigate</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityParent</c></description>
/// </item>
/// </list>
/// </remarks>
public AutomationPeer? GetParent() => GetParentCore();
/// <summary>
/// Gets the <see cref="AutomationPeer"/> that is the root of this <see cref="AutomationPeer"/>'s
/// visual tree.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description>No mapping, but used internally to translate coordinates.</description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityTopLevelUIElement</c></description>
/// </item>
/// </list>
/// </remarks>
public AutomationPeer? GetVisualRoot() => GetVisualRootCore();
/// <summary>
/// Gets a value that indicates whether the element that is associated with this automation
/// peer currently has keyboard focus.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_HasKeyboardFocusPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.isAccessibilityFocused</c></description>
/// </item>
/// </list>
/// </remarks>
public bool HasKeyboardFocus() => HasKeyboardFocusCore();
/// <summary>
/// Gets a value that indicates whether the element that is associated with this automation
/// peer contains data that is presented to the user.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_IsContentElementPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
public bool IsContentElement() => IsContentElementOverrideCore();
/// <summary>
/// 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.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_IsControlElementPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.isAccessibilityElement</c></description>
/// </item>
/// </list>
/// </remarks>
public bool IsControlElement() => IsControlElementOverrideCore();
/// <summary>
/// Gets a value indicating whether the control is enabled for user interaction.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_IsEnabledPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.isAccessibilityEnabled</c></description>
/// </item>
/// </list>
/// </remarks>
public bool IsEnabled() => IsEnabledCore();
/// <summary>
/// Gets a value that indicates whether the element can accept keyboard focus.
/// </summary>
/// <returns></returns>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_IsKeyboardFocusablePropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
public bool IsKeyboardFocusable() => IsKeyboardFocusableCore();
/// <summary>
@ -166,6 +402,17 @@ namespace Avalonia.Automation.Peers
/// an element is on the screen but is still not visible. For example, if the element is
/// on the screen but obscured by other elements, it might not be visible. In this case,
/// the method returns false.
///
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_IsOffscreenPropertyId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
public bool IsOffscreen() => IsOffscreenCore();

8
src/Avalonia.Controls/Automation/Provider/IEmbeddedRootProvider.cs

@ -4,13 +4,13 @@ using Avalonia.Automation.Peers;
namespace Avalonia.Automation.Provider
{
/// <summary>
/// Exposure methods and properties to support UI Automation client access to the root of an
/// Exposes methods and properties to support UI Automation client access to the root of an
/// automation tree hosted by another UI framework.
/// </summary>
/// <remarks>
/// This interface is implemented by the <see cref="AutomationPeer"/> class, and can be used
/// to embed an automation tree from a 3rd party UI framework that wishes to use Avalonia's
/// automation support.
/// This interface can be implemented by an <see cref="AutomationPeer"/>, and is used to embed
/// an automation tree from a 3rd party UI framework that wishes to use Avalonia's automation
/// support.
/// </remarks>
public interface IEmbeddedRootProvider
{

67
src/Avalonia.Controls/Automation/Provider/IExpandCollapseProvider.cs

@ -1,4 +1,6 @@
namespace Avalonia.Automation.Provider
using Avalonia.Controls;
namespace Avalonia.Automation.Provider
{
/// <summary>
/// Exposes methods and properties to support UI Automation client access to controls that
@ -9,6 +11,18 @@
/// <summary>
/// Gets the state, expanded or collapsed, of the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IExpandCollapseProvider.ExpandCollapseState</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.isAccessibilityExpanded</c></description>
/// </item>
/// </list>
/// </remarks>
ExpandCollapseState ExpandCollapseState { get; }
/// <summary>
@ -16,18 +30,65 @@
/// such as drop-down list.
/// </summary>
/// <remarks>
/// Used in OSX to enable the "Show Menu" action on the element.
/// Used in OSX to allow <c>accessibilityPerformShowMenu</c> to open expandable controls such as a
/// <see cref="ComboBox"/>; in macOS, a combo box drop-down is considered a menu.
///
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description>No mapping.</description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// When true, <c>NSAccessibilityProtocol.accessibilityPerformShowMenu</c> will cause the
/// <see cref="Expand"/> method to be triggered.
/// </description>
/// </item>
/// </list>
/// </remarks>
bool ShowsMenu { get; }
/// <summary>
/// Displays all child nodes, controls, or content of the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IExpandCollapseProvider.Expand</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// Called by setting <c>NSAccessibilityProtocol.setAccessibilityExpanded</c> to
/// true, by calling <c>NSAccessibilityProtocol.accessibilityPerformPress</c>, or
/// by calling <c>NSAccessibilityProtocol.accessibilityPerformShowMenu</c>
/// when <see cref="ShowsMenu"/> is true.
/// </description>
/// </item>
/// </list>
/// </remarks>
void Expand();
/// <summary>
/// Hides all nodes, controls, or content that are descendants of the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IExpandCollapseProvider.Collapse</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// Called by setting <c>NSAccessibilityProtocol.setAccessibilityExpanded</c> to
/// false.
/// </description>
/// </item>
/// </list>
/// </remarks>
void Collapse();
}
}

12
src/Avalonia.Controls/Automation/Provider/IInvokeProvider.cs

@ -10,6 +10,18 @@
/// <summary>
/// Sends a request to activate a control and initiate its single, unambiguous action.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IInvokeProvider.Invoke</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityPerformPress</c></description>
/// </item>
/// </list>
/// </remarks>
void Invoke();
}
}

92
src/Avalonia.Controls/Automation/Provider/IRangeValueProvider.cs

@ -9,39 +9,129 @@
/// <summary>
/// Gets a value that indicates whether the value of a control is read-only.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRangeValueProvider.get_IsReadOnly</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
bool IsReadOnly { get; }
/// <summary>
/// Gets the minimum range value that is supported by the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRangeValueProvider.get_Minimum</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityMinValue</c></description>
/// </item>
/// </list>
/// </remarks>
double Minimum { get; }
/// <summary>
/// Gets the maximum range value that is supported by the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRangeValueProvider.get_Maximum</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityMaxValue</c></description>
/// </item>
/// </list>
/// </remarks>
double Maximum { get; }
/// <summary>
/// Gets the value of the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRangeValueProvider.get_Value</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityValue</c></description>
/// </item>
/// </list>
/// </remarks>
double Value { get; }
/// <summary>
/// Gets the value that is added to or subtracted from the Value property when a large
/// change is made, such as with the PAGE DOWN key.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRangeValueProvider.get_LargeChange</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
double LargeChange { get; }
/// <summary>
/// Gets the value that is added to or subtracted from the Value property when a small
/// change is made, such as with an arrow key.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRangeValueProvider.get_SmallChange</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// Used by <c>NSAccessibilityProtocol.accessibilityPerformIncrement</c> and
/// <c>NSAccessibilityProtocol.accessibilityPerformDecrement</c> to determine the
/// changed value.
/// </description>
/// </item>
/// </list>
/// </remarks>
double SmallChange { get; }
/// <summary>
/// Sets the value of the control.
/// </summary>
/// <param name="value">The value to set.</param>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRangeValueProvider.SetValue</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// <c>NSAccessibilityProtocol.setAccessibilityValue</c> (not implemented)
/// </description>
/// </item>
/// </list>
/// </remarks>
public void SetValue(double value);
}
}

38
src/Avalonia.Controls/Automation/Provider/IRootProvider.cs

@ -23,17 +23,55 @@ namespace Avalonia.Automation.Provider
/// <summary>
/// Gets the currently focused element.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IRawElementProviderFragmentRoot.GetFocus</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>UIAccessibility.accessibilityFocusedUIElement</c></description>
/// </item>
/// </list>
/// </remarks>
AutomationPeer? GetFocus();
/// <summary>
/// Gets the element at the specified point, expressed in top-level coordinates.
/// </summary>
/// <param name="p">The point.</param>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description>
/// <c>IRawElementProviderFragmentRoot.ElementProviderFromPoint</c>
/// </description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>UIAccessibility.accessibilityHitTest</c></description>
/// </item>
/// </list>
/// </remarks>
AutomationPeer? GetPeerFromPoint(Point p);
/// <summary>
/// Raised by the automation peer when the focus changes.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>UIA_AutomationFocusChangedEventId</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityFocusedUIElementChangedNotification</c></description>
/// </item>
/// </list>
/// </remarks>
event EventHandler? FocusChanged;
}
}

96
src/Avalonia.Controls/Automation/Provider/IScrollProvider.cs

@ -18,31 +18,103 @@
/// <summary>
/// Gets a value that indicates whether the control can scroll horizontally.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.HorizontallyScrollable</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
bool HorizontallyScrollable { get; }
/// <summary>
/// Gets the current horizontal scroll position.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.HorizontalScrollPercent</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
double HorizontalScrollPercent { get; }
/// <summary>
/// Gets the current horizontal view size.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.HorizontalViewSize</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
double HorizontalViewSize { get; }
/// <summary>
/// Gets a value that indicates whether the control can scroll vertically.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.VerticallyScrollable</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
bool VerticallyScrollable { get; }
/// <summary>
/// Gets the current vertical scroll position.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.VerticalScrollPercent</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
double VerticalScrollPercent { get; }
/// <summary>
/// Gets the vertical view size.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.VerticalViewSize</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
double VerticalViewSize { get; }
/// <summary>
@ -50,6 +122,18 @@
/// </summary>
/// <param name="horizontalAmount">The horizontal increment specific to the control.</param>
/// <param name="verticalAmount">The vertical increment specific to the control.</param>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.Scroll</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
void Scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount);
/// <summary>
@ -66,6 +150,18 @@
/// <see cref="ScrollPatternIdentifiers.NoScroll"/> should be passed in if the control
/// cannot be scrolled in this direction.
/// </param>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IScrollProvider.SetScrollPercent</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
void SetScrollPercent(double horizontalPercent, double verticalPercent);
}
}

65
src/Avalonia.Controls/Automation/Provider/ISelectionItemProvider .cs

@ -9,27 +9,92 @@
/// <summary>
/// Gets a value that indicates whether an item is selected.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionItemProvider.IsSelected</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.isAccessibilitySelected</c></description>
/// </item>
/// </list>
/// </remarks>
bool IsSelected { get; }
/// <summary>
/// Gets the UI Automation provider that implements <see cref="ISelectionProvider"/> and
/// acts as the container for the calling object.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionItemProvider.SelectionContainer</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
ISelectionProvider? SelectionContainer { get; }
/// <summary>
/// Adds the current element to the collection of selected items.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionItemProvider.AddToSelection</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// <c>NSAccessibilityProtocol.accessibilityPerformPick</c> (not implemented).
/// <c>NSAccessibilityProtocol.setAccessibilitySelected</c> (not implemented).
/// </description>
/// </item>
/// </list>
/// </remarks>
void AddToSelection();
/// <summary>
/// Removes the current element from the collection of selected items.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionItemProvider.RemoveFromSelection</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// <c>NSAccessibilityProtocol.setAccessibilitySelected</c> (not implemented).
/// </description>
/// </item>
/// </list>
/// </remarks>
void RemoveFromSelection();
/// <summary>
/// Clears any existing selection and then selects the current element.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionItemProvider.Select</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
void Select();
}
}

38
src/Avalonia.Controls/Automation/Provider/ISelectionProvider.cs

@ -13,17 +13,55 @@ namespace Avalonia.Automation.Provider
/// Gets a value that indicates whether the provider allows more than one child element
/// to be selected concurrently.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionProvider.CanSelectMultiple</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
bool CanSelectMultiple { get; }
/// <summary>
/// Gets a value that indicates whether the provider requires at least one child element
/// to be selected.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionProvider.IsSelectionRequired</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
bool IsSelectionRequired { get; }
/// <summary>
/// Retrieves a provider for each child element that is selected.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>ISelectionProvider.GetSelection</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// <c>NSAccessibilityProtocol.accessibilitySelectedChildren</c> (not implemented).
/// </description>
/// </item>
/// </list>
/// </remarks>
IReadOnlyList<AutomationPeer> GetSelection();
}
}

24
src/Avalonia.Controls/Automation/Provider/IToggleProvider.cs

@ -30,11 +30,35 @@
/// <summary>
/// Gets the toggle state of the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IToggleProvider.ToggleState</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityValue</c></description>
/// </item>
/// </list>
/// </remarks>
ToggleState ToggleState { get; }
/// <summary>
/// Cycles through the toggle states of a control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IToggleProvider.Toggle</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityPerformPress</c></description>
/// </item>
/// </list>
/// </remarks>
void Toggle();
}
}

38
src/Avalonia.Controls/Automation/Provider/IValueProvider.cs

@ -10,11 +10,35 @@
/// <summary>
/// Gets a value that indicates whether the value of a control is read-only.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IValueProvider.IsReadOnly</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>No mapping.</description>
/// </item>
/// </list>
/// </remarks>
bool IsReadOnly { get; }
/// <summary>
/// Gets the value of the control.
/// </summary>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IValueProvider.Value</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description><c>NSAccessibilityProtocol.accessibilityValue</c></description>
/// </item>
/// </list>
/// </remarks>
public string? Value { get; }
/// <summary>
@ -24,6 +48,20 @@
/// The value to set. The provider is responsible for converting the value to the
/// appropriate data type.
/// </param>
/// <remarks>
/// <list type="table">
/// <item>
/// <term>Windows</term>
/// <description><c>IValueProvider.SetValue</c></description>
/// </item>
/// <item>
/// <term>macOS</term>
/// <description>
/// <c>NSAccessibilityProtocol.setAccessibilityValue</c> (not implemented)
/// </description>
/// </item>
/// </list>
/// </remarks>
public void SetValue(string? value);
}
}

Loading…
Cancel
Save