从角色创建图像 [英] create image from character
问题描述
我正在为Metro
应用程序使用标准样式.这些样式大多数都包含Image
,我想使用Segoe UI Symbol
作为这些图像.
I'm using standard styles for my Metro
app. Most of these styles contains an Image
and I wanna use Segoe UI Symbol
s as these images.
我该如何实现?
推荐答案
您可以在使用Segoe UI符号作为字体的任何文本内容中插入字符".如果我想在TextBlock中添加收藏的星星",它将看起来像这样...
You can insert the "character" in any text content that is using the Segoe UI Symbol as the font. If I wanted a Favorite's Star in a TextBlock, it would look like this...
<TextBox x:Name="textBox" HorizontalAlignment="Left" Margin="372,375,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" FontFamily="Segoe UI Symbol"/>
如果我想制作一个带有相同字符"的按钮,我会这样做...
If I wanted to make a button that had the same "character" in it, I would do this...
<Button x:Name="button" Content="" HorizontalAlignment="Left" Margin="372,181,0,0" VerticalAlignment="Top" Click="button_Click" FontFamily="Segoe UI Symbol" FontSize="24" Height="79" Width="128"/>
如果我希望按钮采用圆形的AppBar按钮样式,则可以这样添加样式资源...
If I wanted the button to take on the circle AppBar button style, I would add the Style resource like this...
<Button x:Name="button" Content="" HorizontalAlignment="Left" Margin="372,181,0,0" VerticalAlignment="Top" Click="button_Click" FontFamily="Segoe UI Symbol" FontSize="24" Style="{StaticResource AppBarButtonStyle}" Height="79" Width="128"/>
如果使用的是HTML,则使用相同的方法.只要确保您的样式是正确的...
Same type of approach if you are using HTML. Just make sure you styles are correct...
<span class="pagetitle"></span>
这篇关于从角色创建图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!