<分区>
我有一个 WPF 程序,当我本地化它时,它失败了。我在 Window
元素中创建了这个与文件位置相对应的 XML 命名空间:
xmlns:properties="clr-namespace:ResxEditor.Properties"
这就是我本地化每个元素的方式:
<Button Content="{x:Static properties:Resources.FilePickerButton_AddFile}" />
设计器工作得非常好,当我选择 Resources.
时,自动完成会拉出可用的项目,但是当我构建我的应用程序时,它崩溃并显示以下错误消息:
Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll
Additional information: 'Provide value on 'System.Windows.Markup.StaticExtension' threw an exception.' Line number '5' and line position '9'.
行号和位置对应于我上面给出的命名空间中的第一个x
。我尝试在网络上搜索此消息,但似乎找不到任何内容。