我有以下幾點:換行不工作
<sys:String x:Key="NoDeviceAlert" xml:space="preserve">Your device is currently disabled. Please ensure it is turned on and connected.</sys:String>
但是它不工作。 TextBlock的:
<TextBlock Text="{DynamicResource NoDeviceAlert}" Style="{DynamicResource msgTextStyle}" HorizontalAlignment="Center" />
保持在同一行兩個句子,但是移除十進制值。我也嘗試過十六進制值以及/ r/n。
這怎麼能工作?
UPDATE
<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>
ResourceDictionary的SYS命名空間:
xmlns:sys="clr-namespace:System;assembly=mscorlib"
的應用是Windows桌面,並使用.NET 4.5。
它仍然在一條線上......甚至將它分成單獨的行使得句點在P字符旁邊。 – bl4kh4k
不,它適用於我。可能是樣式'msgTextStyle'做了一些更改。請在帖子中提供。 –
我在帖子中添加了樣式。 – bl4kh4k