从角色创建图像

编程入门 行业动态 更新时间:2024-10-25 22:30:39
本文介绍了从角色创建图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在为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="&#xE113;" 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="&#xE113;" 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="&#xE113;" 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">&#xE113;</span>

更多推荐

从角色创建图像

本文发布于:2023-11-25 08:53:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1629126.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   角色

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!