diff --git a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationTypes-ref.baseline.txt b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationTypes-ref.baseline.txt index fcc74cf8643..8ed9571b271 100644 --- a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationTypes-ref.baseline.txt +++ b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationTypes-ref.baseline.txt @@ -1 +1,4 @@ -Total Issues: 0 +Compat issues with assembly UIAutomationTypes: +CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderSimple' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITextRangeProvider' in the contract but not the implementation. +Total Issues: 2 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs index 2dc14212e09..727f3992bae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs @@ -71,7 +71,9 @@ private static bool IsKnownLegacyEvent(int id) [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] private static bool IsKnownNewEvent(int id) { - if (id == AutomationElementIdentifiers.LiveRegionChangedEvent?.Id) + if ( id == AutomationElementIdentifiers.LiveRegionChangedEvent?.Id + || id == AutomationElementIdentifiers.NotificationEvent?.Id + || id == AutomationElementIdentifiers.ActiveTextPositionChangedEvent?.Id) { return true; } @@ -117,6 +119,8 @@ private static AutomationEvent GetRegisteredEventObjectHelper(AutomationEvents e case AutomationEvents.InputReachedOtherElement: eventObject = SynchronizedInputPatternIdentifiers.InputReachedOtherElementEvent; break; case AutomationEvents.InputDiscarded: eventObject = SynchronizedInputPatternIdentifiers.InputDiscardedEvent; break; case AutomationEvents.LiveRegionChanged: eventObject = AutomationElementIdentifiers.LiveRegionChangedEvent; break; + case AutomationEvents.Notification: eventObject = AutomationElementIdentifiers.NotificationEvent; break; + case AutomationEvents.ActiveTextPositionChanged: eventObject = AutomationElementIdentifiers.ActiveTextPositionChangedEvent; break; default: throw new ArgumentException(SR.Get(SRID.Automation_InvalidEventId), "eventId"); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs index 7a53918c9e7..2bc28b44fb5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs @@ -209,6 +209,10 @@ public enum AutomationEvents InputDiscarded, /// LiveRegionChanged, + /// + Notification, + /// + ActiveTextPositionChanged, } @@ -371,6 +375,29 @@ public void RaiseAsyncContentLoadedEvent(AsyncContentLoadedEventArgs args) } } + /// + /// This method is called by implementation of the peer to raise the automation "notification" event + /// + // Never inline, as we don't want to unnecessarily link the automation DLL. + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void RaiseNotificationEvent(AutomationNotificationKind notificationKind, + AutomationNotificationProcessing notificationProcessing, + string displayString, + string activityId) + { + if (EventMap.HasRegisteredEvent(AutomationEvents.Notification)) + { + IRawElementProviderSimple provider = ProviderFromPeer(this); + if (provider != null) + { + AutomationInteropProvider.RaiseAutomationEvent( + AutomationElementIdentifiers.NotificationEvent, + provider, + new NotificationEventArgs(notificationKind, notificationProcessing, displayString, activityId)); + } + } + } + internal static void RaiseFocusChangedEventHelper(IInputElement newFocus) { // Callers have only checked if automation clients are present so filter for any interest in this particular event. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/ref/PresentationCore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/ref/PresentationCore.cs index 6401369209b..e1910f9f670 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/ref/PresentationCore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/ref/PresentationCore.cs @@ -2268,6 +2268,8 @@ public enum AutomationEvents InputReachedOtherElement = 16, InputDiscarded = 17, LiveRegionChanged = 18, + Notification = 19, + ActiveTextPositionChanged = 20, } public enum AutomationOrientation { @@ -2350,6 +2352,7 @@ public void InvalidatePeer() { } protected internal System.Windows.Automation.Provider.IRawElementProviderSimple ProviderFromPeer(System.Windows.Automation.Peers.AutomationPeer peer) { throw null; } public void RaiseAsyncContentLoadedEvent(System.Windows.Automation.AsyncContentLoadedEventArgs args) { } public void RaiseAutomationEvent(System.Windows.Automation.Peers.AutomationEvents eventId) { } + public void RaiseNotificationEvent(System.Windows.Automation.AutomationNotificationKind notificationKind, System.Windows.Automation.AutomationNotificationProcessing notificationProcessing, string displayString, string activityId) { } public void RaisePropertyChangedEvent(System.Windows.Automation.AutomationProperty property, object oldValue, object newValue) { } public void ResetChildrenCache() { } public void SetFocus() { } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs index 6213b0feefa..161c8476ea2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/ContentTextAutomationPeer.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; // List using System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; // ITextPointer +using MS.Internal.Automation; // EventMap namespace System.Windows.Automation.Peers { @@ -25,6 +26,36 @@ protected ContentTextAutomationPeer(FrameworkContentElement owner) : base(owner) { } + /// + /// This method is called by implementation of the peer to raise the automation "ActiveTextPositionChanged" event + /// + // Never inline, as we don't want to unnecessarily link the automation DLL. + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) + { + if (EventMap.HasRegisteredEvent(AutomationEvents.ActiveTextPositionChanged)) + { + IRawElementProviderSimple provider = ProviderFromPeer(this); + if (provider != null) + { + ActiveTextPositionChangedEventArgs args = new ActiveTextPositionChangedEventArgs(TextRangeFromTextPointers(rangeStart, rangeEnd)); + AutomationInteropProvider.RaiseAutomationEvent( + AutomationElementIdentifiers.ActiveTextPositionChangedEvent, + provider, + args); + } + } + } + + /// + /// Convert TextPointers to ITextRangeProvider + /// + private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd) + { + TextAdaptor textAdaptor = GetPattern(PatternInterface.Text) as TextAdaptor; + return textAdaptor?.TextRangeFromTextPointers(rangeStart, rangeEnd); + } + /// /// Maps AutomationPeer to provider object. /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs index f18a6e05f64..82d72a6cbcd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Automation/Peers/TextAutomationPeer.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; // List using System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; // ITextPointer +using MS.Internal.Automation; // EventMap, TextAdaptor namespace System.Windows.Automation.Peers { @@ -24,6 +25,36 @@ protected TextAutomationPeer(FrameworkElement owner) : base(owner) {} + /// + /// This method is called by implementation of the peer to raise the automation "ActiveTextPositionChanged" event + /// + // Never inline, as we don't want to unnecessarily link the automation DLL. + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public virtual void RaiseActiveTextPositionChangedEvent(TextPointer rangeStart, TextPointer rangeEnd) + { + if (EventMap.HasRegisteredEvent(AutomationEvents.ActiveTextPositionChanged)) + { + IRawElementProviderSimple provider = ProviderFromPeer(this); + if (provider != null) + { + ActiveTextPositionChangedEventArgs args = new ActiveTextPositionChangedEventArgs(TextRangeFromTextPointers(rangeStart, rangeEnd)); + AutomationInteropProvider.RaiseAutomationEvent( + AutomationElementIdentifiers.ActiveTextPositionChangedEvent, + provider, + args); + } + } + } + + /// + /// Convert TextPointers to ITextRangeProvider + /// + private ITextRangeProvider TextRangeFromTextPointers(TextPointer rangeStart, TextPointer rangeEnd) + { + TextAdaptor textAdaptor = GetPattern(PatternInterface.Text) as TextAdaptor; + return textAdaptor?.TextRangeFromTextPointers(rangeStart, rangeEnd); + } + /// /// GetNameCore will return a value matching (in priority order) /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs index 47f35abfbe1..4c919d90d11 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs @@ -284,6 +284,34 @@ internal void ScrollIntoView(ITextPointer start, ITextPointer end, bool alignToT } } + // convert a range given by TextPointers to a UIA TextRange + // (helper method for raising ActiveTextPositionChanged event) + internal ITextRangeProvider TextRangeFromTextPointers(ITextPointer rangeStart, ITextPointer rangeEnd) + { + // special case for the entire range + if (rangeStart == null && rangeEnd == null) + return null; + + // map null into the appropriate endpoint + rangeStart = rangeStart ?? _textContainer.Start; + rangeEnd = rangeEnd ?? _textContainer.End; + + // if either pointer belongs to the wrong tree, return null (meaning "entire range") + if (rangeStart.TextContainer != _textContainer || rangeEnd.TextContainer != _textContainer) + return null; + + // swap the pointers, if necessary + if (rangeStart.CompareTo(rangeEnd) > 0) + { + ITextPointer temp = rangeStart; + rangeStart = rangeEnd; + rangeEnd = rangeStart; + } + + // return the resulting range + return new TextRangeAdaptor(this, rangeStart, rangeEnd, _textPeer); + } + #endregion Internal Methods //------------------------------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs index c79420ba589..56d0358293b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs @@ -2351,6 +2351,7 @@ void System.Windows.Automation.Provider.IValueProvider.SetValue(string val) { } public abstract partial class ContentTextAutomationPeer : System.Windows.Automation.Peers.FrameworkContentElementAutomationPeer { protected ContentTextAutomationPeer(System.Windows.FrameworkContentElement owner) : base (default(System.Windows.FrameworkContentElement)) { } + public virtual void RaiseActiveTextPositionChangedEvent(System.Windows.Documents.TextPointer rangeStart, System.Windows.Documents.TextPointer rangeEnd) { } } public partial class ContextMenuAutomationPeer : System.Windows.Automation.Peers.FrameworkElementAutomationPeer { @@ -3098,6 +3099,7 @@ public abstract partial class TextAutomationPeer : System.Windows.Automation.Pee { protected TextAutomationPeer(System.Windows.FrameworkElement owner) : base (default(System.Windows.FrameworkElement)) { } protected override string GetNameCore() { throw null; } + public virtual void RaiseActiveTextPositionChangedEvent(System.Windows.Documents.TextPointer rangeStart, System.Windows.Documents.TextPointer rangeEnd) { } } public partial class TextBlockAutomationPeer : System.Windows.Automation.Peers.FrameworkElementAutomationPeer { diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/System/Windows/Automation/AutomationElement.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/System/Windows/Automation/AutomationElement.cs index 29bfbc02cfb..1c146f64ee2 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/System/Windows/Automation/AutomationElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/System/Windows/Automation/AutomationElement.cs @@ -282,8 +282,14 @@ internal static AutomationElement Wrap(SafeNodeHandle hnode) /// Event ID: LayoutInvalidated - Indicates that many element locations/extents/offscreenedness have changed. public static readonly AutomationEvent LayoutInvalidatedEvent = AutomationElementIdentifiers.LayoutInvalidatedEvent; + /// Event ID: Notification - used mainly by servers to raise a generic notification. + public static readonly AutomationEvent NotificationEvent = AutomationElementIdentifiers.NotificationEvent; + + /// Event ID: ActiveTextPositionChanged - Indicates that the active position within a text element has changed. + public static readonly AutomationEvent ActiveTextPositionChangedEvent = AutomationElementIdentifiers.ActiveTextPositionChangedEvent; + #endregion Events - + #endregion Public Constants and Readonly Fields @@ -292,7 +298,7 @@ internal static AutomationElement Wrap(SafeNodeHandle hnode) // Public Methods // //------------------------------------------------------ - + #region Public Methods #region Equality diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/ref/UIAutomationClient.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/ref/UIAutomationClient.cs index 862c22d41c7..2923ac6b042 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/ref/UIAutomationClient.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationClient/ref/UIAutomationClient.cs @@ -29,6 +29,7 @@ public sealed partial class AutomationElement internal AutomationElement() { } public static readonly System.Windows.Automation.AutomationProperty AcceleratorKeyProperty; public static readonly System.Windows.Automation.AutomationProperty AccessKeyProperty; + public static readonly System.Windows.Automation.AutomationEvent ActiveTextPositionChangedEvent; public static readonly System.Windows.Automation.AutomationEvent AsyncContentLoadedEvent; public static readonly System.Windows.Automation.AutomationEvent AutomationFocusChangedEvent; public static readonly System.Windows.Automation.AutomationProperty AutomationIdProperty; @@ -80,6 +81,7 @@ internal AutomationElement() { } public static readonly System.Windows.Automation.AutomationEvent MenuOpenedEvent; public static readonly System.Windows.Automation.AutomationProperty NameProperty; public static readonly System.Windows.Automation.AutomationProperty NativeWindowHandleProperty; + public static readonly System.Windows.Automation.AutomationEvent NotificationEvent; public static readonly object NotSupported; public static readonly System.Windows.Automation.AutomationProperty OrientationProperty; public static readonly System.Windows.Automation.AutomationProperty PositionInSetProperty; diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/Forwards.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/Forwards.cs new file mode 100644 index 00000000000..5d182ca6d89 --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/Forwards.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// +// This file specifies type-forwarding attributes, used by both the +// real assembly and the reference assembly. +// + +using System; +using System.Runtime.CompilerServices; + +[assembly: TypeForwardedTo(typeof(System.Windows.Automation.Provider.IRawElementProviderSimple))] +[assembly: TypeForwardedTo(typeof(System.Windows.Automation.Provider.ITextRangeProvider))] +[assembly: TypeForwardedTo(typeof(System.Windows.Automation.Provider.ProviderOptions))] diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/MS/Internal/Automation/UiaCoreProviderApi.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/MS/Internal/Automation/UiaCoreProviderApi.cs index 979fb70bfea..51c16037cec 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/MS/Internal/Automation/UiaCoreProviderApi.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/MS/Internal/Automation/UiaCoreProviderApi.cs @@ -68,6 +68,17 @@ internal static void UiaRaiseAsyncContentLoadedEvent(IRawElementProviderSimple p CheckError(RawUiaRaiseAsyncContentLoadedEvent(provider, asyncContentLoadedState, PercentComplete)); } + internal static void UiaRaiseNotificationEvent(IRawElementProviderSimple provider, + AutomationNotificationKind notificationKind, AutomationNotificationProcessing notificationProcessing, string displayString, string activityId) + { + CheckError(RawUiaRaiseNotificationEvent(provider, notificationKind, notificationProcessing, displayString, activityId)); + } + + internal static void UiaRaiseActiveTextPositionChangedEvent(IRawElementProviderSimple provider, ITextRangeProvider textRange) + { + CheckError(RawUiaRaiseActiveTextPositionChangedEvent(provider, textRange)); + } + internal static bool UiaClientsAreListening() { return RawUiaClientsAreListening(); @@ -124,6 +135,13 @@ private static void CheckError(int hr) [DllImport(DllImport.UIAutomationCore, EntryPoint = "UiaRaiseAsyncContentLoadedEvent", CharSet = CharSet.Unicode)] private static extern int RawUiaRaiseAsyncContentLoadedEvent(IRawElementProviderSimple provider, AsyncContentLoadedState asyncContentLoadedState, double PercentComplete); + [DllImport(DllImport.UIAutomationCore, EntryPoint = "UiaRaiseNotificationEvent", CharSet = CharSet.Unicode)] + private static extern int RawUiaRaiseNotificationEvent(IRawElementProviderSimple provider, + AutomationNotificationKind notificationKind, AutomationNotificationProcessing notificationProcessing, string displayString, string activityId); + + [DllImport(DllImport.UIAutomationCore, EntryPoint = "UiaRaiseActiveTextPositionChangedEvent", CharSet = CharSet.Unicode)] + private static extern int RawUiaRaiseActiveTextPositionChangedEvent(IRawElementProviderSimple provider, ITextRangeProvider textRange); + [DllImport(DllImport.UIAutomationCore, EntryPoint = "UiaClientsAreListening", CharSet = CharSet.Unicode)] private static extern bool RawUiaClientsAreListening(); diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/AutomationInteropProvider.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/AutomationInteropProvider.cs index cc3e5d85e57..0d2d62532a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/AutomationInteropProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/AutomationInteropProvider.cs @@ -133,6 +133,37 @@ public static void RaiseAutomationEvent(AutomationEvent eventId, IRawElementProv UiaCoreProviderApi.UiaRaiseAsyncContentLoadedEvent(provider, asyncArgs.AsyncContentLoadedState, asyncArgs.PercentComplete); return; } + + // PRESHARP will flag this as warning 56506/6506:Parameter 'e' to this public method must be validated: A null-dereference can occur here. + // False positive, e is checked, see above +#pragma warning suppress 6506 + if (e.EventId == AutomationElementIdentifiers.NotificationEvent) + { + NotificationEventArgs notificationArgs = e as NotificationEventArgs; + if (notificationArgs == null) + ThrowInvalidArgument("e"); + + UiaCoreProviderApi.UiaRaiseNotificationEvent(provider, + notificationArgs.NotificationKind, + notificationArgs.NotificationProcessing, + notificationArgs.DisplayString, + notificationArgs.ActivityId); + return; + } + + // PRESHARP will flag this as warning 56506/6506:Parameter 'e' to this public method must be validated: A null-dereference can occur here. + // False positive, e is checked, see above +#pragma warning suppress 6506 + if (e.EventId == AutomationElementIdentifiers.ActiveTextPositionChangedEvent) + { + ActiveTextPositionChangedEventArgs activeTextPositionChangedArgs = e as ActiveTextPositionChangedEventArgs; + if (activeTextPositionChangedArgs == null) + ThrowInvalidArgument("e"); + + UiaCoreProviderApi.UiaRaiseActiveTextPositionChangedEvent(provider, activeTextPositionChangedArgs.TextRange); + return; + } + // PRESHARP will flag this as warning 56506/6506:Parameter 'e' to this public method must be validated: A null-dereference can occur here. // False positive, e is checked, see above #pragma warning suppress 6506 diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/UIAutomationProvider.csproj b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/UIAutomationProvider.csproj index 6950c157975..f6df1ff4e3b 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/UIAutomationProvider.csproj +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/UIAutomationProvider.csproj @@ -21,6 +21,7 @@ Common\System\SR.cs + @@ -35,7 +36,6 @@ - @@ -44,7 +44,6 @@ - diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider-ref.csproj b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider-ref.csproj index 7440f25a270..cacc14338ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider-ref.csproj +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider-ref.csproj @@ -14,6 +14,7 @@ + diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider.cs index b5e8fcdc9e1..1f887facb60 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/ref/UIAutomationProvider.cs @@ -86,13 +86,6 @@ public partial interface IRawElementProviderHwndOverride : System.Windows.Automa { System.Windows.Automation.Provider.IRawElementProviderSimple GetOverrideProviderForHwnd(System.IntPtr hwnd); } - public partial interface IRawElementProviderSimple - { - System.Windows.Automation.Provider.IRawElementProviderSimple HostRawElementProvider { get; } - System.Windows.Automation.Provider.ProviderOptions ProviderOptions { get; } - object GetPatternProvider(int patternId); - object GetPropertyValue(int propertyId); - } public partial interface IScrollItemProvider { void ScrollIntoView(); @@ -147,27 +140,6 @@ public partial interface ITextProvider System.Windows.Automation.Provider.ITextRangeProvider RangeFromChild(System.Windows.Automation.Provider.IRawElementProviderSimple childElement); System.Windows.Automation.Provider.ITextRangeProvider RangeFromPoint(System.Windows.Point screenLocation); } - public partial interface ITextRangeProvider - { - void AddToSelection(); - System.Windows.Automation.Provider.ITextRangeProvider Clone(); - bool Compare(System.Windows.Automation.Provider.ITextRangeProvider range); - int CompareEndpoints(System.Windows.Automation.Text.TextPatternRangeEndpoint endpoint, System.Windows.Automation.Provider.ITextRangeProvider targetRange, System.Windows.Automation.Text.TextPatternRangeEndpoint targetEndpoint); - void ExpandToEnclosingUnit(System.Windows.Automation.Text.TextUnit unit); - System.Windows.Automation.Provider.ITextRangeProvider FindAttribute(int attribute, object value, bool backward); - System.Windows.Automation.Provider.ITextRangeProvider FindText(string text, bool backward, bool ignoreCase); - object GetAttributeValue(int attribute); - double[] GetBoundingRectangles(); - System.Windows.Automation.Provider.IRawElementProviderSimple[] GetChildren(); - System.Windows.Automation.Provider.IRawElementProviderSimple GetEnclosingElement(); - string GetText(int maxLength); - int Move(System.Windows.Automation.Text.TextUnit unit, int count); - void MoveEndpointByRange(System.Windows.Automation.Text.TextPatternRangeEndpoint endpoint, System.Windows.Automation.Provider.ITextRangeProvider targetRange, System.Windows.Automation.Text.TextPatternRangeEndpoint targetEndpoint); - int MoveEndpointByUnit(System.Windows.Automation.Text.TextPatternRangeEndpoint endpoint, System.Windows.Automation.Text.TextUnit unit, int count); - void RemoveFromSelection(); - void ScrollIntoView(bool alignToTop); - void Select(); - } public partial interface IToggleProvider { System.Windows.Automation.ToggleState ToggleState { get; } @@ -212,14 +184,4 @@ public enum NavigateDirection FirstChild = 3, LastChild = 4, } - [System.FlagsAttribute] - public enum ProviderOptions - { - ClientSideProvider = 1, - ServerSideProvider = 2, - NonClientAreaProvider = 4, - OverrideProvider = 8, - ProviderOwnsSetFocus = 16, - UseComThreading = 32, - } } diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/MS/Internal/Automation/AutomationIdentifierConstants.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/MS/Internal/Automation/AutomationIdentifierConstants.cs index 47f7bd402dd..71a380baa13 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/MS/Internal/Automation/AutomationIdentifierConstants.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/MS/Internal/Automation/AutomationIdentifierConstants.cs @@ -34,7 +34,7 @@ static AutomationIdentifierConstants() if (OSVersionHelper.IsOsWindows10RS5OrGreater) { LastSupportedProperty = Properties.IsDialog; - LastSupportedEvent = Events.Changes; + LastSupportedEvent = Events.ActiveTextPositionChanged; LastSupportedPattern = Patterns.CustomNavigation; LastSupportedTextAttribute = TextAttributes.SayAsInterpretAs; LastSupportedControlType = ControlTypes.AppBar; @@ -47,6 +47,14 @@ static AutomationIdentifierConstants() LastSupportedTextAttribute = TextAttributes.SayAsInterpretAs; LastSupportedControlType = ControlTypes.AppBar; } + else if (OSVersionHelper.IsOsWindows10RS3OrGreater) + { + LastSupportedProperty = Properties.Size; + LastSupportedEvent = Events.Notification; + LastSupportedPattern = Patterns.CustomNavigation; + LastSupportedTextAttribute = TextAttributes.SayAsInterpretAs; + LastSupportedControlType = ControlTypes.AppBar; + } else if (OSVersionHelper.IsOsWindows10RS2OrGreater) { LastSupportedProperty = Properties.Size; @@ -332,7 +340,9 @@ internal enum Events DropTarget_Dropped, TextEdit_TextChanged, TextEdit_ConversionTargetChanged, - Changes + Changes, + Notification, + ActiveTextPositionChanged, }; diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/ActiveTextPositionChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/ActiveTextPositionChangedEventArgs.cs new file mode 100644 index 00000000000..9022445ae87 --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/ActiveTextPositionChangedEventArgs.cs @@ -0,0 +1,58 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Description: ActiveTextPositionChangedEventArgs event args class + +using System; +using System.Windows.Automation; +using System.Windows.Automation.Provider; + +namespace System.Windows.Automation +{ + /// + /// ActiveTextPositionChangedEventArgs event args class + /// +#if (INTERNAL_COMPILE) + internal sealed class ActiveTextPositionChangedEventArgs : AutomationEventArgs +#else + public sealed class ActiveTextPositionChangedEventArgs : AutomationEventArgs +#endif + { + //------------------------------------------------------ + // + // Constructors + // + //------------------------------------------------------ + + #region Constructors + + /// + /// Constructor for ActiveTextPositionChanged event args. + /// + /// Specifies the text range where the change occurred, if applicable. + public ActiveTextPositionChangedEventArgs(ITextRangeProvider textRange) + : base(AutomationElementIdentifiers.ActiveTextPositionChangedEvent) + { + TextRange = textRange; + } + + #endregion Constructors + + + //------------------------------------------------------ + // + // Public Properties + // + //------------------------------------------------------ + + #region Public Properties + + /// + /// Returns the text range where the change occurred, if applicable. + /// + public ITextRangeProvider TextRange { get; private set; } + + #endregion Public Properties + } +} diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationElementIdentifiers.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationElementIdentifiers.cs index e31b5ff9839..850fc635ba5 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationElementIdentifiers.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationElementIdentifiers.cs @@ -223,10 +223,15 @@ public static class AutomationElementIdentifiers /// Event ID: Raised when the content of a live region has changed. Supported starting with Windows 8. public static readonly AutomationEvent LiveRegionChangedEvent = AutomationEvent.Register(AutomationIdentifierConstants.Events.LiveRegionChanged, "AutomationElementIdentifiers.LiveRegionChangedEvent"); + /// Event ID: Notification - used mainly by servers to raise a generic notification. + public static readonly AutomationEvent NotificationEvent = AutomationEvent.Register(AutomationIdentifierConstants.Events.Notification, "AutomationElementIdentifiers.NotificationEvent"); + + /// Event ID: ActiveTextPositionChanged - Indicates that the active position within a text element has changed. + public static readonly AutomationEvent ActiveTextPositionChangedEvent = AutomationEvent.Register(AutomationIdentifierConstants.Events.ActiveTextPositionChanged, "AutomationElementIdentifiers.ActiveTextPositionChangedEvent"); #endregion Events - + #endregion Public Constants and Readonly Fields } } diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationNotificationKind.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationNotificationKind.cs new file mode 100644 index 00000000000..bd15833b93a --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationNotificationKind.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// +// Description: Indicates the type of notification when calling AutomationPeer.RaiseNotificationEvent +// + +namespace System.Windows.Automation +{ + /// + /// Indicates the type of notification when calling AutomationPeer.RaiseNotificationEvent + /// + public enum AutomationNotificationKind + { + /// + /// The current element has had something added to it that should be presented to the user. + /// + ItemAdded = 0, + + /// + /// The current element has had something removed from inside it that should be presented to the user. + /// + ItemRemoved = 1, + + /// + /// The current element has a notification that an action was completed. + /// + ActionCompleted = 2, + + /// + /// The current element has a notification that an action was aborted. + /// + ActionAborted = 3, + + /// + /// The current element has a notification not an add, remove, completed, or aborted action. + /// + Other = 4, + } +} diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationNotificationProcessing.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationNotificationProcessing.cs new file mode 100644 index 00000000000..b41c8d6a98d --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/AutomationNotificationProcessing.cs @@ -0,0 +1,52 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// +// Description: Specifies the order in which to process a notification when calling AutomationPeer.RaiseNotificationEvent +// + +namespace System.Windows.Automation +{ + /// + /// Specifies the order in which to process a notification when calling AutomationPeer.RaiseNotificationEvent + /// + public enum AutomationNotificationProcessing + { + /// + /// These notifications should be presented to the user as soon as possible. + /// All of the notifications from this source should be delivered to the user. + /// Warning: Use this in a limited capacity as this style of message could cause a flooding of + /// information to the end user due to the nature of the request to deliver all of the notifications. + /// + ImportantAll = 0, + + /// + /// These notifications should be presented to the user as soon as possible. + /// The most recent notification from this source should be delivered to the user because it supersedes + /// all of the other notifications. + /// + ImportantMostRecent = 1, + + /// + /// These notifications should be presented to the user when possible. + /// All of the notifications from this source should be delivered to the user. + /// + All = 2, + + /// + /// These notifications should be presented to the user when possible. + /// The most recent notification from this source should be delivered to the user because it supersedes + /// all of the other notifications. + /// + MostRecent = 3, + + /// + /// These notifications should be presented to the user when possible. + /// Don’t interrupt the current notification for this one. + /// If new notifications come in from the same source while the current notification is being presented, + /// keep the most recent and ignore the rest until the current processing is completed. + /// Then, use the most recent message as the current message. + /// + CurrentThenMostRecent = 4, + } +} diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/NotificationEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/NotificationEventArgs.cs new file mode 100644 index 00000000000..8965f9969d6 --- /dev/null +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/NotificationEventArgs.cs @@ -0,0 +1,81 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Description: NotificationEventArgs event args class + +using System; +using System.Windows.Automation; + +namespace System.Windows.Automation +{ + /// + /// NotificationEventArgs event args class + /// +#if (INTERNAL_COMPILE) + internal sealed class NotificationEventArgs : AutomationEventArgs +#else + public sealed class NotificationEventArgs : AutomationEventArgs +#endif + { + //------------------------------------------------------ + // + // Constructors + // + //------------------------------------------------------ + + #region Constructors + + /// + /// Constructor for notification event args. + /// + /// Specifies the type of the notification. + /// Specifies the order in which to process the notification. + /// A display string describing the event. + /// A unique non-localized string to identify an action or group of actions. Use this to pass additional information to the event handler. + public NotificationEventArgs(AutomationNotificationKind notificationKind, + AutomationNotificationProcessing notificationProcessing, + string displayString, + string activityId) + : base(AutomationElementIdentifiers.NotificationEvent) + { + NotificationKind = notificationKind; + NotificationProcessing = notificationProcessing; + DisplayString = displayString; + ActivityId = activityId; + } + + #endregion Constructors + + + //------------------------------------------------------ + // + // Public Properties + // + //------------------------------------------------------ + + #region Public Properties + + /// + /// Returns the type of the notification. + /// + public AutomationNotificationKind NotificationKind { get; private set; } + + /// + /// Returns the order in which to process the notification. + /// + public AutomationNotificationProcessing NotificationProcessing { get; private set; } + + /// + /// Returns the the display string of the notification. + /// + public string DisplayString { get; private set; } + + /// + /// Returns the activity ID string of the notification. + /// + public string ActivityId { get; private set; } + + #endregion Public Properties + } +} diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/IRawElementProviderSimple.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/Provider/IRawElementProviderSimple.cs similarity index 100% rename from src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/IRawElementProviderSimple.cs rename to src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/Provider/IRawElementProviderSimple.cs diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/ITextRangeProvider.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/Provider/ITextRangeProvider.cs similarity index 100% rename from src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationProvider/System/Windows/Automation/Provider/ITextRangeProvider.cs rename to src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/System/Windows/Automation/Provider/ITextRangeProvider.cs diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj index 56224cce98b..62fa3358271 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/UIAutomationTypes.csproj @@ -30,12 +30,15 @@ + + + @@ -51,6 +54,7 @@ + @@ -71,6 +75,8 @@ + + diff --git a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/ref/UIAutomationTypes.cs b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/ref/UIAutomationTypes.cs index 455835c5b9d..316b97ba15a 100644 --- a/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/ref/UIAutomationTypes.cs +++ b/src/Microsoft.DotNet.Wpf/src/UIAutomation/UIAutomationTypes/ref/UIAutomationTypes.cs @@ -1,5 +1,10 @@ namespace System.Windows.Automation { + public sealed partial class ActiveTextPositionChangedEventArgs : System.Windows.Automation.AutomationEventArgs + { + public ActiveTextPositionChangedEventArgs(System.Windows.Automation.Provider.ITextRangeProvider textRangeProvider) : base(default(System.Windows.Automation.AutomationEvent)) { } + public System.Windows.Automation.Provider.ITextRangeProvider TextRange { get { throw null; } } + } public sealed partial class AsyncContentLoadedEventArgs : System.Windows.Automation.AutomationEventArgs { public AsyncContentLoadedEventArgs(System.Windows.Automation.AsyncContentLoadedState asyncContentState, double percentComplete) : base (default(System.Windows.Automation.AutomationEvent)) { } @@ -16,6 +21,7 @@ public static partial class AutomationElementIdentifiers { public static readonly System.Windows.Automation.AutomationProperty AcceleratorKeyProperty; public static readonly System.Windows.Automation.AutomationProperty AccessKeyProperty; + public static readonly System.Windows.Automation.AutomationEvent ActiveTextPositionChangedEvent; public static readonly System.Windows.Automation.AutomationEvent AsyncContentLoadedEvent; public static readonly System.Windows.Automation.AutomationEvent AutomationFocusChangedEvent; public static readonly System.Windows.Automation.AutomationProperty AutomationIdProperty; @@ -70,6 +76,7 @@ public static partial class AutomationElementIdentifiers public static readonly System.Windows.Automation.AutomationEvent MenuOpenedEvent; public static readonly System.Windows.Automation.AutomationProperty NameProperty; public static readonly System.Windows.Automation.AutomationProperty NativeWindowHandleProperty; + public static readonly System.Windows.Automation.AutomationEvent NotificationEvent; public static readonly object NotSupported; public static readonly System.Windows.Automation.AutomationProperty OrientationProperty; public static readonly System.Windows.Automation.AutomationProperty PositionInSetProperty; @@ -100,6 +107,22 @@ internal AutomationIdentifier() { } public override bool Equals(object obj) { throw null; } public override int GetHashCode() { throw null; } } + public enum AutomationNotificationKind + { + ItemAdded = 0, + ItemRemoved = 1, + ActionCompleted = 2, + ActionAborted = 3, + Other = 4, + } + public enum AutomationNotificationProcessing + { + ImportantAll = 0, + ImportantMostRecent = 1, + All = 2, + MostRecent = 3, + CurrentThenMostRecent = 4, + } public partial class AutomationPattern : System.Windows.Automation.AutomationIdentifier { internal AutomationPattern() { } @@ -252,6 +275,14 @@ public NoClickablePointException(string message) { } public NoClickablePointException(string message, System.Exception innerException) { } public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } } + public sealed partial class NotificationEventArgs : System.Windows.Automation.AutomationEventArgs + { + public NotificationEventArgs(System.Windows.Automation.AutomationNotificationKind notificationKind, System.Windows.Automation.AutomationNotificationProcessing notificationProcessing, string displayString, string activityId) : base(default(System.Windows.Automation.AutomationEvent)) { } + public string ActivityId { get { throw null; } } + public string DisplayString { get { throw null; } } + public System.Windows.Automation.AutomationNotificationKind NotificationKind { get { throw null; } } + public System.Windows.Automation.AutomationNotificationProcessing NotificationProcessing { get { throw null; } } + } public enum OrientationType { None = 0, @@ -482,6 +513,47 @@ public enum WindowVisualState Minimized = 2, } } +namespace System.Windows.Automation.Provider +{ + public partial interface IRawElementProviderSimple + { + System.Windows.Automation.Provider.IRawElementProviderSimple HostRawElementProvider { get; } + System.Windows.Automation.Provider.ProviderOptions ProviderOptions { get; } + object GetPatternProvider(int patternId); + object GetPropertyValue(int propertyId); + } + public partial interface ITextRangeProvider + { + void AddToSelection(); + System.Windows.Automation.Provider.ITextRangeProvider Clone(); + bool Compare(System.Windows.Automation.Provider.ITextRangeProvider range); + int CompareEndpoints(System.Windows.Automation.Text.TextPatternRangeEndpoint endpoint, System.Windows.Automation.Provider.ITextRangeProvider targetRange, System.Windows.Automation.Text.TextPatternRangeEndpoint targetEndpoint); + void ExpandToEnclosingUnit(System.Windows.Automation.Text.TextUnit unit); + System.Windows.Automation.Provider.ITextRangeProvider FindAttribute(int attribute, object value, bool backward); + System.Windows.Automation.Provider.ITextRangeProvider FindText(string text, bool backward, bool ignoreCase); + object GetAttributeValue(int attribute); + double[] GetBoundingRectangles(); + System.Windows.Automation.Provider.IRawElementProviderSimple[] GetChildren(); + System.Windows.Automation.Provider.IRawElementProviderSimple GetEnclosingElement(); + string GetText(int maxLength); + int Move(System.Windows.Automation.Text.TextUnit unit, int count); + void MoveEndpointByRange(System.Windows.Automation.Text.TextPatternRangeEndpoint endpoint, System.Windows.Automation.Provider.ITextRangeProvider targetRange, System.Windows.Automation.Text.TextPatternRangeEndpoint targetEndpoint); + int MoveEndpointByUnit(System.Windows.Automation.Text.TextPatternRangeEndpoint endpoint, System.Windows.Automation.Text.TextUnit unit, int count); + void RemoveFromSelection(); + void ScrollIntoView(bool alignToTop); + void Select(); + } + [System.FlagsAttribute] + public enum ProviderOptions + { + ClientSideProvider = 1, + ServerSideProvider = 2, + NonClientAreaProvider = 4, + OverrideProvider = 8, + ProviderOwnsSetFocus = 16, + UseComThreading = 32, + } +} namespace System.Windows.Automation.Text { public enum AnimationStyle diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsFormsIntegration/WindowsFormsIntegration.csproj b/src/Microsoft.DotNet.Wpf/src/WindowsFormsIntegration/WindowsFormsIntegration.csproj index 47d08c7d01b..ebad5d94c44 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsFormsIntegration/WindowsFormsIntegration.csproj +++ b/src/Microsoft.DotNet.Wpf/src/WindowsFormsIntegration/WindowsFormsIntegration.csproj @@ -48,6 +48,7 @@ + false