【发布时间】:2011-04-27 19:15:31
【问题描述】:
我的应用程序将所有本地化文本存储在字符串资源字典中,如此处建议http://msdn.microsoft.com/en-us/library/bb295251(VS.85).aspx
<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">
<!-- String resource that can be localized -->
<system:String x:Key="localizedMessage">en-US Message</system:String>
</ResourceDictionary>
我的问题是,如何在字符串资源中添加新行并使其在 TextBlock 中使用时正确呈现。
执行此内联工作:
<TextBlock Name="test" Text="Line 1 Line 2"> </TextBlock>
但是,在字符串资源中使用&#13; 不起作用。向字符串资源添加新行的最佳方法是什么?
【问题讨论】:
标签: wpf textblock carriage-return