提交 3286ab5a 编写于 作者: R Ravi Chande 提交者: GitHub

Set the AutomationName property of the ListView in the formatting opt… (#18398)

Set the AutomationName property of the ListView in the formatting options pages
上级 a4ba8bbf
......@@ -1322,6 +1322,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Options.
/// </summary>
internal static string Options {
get {
return ResourceManager.GetString("Options", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to or.
/// </summary>
......
......@@ -900,4 +900,7 @@ Additional information: {1}</value>
<data name="VisualStudioWorkspace_TryApplyChanges_cannot_be_called_from_a_background_thread" xml:space="preserve">
<value>VisualStudioWorkspace.TryApplyChanges cannot be called from a background thread.</value>
</data>
<data name="Options" xml:space="preserve">
<value>Options</value>
</data>
</root>
\ No newline at end of file
......@@ -3,6 +3,7 @@
using System;
using System.Linq;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
......@@ -34,6 +35,7 @@ internal OptionPreviewControl(IServiceProvider serviceProvider, Func<OptionSet,
listview.PreviewKeyDown += Options_PreviewKeyDown;
listview.SelectionChanged += Options_SelectionChanged;
listview.SetBinding(ItemsControl.ItemsSourceProperty, new Binding { Path = new PropertyPath(nameof(ViewModel.Items)) });
AutomationProperties.SetName(listview, ServicesVSResources.Options);
listViewContentControl.Content = listview;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册