Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
wpf
提交
4912f487
W
wpf
项目概览
dotNET Platform
/
wpf
12 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wpf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4912f487
编写于
8月 10, 2022
作者:
T
ThomasGoulet73
提交者:
GitHub
8月 10, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace resource constants with properties in System.Windows.Controls.Ribbon (#6834)
Contributes to dotnet/wpf#1
上级
51ba512b
变更
23
显示空白变更内容
内联
并排
Showing
23 changed file
with
70 addition
and
93 deletion
+70
-93
eng/WpfArcadeSdk/tools/SystemResources.props
eng/WpfArcadeSdk/tools/SystemResources.props
+6
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonComboBoxAutomationPeer.cs
.../Windows/Automation/Peers/RibbonComboBoxAutomationPeer.cs
+3
-3
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuButtonAutomationPeer.cs
...indows/Automation/Peers/RibbonMenuButtonAutomationPeer.cs
+6
-6
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemDataAutomationPeer.cs
...dows/Automation/Peers/RibbonMenuItemDataAutomationPeer.cs
+20
-20
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonQuickAccessToolBarAutomationPeer.cs
...utomation/Peers/RibbonQuickAccessToolBarAutomationPeer.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSplitButtonAutomationPeer.cs
...ndows/Automation/Peers/RibbonSplitButtonAutomationPeer.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabDataAutomationPeer.cs
...t/Windows/Automation/Peers/RibbonTabDataAutomationPeer.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/ActivatingKeyTipEventArgs.cs
...n/Microsoft/Windows/Controls/ActivatingKeyTipEventArgs.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipService.cs
...ntrols.Ribbon/Microsoft/Windows/Controls/KeyTipService.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/InRibbonGallery.cs
...bbon/Microsoft/Windows/Controls/Ribbon/InRibbonGallery.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupsPanel.cs
...t/Windows/Controls/Ribbon/Primitives/RibbonGroupsPanel.cs
+2
-2
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Ribbon.cs
...ntrols.Ribbon/Microsoft/Windows/Controls/Ribbon/Ribbon.cs
+3
-3
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenu.cs
...icrosoft/Windows/Controls/Ribbon/RibbonApplicationMenu.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenuItem.cs
...soft/Windows/Controls/Ribbon/RibbonApplicationMenuItem.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationSplitMenuItem.cs
...Windows/Controls/Ribbon/RibbonApplicationSplitMenuItem.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextMenu.cs
...on/Microsoft/Windows/Controls/Ribbon/RibbonContextMenu.cs
+8
-8
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLength.cs
.../Microsoft/Windows/Controls/Ribbon/RibbonControlLength.cs
+3
-3
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGallery.cs
...Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGallery.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuButton.cs
...bon/Microsoft/Windows/Controls/Ribbon/RibbonMenuButton.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuItem.cs
...ibbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuItem.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBar.cs
...osoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBar.cs
+1
-1
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Resources/SR.cs
...et.Wpf/src/System.Windows.Controls.Ribbon/Resources/SR.cs
+0
-27
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/System.Windows.Controls.Ribbon.csproj
...ows.Controls.Ribbon/System.Windows.Controls.Ribbon.csproj
+0
-1
未找到文件。
eng/WpfArcadeSdk/tools/SystemResources.props
浏览文件 @
4912f487
...
...
@@ -12,9 +12,14 @@
<_GenerateResourcesCodeAsConstants>
true
</_GenerateResourcesCodeAsConstants>
<!--
Projects that compile XAML must also check for AssemblyName because XAML compilation generates a temporary project with a different project name.
We use AssemblyName because AssemblyName is copied from the main project to the generated project.
-->
<_GenerateResourcesCodeAsConstants
Condition=
"'$(MSBuildProjectName)'=='UIAutomationClient'"
>
false
</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants
Condition=
"'$(MSBuildProjectName)'=='UIAutomationClientSideProviders'"
>
false
</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants
Condition=
"'$(MSBuildProjectName)'=='UIAutomationProvider'"
>
false
</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants
Condition=
"'$(MSBuildProjectName)'=='System.Windows.Controls.Ribbon' or '$(AssemblyName)'=='System.Windows.Controls.Ribbon'"
>
false
</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants
Condition=
"'$(MSBuildProjectName)'=='System.Xaml'"
>
false
</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants
Condition=
"'$(MSBuildProjectName)'=='WindowsBase'"
>
false
</_GenerateResourcesCodeAsConstants>
<_GenerateResourcesCodeAsConstants
Condition=
"'$(MSBuildProjectName)'=='WindowsFormsIntegration'"
>
false
</_GenerateResourcesCodeAsConstants>
...
...
@@ -37,7 +42,7 @@
<ClassName
Condition=
"'$(AssemblyName)'=='UIAutomationProvider'"
>
MS.Internal.Automation.SR
</ClassName>
<ClassName
Condition=
"'$(AssemblyName)'=='UIAutomationTypes'"
>
System.SR
</ClassName>
<ClassName
Condition=
"'$(AssemblyName)'=='WindowsBase'"
>
MS.Internal.WindowsBase.SR
</ClassName>
<ClassName
Condition=
"'$(AssemblyName)'=='System.Windows.Controls.Ribbon'"
>
Microsoft.Windows.Controls.SR
ID
</ClassName>
<ClassName
Condition=
"'$(AssemblyName)'=='System.Windows.Controls.Ribbon'"
>
Microsoft.Windows.Controls.SR
</ClassName>
<ClassName
Condition=
"'$(AssemblyName)'=='System.Windows.Input.Manipulations'"
>
System.SR
</ClassName>
<ClassName
Condition=
"'$(AssemblyName)'=='ReachFramework'"
>
System.Windows.Xps.SRID
</ClassName>
<ClassName
Condition=
"'$(AssemblyName)'=='PresentationFramework'"
>
System.Windows.SRID
</ClassName>
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonComboBoxAutomationPeer.cs
浏览文件 @
4912f487
...
...
@@ -88,15 +88,15 @@ protected override void SetFocusCore()
{
TextBox
tb
=
owner
.
EditableTextBoxSite
;
if
(
tb
==
null
||
!
tb
.
IsKeyboardFocused
)
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
SetFocusFailed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
SetFocusFailed
);
}
else
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
SetFocusFailed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
SetFocusFailed
);
}
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
SetFocusFailed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
SetFocusFailed
);
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuButtonAutomationPeer.cs
浏览文件 @
4912f487
...
...
@@ -173,7 +173,7 @@ void IExpandCollapseProvider.Collapse()
RibbonMenuButton
owner
=
OwningMenuButton
;
if
(!
owner
.
HasItems
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
owner
.
IsDropDownOpen
=
false
;
...
...
@@ -187,7 +187,7 @@ void IExpandCollapseProvider.Expand()
RibbonMenuButton
owner
=
OwningMenuButton
;
if
(!
owner
.
HasItems
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
owner
.
IsDropDownOpen
=
true
;
...
...
@@ -237,7 +237,7 @@ bool ITransformProvider.CanRotate
void
ITransformProvider
.
Move
(
double
x
,
double
y
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
void
ITransformProvider
.
Resize
(
double
width
,
double
height
)
...
...
@@ -246,17 +246,17 @@ void ITransformProvider.Resize(double width, double height)
throw
new
ElementNotEnabledException
();
if
(!((
ITransformProvider
)
this
).
CanResize
||
width
<=
0
||
height
<=
0
)
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
if
(!
OwningMenuButton
.
ResizePopupInternal
(
width
,
height
))
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
ResizeParametersNotValid
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
ResizeParametersNotValid
);
}
}
void
ITransformProvider
.
Rotate
(
double
degrees
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
#
endregion
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonMenuItemDataAutomationPeer.cs
浏览文件 @
4912f487
...
...
@@ -142,7 +142,7 @@ void IExpandCollapseProvider.Expand()
UIElement
owner
=
GetWrapper
();
if
(
owner
==
null
)
{
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
VirtualizedElement
)
);
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
VirtualizedElement
);
}
RibbonMenuItem
menuItemOwner
=
owner
as
RibbonMenuItem
;
...
...
@@ -153,14 +153,14 @@ void IExpandCollapseProvider.Expand()
if
((
role
!=
MenuItemRole
.
TopLevelHeader
&&
role
!=
MenuItemRole
.
SubmenuHeader
)
||
!
menuItemOwner
.
HasItems
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
menuItemOwner
.
IsSubmenuOpen
=
true
;
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
}
...
...
@@ -173,7 +173,7 @@ void IExpandCollapseProvider.Collapse()
UIElement
owner
=
GetWrapper
();
if
(
owner
==
null
)
{
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
VirtualizedElement
)
);
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
VirtualizedElement
);
}
RibbonMenuItem
menuItemOwner
=
owner
as
RibbonMenuItem
;
...
...
@@ -184,14 +184,14 @@ void IExpandCollapseProvider.Collapse()
if
((
role
!=
MenuItemRole
.
TopLevelHeader
&&
role
!=
MenuItemRole
.
SubmenuHeader
)
||
!
menuItemOwner
.
HasItems
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
menuItemOwner
.
IsSubmenuOpen
=
false
;
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
}
...
...
@@ -203,7 +203,7 @@ ExpandCollapseState IExpandCollapseProvider.ExpandCollapseState
UIElement
owner
=
GetWrapper
();
if
(
owner
==
null
)
{
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
VirtualizedElement
)
);
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
VirtualizedElement
);
}
ExpandCollapseState
result
=
ExpandCollapseState
.
Collapsed
;
...
...
@@ -224,7 +224,7 @@ ExpandCollapseState IExpandCollapseProvider.ExpandCollapseState
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
return
result
;
...
...
@@ -243,13 +243,13 @@ void IInvokeProvider.Invoke()
UIElement
owner
=
GetWrapper
();
if
(
owner
==
null
)
{
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
VirtualizedElement
)
);
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
VirtualizedElement
);
}
RibbonMenuItem
menuItemOwner
=
owner
as
RibbonMenuItem
;
if
(
menuItemOwner
==
null
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
menuItemOwner
.
ClickItemInternal
();
...
...
@@ -267,13 +267,13 @@ void IToggleProvider.Toggle()
UIElement
owner
=
GetWrapper
();
if
(
owner
==
null
)
{
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
VirtualizedElement
)
);
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
VirtualizedElement
);
}
RibbonMenuItem
menuItemOwner
=
owner
as
RibbonMenuItem
;
if
(
menuItemOwner
==
null
||
!
menuItemOwner
.
IsCheckable
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
menuItemOwner
.
IsChecked
=
!
menuItemOwner
.
IsChecked
;
...
...
@@ -287,13 +287,13 @@ ToggleState IToggleProvider.ToggleState
UIElement
owner
=
GetWrapper
();
if
(
owner
==
null
)
{
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
VirtualizedElement
)
);
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
VirtualizedElement
);
}
RibbonMenuItem
menuItemOwner
=
owner
as
RibbonMenuItem
;
if
(
menuItemOwner
==
null
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
return
menuItemOwner
.
IsChecked
?
ToggleState
.
On
:
ToggleState
.
Off
;
...
...
@@ -330,7 +330,7 @@ bool ITransformProvider.CanRotate
void
ITransformProvider
.
Move
(
double
x
,
double
y
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
void
ITransformProvider
.
Resize
(
double
width
,
double
height
)
...
...
@@ -341,27 +341,27 @@ void ITransformProvider.Resize(double width, double height)
UIElement
owner
=
GetWrapper
();
if
(
owner
==
null
)
{
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
VirtualizedElement
)
);
throw
new
ElementNotAvailableException
(
Microsoft
.
Windows
.
Controls
.
SR
.
VirtualizedElement
);
}
RibbonMenuItem
menuItemOwner
=
owner
as
RibbonMenuItem
;
if
(
menuItemOwner
==
null
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
if
(!((
ITransformProvider
)
this
).
CanResize
||
width
<=
0
||
height
<=
0
)
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
if
(!
menuItemOwner
.
ResizePopupInternal
(
width
,
height
))
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
ResizeParametersNotValid
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
ResizeParametersNotValid
);
}
}
void
ITransformProvider
.
Rotate
(
double
degrees
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
#
endregion
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonQuickAccessToolBarAutomationPeer.cs
浏览文件 @
4912f487
...
...
@@ -109,7 +109,7 @@ public void Collapse()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
}
...
...
@@ -121,7 +121,7 @@ public void Expand()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonSplitButtonAutomationPeer.cs
浏览文件 @
4912f487
...
...
@@ -75,7 +75,7 @@ void IToggleProvider.Toggle()
if
(!
OwningSplitButton
.
IsCheckable
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
if
(
OwningSplitButton
.
HeaderButton
!=
null
)
...
...
@@ -108,7 +108,7 @@ void IInvokeProvider.Invoke()
// When IsCheckable is true, TogglePattern should be used
if
(
OwningSplitButton
.
IsCheckable
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
if
(
OwningSplitButton
.
HeaderButton
!=
null
)
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Automation/Peers/RibbonTabDataAutomationPeer.cs
浏览文件 @
4912f487
...
...
@@ -150,7 +150,7 @@ void ISelectionItemProvider.RemoveFromSelection()
RibbonTab
tab
=
GetWrapper
()
as
RibbonTab
;
if
(
tab
!=
null
&&
tab
.
IsSelected
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
}
...
...
@@ -165,7 +165,7 @@ void ISelectionItemProvider.AddToSelection()
Selector
parentSelector
=
(
Selector
)(
ItemsControlAutomationPeer
.
Owner
);
if
((
parentSelector
==
null
)
||
(
parentSelector
.
SelectedItem
!=
null
&&
parentSelector
.
SelectedItem
!=
Item
))
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
UIA_OperationCannotBePerformed
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
UIA_OperationCannotBePerformed
);
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/ActivatingKeyTipEventArgs.cs
浏览文件 @
4912f487
...
...
@@ -86,7 +86,7 @@ public double KeyTipHorizontalOffset
{
if
(
double
.
IsInfinity
(
value
)
||
double
.
IsNaN
(
value
))
{
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidKeyTipOffset
)
);
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidKeyTipOffset
);
}
_horizontalOffset
=
value
;
}
...
...
@@ -105,7 +105,7 @@ public double KeyTipVerticalOffset
{
if
(
double
.
IsInfinity
(
value
)
||
double
.
IsNaN
(
value
))
{
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidKeyTipOffset
)
);
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidKeyTipOffset
);
}
_verticalOffset
=
value
;
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/KeyTipService.cs
浏览文件 @
4912f487
...
...
@@ -989,7 +989,7 @@ private void OnKeyTipExactMatch(DependencyObject exactMatchElement)
!
KeyTipService
.
GetIsKeyTipScope
(
newScope
)
&&
newScope
!=
_currentGlobalScope
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
ElementNotKeyTipScope
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
ElementNotKeyTipScope
);
}
if
(
newScope
==
null
&&
KeyTipService
.
GetIsKeyTipScope
(
exactMatchElement
))
...
...
@@ -1796,7 +1796,7 @@ internal static KeyTipService Current
private
const
int
ShowKeyTipsWaitTime
=
500
;
private
const
int
NonZeroDigitCount
=
9
;
private
static
String
QatKeyTipCharacters
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
QATKeyTipCharacters
)
;
private
static
String
QatKeyTipCharacters
=
Microsoft
.
Windows
.
Controls
.
SR
.
QATKeyTipCharacters
;
#
endregion
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/InRibbonGallery.cs
浏览文件 @
4912f487
...
...
@@ -737,8 +737,8 @@ private static bool CoerceCanLineUpDown(InRibbonGallery irg, bool lineUp)
private
const
string
ScrollUpRepeatButtonTemplatePartName
=
"PART_ScrollUp"
;
private
const
string
ScrollDownRepeatButtonTemplatePartName
=
"PART_ScrollDown"
;
private
static
string
_scrollUpButtonAutomationName
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InRibbonGallery_ScrollUpButtonAutomationName
)
;
private
static
string
_scrollDownButtonAutomationName
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InRibbonGallery_ScrollDownButtonAutomationName
)
;
private
static
string
_scrollUpButtonAutomationName
=
Microsoft
.
Windows
.
Controls
.
SR
.
InRibbonGallery_ScrollUpButtonAutomationName
;
private
static
string
_scrollDownButtonAutomationName
=
Microsoft
.
Windows
.
Controls
.
SR
.
InRibbonGallery_ScrollDownButtonAutomationName
;
#
endregion
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Primitives/RibbonGroupsPanel.cs
浏览文件 @
4912f487
...
...
@@ -61,7 +61,7 @@ public void RegisterStarLayoutProvider(IProvideStarLayoutInfoBase starLayoutInfo
IProvideStarLayoutInfo
provider
=
starLayoutInfoProvider
as
IProvideStarLayoutInfo
;
if
(
provider
==
null
)
{
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonGroupsPanel_InvalidRegistrationParameter
)
,
"starLayoutInfoProvider"
);
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonGroupsPanel_InvalidRegistrationParameter
,
"starLayoutInfoProvider"
);
}
if
(!
_registeredStarLayoutProviders
.
Contains
(
provider
))
{
...
...
@@ -79,7 +79,7 @@ public void UnregisterStarLayoutProvider(IProvideStarLayoutInfoBase starLayoutIn
IProvideStarLayoutInfo
provider
=
starLayoutInfoProvider
as
IProvideStarLayoutInfo
;
if
(
provider
==
null
)
{
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonGroupsPanel_InvalidRegistrationParameter
)
,
"starLayoutInfoProvider"
);
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonGroupsPanel_InvalidRegistrationParameter
,
"starLayoutInfoProvider"
);
}
if
(
_registeredStarLayoutProviders
.
Contains
(
provider
))
{
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/Ribbon.cs
浏览文件 @
4912f487
...
...
@@ -753,7 +753,7 @@ public override void OnApplyTemplate()
{
if
(
ContextualTabGroupsSource
!=
null
&&
ContextualTabGroups
.
Count
>
0
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
Ribbon_ContextualTabHeadersSourceInvalid
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Ribbon_ContextualTabHeadersSourceInvalid
);
}
if
(
ContextualTabGroupsSource
!=
null
)
{
...
...
@@ -1470,7 +1470,7 @@ private void OnContextualTabGroupsCollectionChanged(object sender, NotifyCollect
{
if
(
ContextualTabGroupsSource
!=
null
&&
ContextualTabGroups
.
Count
>
0
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
Ribbon_ContextualTabHeadersSourceInvalid
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Ribbon_ContextualTabHeadersSourceInvalid
);
}
}
...
...
@@ -1480,7 +1480,7 @@ private static void OnContextualTabGroupsSourceChanged(object sender, Dependency
if
(
ribbon
.
ContextualTabGroupsSource
!=
null
&&
ribbon
.
ContextualTabGroups
.
Count
>
0
)
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
Ribbon_ContextualTabHeadersSourceInvalid
)
);
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Ribbon_ContextualTabHeadersSourceInvalid
);
}
if
(
ribbon
.
ContextualTabGroupItemsControl
!=
null
)
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenu.cs
浏览文件 @
4912f487
...
...
@@ -241,7 +241,7 @@ protected override DependencyObject GetContainerForItemOverride()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidApplicationMenuOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidApplicationMenuOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
}
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationMenuItem.cs
浏览文件 @
4912f487
...
...
@@ -76,7 +76,7 @@ protected override DependencyObject GetContainerForItemOverride()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidApplicationMenuOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidApplicationMenuOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
}
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonApplicationSplitMenuItem.cs
浏览文件 @
4912f487
...
...
@@ -74,7 +74,7 @@ protected override DependencyObject GetContainerForItemOverride()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidApplicationMenuOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidApplicationMenuOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
}
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonContextMenu.cs
浏览文件 @
4912f487
...
...
@@ -515,7 +515,7 @@ protected override DependencyObject GetContainerForItemOverride()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidMenuButtonOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidMenuButtonOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
}
}
}
...
...
@@ -628,13 +628,13 @@ private void OnLoaded(object sender, RoutedEventArgs e)
private
int
_galleryCount
;
private
Popup
_popup
;
internal
static
string
AddToQATText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonContextMenu_AddToQAT
)
;
private
static
string
_addGalleryToQATText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonContextMenu_AddGalleryToQAT
)
;
internal
static
string
RemoveFromQATText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonContextMenu_RemoveFromQAT
)
;
internal
static
string
ShowQATAboveText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonContextMenu_ShowQATAbove
)
;
internal
static
string
ShowQATBelowText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonContextMenu_ShowQATBelow
)
;
internal
static
string
MaximizeTheRibbonText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonContextMenu_MaximizeTheRibbon
)
;
internal
static
string
MinimizeTheRibbonText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonContextMenu_MinimizeTheRibbon
)
;
internal
static
string
AddToQATText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonContextMenu_AddToQAT
;
private
static
string
_addGalleryToQATText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonContextMenu_AddGalleryToQAT
;
internal
static
string
RemoveFromQATText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonContextMenu_RemoveFromQAT
;
internal
static
string
ShowQATAboveText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonContextMenu_ShowQATAbove
;
internal
static
string
ShowQATBelowText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonContextMenu_ShowQATBelow
;
internal
static
string
MaximizeTheRibbonText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonContextMenu_MaximizeTheRibbon
;
internal
static
string
MinimizeTheRibbonText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonContextMenu_MinimizeTheRibbon
;
private
bool
_ignoreDismissPopupsOnNextClose
=
false
;
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonControlLength.cs
浏览文件 @
4912f487
...
...
@@ -50,12 +50,12 @@ public RibbonControlLength(double value, RibbonControlLengthUnitType type)
{
if
(
double
.
IsNaN
(
value
))
{
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidCtorParameterNoNaN
,
"value"
));
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidCtorParameterNoNaN
,
"value"
));
}
if
(
type
==
RibbonControlLengthUnitType
.
Star
&&
double
.
IsInfinity
(
value
))
{
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidCtorParameterNoInfinityForStarSize
,
"value"
));
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidCtorParameterNoInfinityForStarSize
,
"value"
));
}
if
(
type
!=
RibbonControlLengthUnitType
.
Auto
...
...
@@ -63,7 +63,7 @@ public RibbonControlLength(double value, RibbonControlLengthUnitType type)
&&
type
!=
RibbonControlLengthUnitType
.
Item
&&
type
!=
RibbonControlLengthUnitType
.
Star
)
{
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidCtorParameterUnknownRibbonControlLengthUnitType
,
"type"
));
throw
new
ArgumentException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidCtorParameterUnknownRibbonControlLengthUnitType
,
"type"
));
}
_unitValue
=
(
type
==
RibbonControlLengthUnitType
.
Auto
)
?
0.0
:
value
;
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonGallery.cs
浏览文件 @
4912f487
...
...
@@ -3225,7 +3225,7 @@ private enum Bits
// Filtering
private
ObservableCollection
<
object
>
_categoryFilters
=
new
ObservableCollection
<
object
>();
private
static
object
_allFilter
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonGallery_AllFilter
)
;
private
static
object
_allFilter
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonGallery_AllFilter
;
private
const
string
_filterMenuButtonTemplatePartName
=
"PART_FilterMenuButton"
;
private
const
string
FilterContentPaneTemplatePartName
=
"PART_FilterContentPane"
;
private
const
string
ScrollViewerTemplatePartName
=
"PART_ScrollViewer"
;
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuButton.cs
浏览文件 @
4912f487
...
...
@@ -558,7 +558,7 @@ protected override DependencyObject GetContainerForItemOverride()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidMenuButtonOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidMenuButtonOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
}
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonMenuItem.cs
浏览文件 @
4912f487
...
...
@@ -520,7 +520,7 @@ protected override DependencyObject GetContainerForItemOverride()
}
else
{
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
InvalidMenuButtonOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
throw
new
InvalidOperationException
(
Microsoft
.
Windows
.
Controls
.
SR
.
Format
(
Microsoft
.
Windows
.
Controls
.
SR
.
InvalidMenuButtonOrItemContainer
,
this
.
GetType
().
Name
,
itemContainer
));
}
}
}
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Ribbon/RibbonQuickAccessToolBar.cs
浏览文件 @
4912f487
...
...
@@ -54,7 +54,7 @@ public class RibbonQuickAccessToolBar : ItemsControl
private
Popup
_overflowPopup
;
// The Popup that hosts the overflow panel.
private
RibbonToggleButton
_overflowButton
;
// The ToggleButton that hosts the overflow panel popup.
private
BitVector32
_bits
=
new
BitVector32
(
0
);
private
static
string
_overflowButtonToolTipText
=
Microsoft
.
Windows
.
Controls
.
SR
.
Get
(
Microsoft
.
Windows
.
Controls
.
SRID
.
RibbonQuickAccessToolBar_OverflowButtonToolTip
)
;
private
static
string
_overflowButtonToolTipText
=
Microsoft
.
Windows
.
Controls
.
SR
.
RibbonQuickAccessToolBar_OverflowButtonToolTip
;
private
enum
Bits
{
...
...
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Resources/SR.cs
已删除
100644 → 0
浏览文件 @
51ba512b
// 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.
using
System
;
using
System.Globalization
;
using
System.Resources
;
namespace
Microsoft.Windows.Controls
{
/// <summary>
/// Retrieves exception strings and other localized strings.
/// </summary>
internal
static
partial
class
SR
{
public
static
string
Get
(
string
name
)
{
return
GetResourceString
(
name
,
null
);
}
public
static
string
Get
(
string
name
,
params
object
[]
args
)
{
return
Format
(
GetResourceString
(
name
,
null
),
args
);
}
}
}
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/System.Windows.Controls.Ribbon.csproj
浏览文件 @
4912f487
...
...
@@ -20,7 +20,6 @@
<Compile Include="AssemblyAttrs.cs" />
<Compile Include="Resources\SR.cs" />
<Compile Include="$(WpfCommonDir)src\System\SR.cs">
<Link>Common\System\SR.cs</Link>
</Compile>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录