CoreAutomationRegistrar.RegisterAnnotationType(Guid) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a custom annotation type for text ranges.
public:
static AutomationAnnotationTypeRegistration RegisterAnnotationType(Platform::Guid guid);
static AutomationAnnotationTypeRegistration RegisterAnnotationType(winrt::guid const& guid);
public static AutomationAnnotationTypeRegistration RegisterAnnotationType(Guid guid);
function registerAnnotationType(guid)
Public Shared Function RegisterAnnotationType (guid As Guid) As AutomationAnnotationTypeRegistration
Parameters
- guid
-
Guid
Platform::Guid
winrt::guid
The GUID that represents the custom annotation type. This must be the same as the GUID used by the UI Automation provider.
Returns
An object that provides an ID corresponding to the GUID registered for use in other UIA APIs that require an annotation ID.
Remarks
Both the UI Automation (UIA) provider and client call this method to register a custom annotation type. The guid must be the same for both.
The same annotation type GUID can be registered more than once on the same process. An identical registration is returned if called on a GUID that is already registered. UnregisterAnnotationType(Windows.UI.UIAutomation.Core.AutomationAnnotationTypeRegistration) must still be called once for each call to this method, even if the same GUID is registered multiple times.
An annotation type registration lasts as long as the process for which it was registered or until UnregisterAnnotationType(Windows.UI.UIAutomation.Core.AutomationAnnotationTypeRegistration) is called.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for