Xaml ResourceDictionary字符串中的换行符无效

Xaml ResourceDictionary字符串中的换行符无效,xaml,Xaml,我有以下资料: <sys:String x:Key="NoDeviceAlert" xml:space="preserve">Your device is currently disabled.&#10;&#13;Please ensure it is turned on and connected.</sys:String> 该应用程序适用于Windows桌面并使用.net 4.5。属性xml:space=“preserve”仅影响xml解析器的工作。

我有以下资料:

<sys:String x:Key="NoDeviceAlert" xml:space="preserve">Your device is currently disabled.&#10;&#13;Please ensure it is turned on and connected.</sys:String>

该应用程序适用于Windows桌面并使用.net 4.5。

属性
xml:space=“preserve”
仅影响xml解析器的工作。因此,换行符、制表符和空格将保持不变。 只需按enter键,而不是键入显式换行符:

    <sys:String x:Key="NoDeviceAlert" xml:space="preserve">Your device is currently disabled.
Please ensure it is turned on and connected.</sys:String>
您的设备当前已禁用。
请确保它已打开并已连接。
您可以尝试使用

和#x0a

像换行符(内部没有此空间)。
应该是工作

它仍然在一条线上。。。即使将其拆分为单独的行,也会导致句点正好位于P字符的旁边。不,它对我有效。可能是样式
msgTextStyle
进行了一些更改。请在邮件中提供。我在邮件中添加了样式。钢铁厂惠尔。需要更多信息。您如何声明
xmlns:sys
?您使用哪个版本的框架/WPF?可能是手机应用程序?在帖子中添加了更多内容。干杯。在x和0之间应该有一个空格吗?
<Style x:Key="msgTextStyle" TargetType="TextBlock">
    <Setter Property="Foreground" Value="#FFC8DBE7" />
    <Setter Property="FontFamily" Value="/Project;component/Utilities/Resources/Fonts/frutiger.ttf#Frutiger Linotype" />
    <Setter Property="FontSize" Value="20" />
    <Setter Property="TextAlignment" Value="Left" />
</Style>
xmlns:sys="clr-namespace:System;assembly=mscorlib"
    <sys:String x:Key="NoDeviceAlert" xml:space="preserve">Your device is currently disabled.
Please ensure it is turned on and connected.</sys:String>