这是我的“示例代码”,包括我正在尝试做的事情。显然,目前它不工作,但有什么办法可以使它工作?如何从WPF中的其他字符串资源构建字符串资源?
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=mscorlib"
>
<System:String x:Key="ProductName">Foo</System:String>
<System:String x:Key="WindowTitle">{ProductName} + Main Window</System:String>
</ResourceDictionary>
您可以使用xaml中的字符串格式来实现相同的目标吗?http://blogs.msdn.com/llobo/archive/2008/05/19/wpf-3-5-sp1-feature-stringformat.aspx – 2010-01-12 22:42:01