将字符串转换为斜体xaml
我的xaml代码如下所示:将字符串转换为斜体xaml,xaml,Xaml,我的xaml代码如下所示: <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"> &l
<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="AppName">abcd</system:String>
<system:String x:Key="btn_Login_Text">Log ind…</system:String>
<system.....
<system....
</ResourceDictionary>
abcd
日志索引…
这只是一个System.String
,它没有任何样式
更改使用此功能的TextBlock
或TextBox
的FontStyle
<TextBlock Text="{StaticResource AppName}" FontStyle="Italic"/>