我正在为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 Symbols 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>更多推荐
从角色创建图像
发布评论