Imported Upstream version 5.10.0.47

Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-01-24 17:04:36 +00:00
parent 88ff76fe28
commit e46a49ecf1
5927 changed files with 226314 additions and 129848 deletions

View File

@ -14,6 +14,7 @@ namespace System.ServiceModel.Activities.Presentation
using System.ServiceModel.Dispatcher;
using System.Text;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Input;
using System.Xml;
@ -100,6 +101,22 @@ namespace System.ServiceModel.Activities.Presentation
base.OnKeyDown(e);
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
if (!LocalAppContextSwitches.UseLegacyAccessibilityFeatures)
{
this.SetValue(AutomationProperties.NameProperty, this.Resources["MessageQueryEditorAutomationName"]);
if (this.IsEditable && this.Template != null)
{
var textBox = this.Template.FindName("PART_EditableTextBox", this) as TextBox;
if (textBox != null)
{
textBox.SetValue(AutomationProperties.NameProperty, this.GetValue(AutomationProperties.NameProperty));
}
}
}
}
//user double clicked on the expanded type, create a xpath
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes",
Justification = "Propagating exceptions might lead to VS crash.")]