0
我有以下XAML代码负载串与用户名占位符
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Margin="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="130"></ColumnDefinition>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="70"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.Column="1" Grid.Row="0" FontSize="36" FontFamily="Segoe UI Light" x:Uid="Greeting"/>
</Grid>
</Grid>
然后,我创建每种语言资源文件(一个为EN-US,而另一个用于FR-FR),它包含以下资源。
名称:Greeting.Text 值:你好{0}!
事情是,在运行时,我想让我的名字替换为占位符,所以我最终得到了一些像Hello Peter Pan!
理想的情况下,名称(小飞侠)应来自Windows系统
谁做后面的代码是什么样子?我一直没能找出像互联网这样不知道这甚至有可能在什么...
您可以在运行中设置不同的前景,可以使用超链接。 – lindexi