0
我已經知道如何做到這一點在WPF作爲如何在上標一個Application.Resources串
<TextBlock HorizontalAlignment="Left" Margin="359,10,0,0"
TextWrapping="Wrap" VerticalAlignment="Top" Width="75">
<Run>X</Run>
<Run BaselineAlignment="Superscript" FontSize="8">4</Run>
</TextBlock>
或this answer,或在代碼中
string area;
area = "mm\xB2";
testTblock.Text = area;
但是你可以怎麼做在Application.Resources中?作爲
<Application.Resources>
<System:String x:Key="area">
//what should be here?
</System:String>
,這樣我可以把它應用到DynamicResource爲
<TextBlock Text="{DynamicResource area}" />
謝謝@ValeriuCaraulea。 – Bopy 2014-09-05 11:51:18