Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
b5884e4c
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b5884e4c
编写于
1月 09, 2017
作者:
D
David Poeschl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make the General Code Style & Naming Style options pages accessible
Fixes #13579 Fixes #13099 Fixes for tabbing and Narrator.
上级
d84a8496
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
105 addition
and
5 deletion
+105
-5
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
+27
-0
src/VisualStudio/Core/Def/ServicesVSResources.resx
src/VisualStudio/Core/Def/ServicesVSResources.resx
+9
-0
src/VisualStudio/Core/Impl/Options/ColumnToTabStopConverter.cs
...isualStudio/Core/Impl/Options/ColumnToTabStopConverter.cs
+22
-0
src/VisualStudio/Core/Impl/Options/GridOptionPreviewControl.xaml
...ualStudio/Core/Impl/Options/GridOptionPreviewControl.xaml
+19
-1
src/VisualStudio/Core/Impl/Options/Style/NamingPreferences/NamingStyleOptionPageControl.xaml
...Style/NamingPreferences/NamingStyleOptionPageControl.xaml
+21
-3
src/VisualStudio/Core/Impl/Options/Style/NamingPreferences/NamingStyleOptionPageViewModel.cs
...Style/NamingPreferences/NamingStyleOptionPageViewModel.cs
+5
-0
src/VisualStudio/Core/Impl/ServicesVisualStudioImpl.csproj
src/VisualStudio/Core/Impl/ServicesVisualStudioImpl.csproj
+2
-1
未找到文件。
src/VisualStudio/Core/Def/ServicesVSResources.Designer.cs
浏览文件 @
b5884e4c
...
...
@@ -1186,6 +1186,24 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Move down.
/// </summary>
internal
static
string
Move_down
{
get
{
return
ResourceManager
.
GetString
(
"Move_down"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Move up.
/// </summary>
internal
static
string
Move_up
{
get
{
return
ResourceManager
.
GetString
(
"Move_up"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Name:.
/// </summary>
...
...
@@ -1679,6 +1697,15 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to Remove.
/// </summary>
internal
static
string
Remove
{
get
{
return
ResourceManager
.
GetString
(
"Remove"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Remove {0}.
/// </summary>
...
...
src/VisualStudio/Core/Def/ServicesVSResources.resx
浏览文件 @
b5884e4c
...
...
@@ -858,4 +858,13 @@ Additional information: {1}</value>
<data
name=
"Get_help_for_0_from_Bing"
xml:space=
"preserve"
>
<value>
Get help for '{0}' from Bing
</value>
</data>
<data
name=
"Move_down"
xml:space=
"preserve"
>
<value>
Move down
</value>
</data>
<data
name=
"Move_up"
xml:space=
"preserve"
>
<value>
Move up
</value>
</data>
<data
name=
"Remove"
xml:space=
"preserve"
>
<value>
Remove
</value>
</data>
</root>
\ No newline at end of file
src/VisualStudio/Core/Impl/Options/ColumnToTabStopConverter.cs
0 → 100644
浏览文件 @
b5884e4c
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
System.Globalization
;
using
System.Windows.Controls
;
using
Microsoft.VisualStudio.PlatformUI
;
namespace
Microsoft.VisualStudio.LanguageServices.Implementation.Options
{
/// <summary>
/// DataGridTemplateColumns have custom controls that should be focused instead of the cell.
/// </summary>
internal
class
ColumnToTabStopConverter
:
ValueConverter
<
DataGridColumn
,
bool
>
{
protected
override
bool
Convert
(
DataGridColumn
value
,
object
parameter
,
CultureInfo
culture
)
{
// We use DataGridTemplateColumns in our options grids to contain controls (as opposed
// to plain text in DataGridTextColumns). We want the tab stop to be on the contained
// control and not the cell itself, so don't have DataGridTemplateColumns be tab stops.
return
!(
value
is
DataGridTemplateColumn
);
}
}
}
src/VisualStudio/Core/Impl/Options/GridOptionPreviewControl.xaml
浏览文件 @
b5884e4c
...
...
@@ -15,11 +15,17 @@
<Grid>
<Grid.Resources>
<options:ColumnToTabStopConverter x:Key="ColumnToTabStopConverter" />
<Style x:Key="DataGridStyle" TargetType="DataGrid">
<Setter Property="CellStyle">
<Setter.Value>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="IsTabStop"
Value="{Binding
Path=Column,
Converter={StaticResource ColumnToTabStopConverter},
RelativeSource={RelativeSource Self}}"/>
</Style>
</Setter.Value>
</Setter>
...
...
@@ -93,6 +99,7 @@
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="AutomationProperties.Name" Value="{Binding GroupName}" />
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
...
...
@@ -107,7 +114,13 @@
DisplayMemberPath="Name"
SelectedItem="{Binding SelectedPreference, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Left"/>
HorizontalContentAlignment="Left">
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem">
<Setter Property="AutomationProperties.Name" Value="{Binding Name}" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
...
...
@@ -142,6 +155,11 @@
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem">
<Setter Property="AutomationProperties.Name" Value="{Binding Name}" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
...
...
src/VisualStudio/Core/Impl/Options/Style/NamingPreferences/NamingStyleOptionPageControl.xaml
浏览文件 @
b5884e4c
...
...
@@ -23,6 +23,7 @@
<Setter.Value>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="IsTabStop" Value="False" />
</Style>
</Setter.Value>
</Setter>
...
...
@@ -158,7 +159,13 @@
SelectedItem="{Binding SelectedSpecification, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Left"
ToolTip="{Binding Path=SelectedItem.Name, RelativeSource={RelativeSource Self}}"/>
ToolTip="{Binding Path=SelectedItem.Name, RelativeSource={RelativeSource Self}}">
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem">
<Setter Property="AutomationProperties.Name" Value="{Binding Name}" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
...
...
@@ -176,6 +183,11 @@
VerticalContentAlignment="Center"
HorizontalContentAlignment="Left"
ToolTip="{Binding Path=SelectedItem.Name, RelativeSource={RelativeSource Self}}">
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem">
<Setter Property="AutomationProperties.Name" Value="{Binding Name}" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
...
...
@@ -211,6 +223,11 @@
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem">
<Setter Property="AutomationProperties.Name" Value="{Binding Name}" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
...
...
@@ -219,14 +236,15 @@
Width="30">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Click="RemoveButton_Click"
<Button Click="RemoveButton_Click"
Height="16"
Width="16"
Margin="5, 0, 0, 0"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center">
VerticalAlignment="Center"
AutomationProperties.Name="{Binding RemoveAutomationText}">
<imaging:CrispImage Moniker="{x:Static imagecatalog:KnownMonikers.DeleteListItem}" />
</Button>
</DataTemplate>
...
...
src/VisualStudio/Core/Impl/Options/Style/NamingPreferences/NamingStyleOptionPageViewModel.cs
浏览文件 @
b5884e4c
...
...
@@ -275,6 +275,11 @@ public bool CanMoveDown
}
}
public
string
MoveUpAutomationText
=>
ServicesVSResources
.
Move_up
;
public
string
MoveDownAutomationText
=>
ServicesVSResources
.
Move_down
;
public
string
RemoveAutomationText
=>
ServicesVSResources
.
Remove
;
public
bool
IsComplete
()
{
return
SelectedSpecification
!=
null
&&
SelectedStyle
!=
null
&&
SelectedNotificationPreference
!=
null
;
...
...
src/VisualStudio/Core/Impl/ServicesVisualStudioImpl.csproj
浏览文件 @
b5884e4c
...
...
@@ -210,6 +210,7 @@
<Compile
Include=
"Options\AbstractCodeStyleOptionViewModel.cs"
/>
<Compile
Include=
"Options\BooleanCodeStyleOptionViewModel.cs"
/>
<Compile
Include=
"Options\CodeStylePreference.cs"
/>
<Compile
Include=
"Options\ColumnToTabStopConverter.cs"
/>
<Compile
Include=
"Options\Converters\MarginConverter.cs"
/>
<Compile
Include=
"Options\SimpleCodeStyleOptionViewModel.cs"
/>
<Compile
Include=
"Options\AbstractCheckBoxViewModel.cs"
/>
...
...
@@ -287,4 +288,4 @@
</ItemGroup>
<ItemGroup
/>
<Import
Project=
"..\..\..\..\build\Targets\Imports.targets"
/>
</Project>
</Project>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录