Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,11 @@ private bool ProtectedError
set { richTextBoxFlags[protectedErrorSection] = value ? 1 : 0; }
}

private protected override void RaiseAccessibilityTextChangedEvent()
{
// Do not do anything because Win32 provides unmanaged Text pattern for RichTextBox
}

/// <summary>
/// Returns the name of the action that will be performed if the user
/// Redo's their last Undone operation. If no operation can be redone,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// 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.

Expand Down Expand Up @@ -1608,8 +1608,16 @@ protected override void OnTextChanged(EventArgs e)
// the text changes.
CommonProperties.xClearPreferredSizeCache(this);
base.OnTextChanged(e);

if (UiaCore.UiaClientsAreListening().IsTrue())
{
RaiseAccessibilityTextChangedEvent();
}
}

private protected virtual void RaiseAccessibilityTextChangedEvent()
=> AccessibilityObject.RaiseAutomationEvent(UiaCore.UIA.Text_TextChangedEventId);

/// <summary>
/// Returns the character nearest to the given point.
/// </summary>
Expand Down