如何显示" Android的退格" - 在⌫标签 [英] How do I display "Android backspace" - ⌫ in Label

查看:272
本文介绍了如何显示" Android的退格" - 在⌫标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个标签绑定一个Xamarin应用像这样:

<Label Text="{Binding BackSpace}"/>

和像这样在我的视图模型属性:

and a property in my viewmodel like so:

public string BackSpace
{
   get
   {
        ResourceManager temp = new ResourceManager("MyProgram.ResourceStrings", typeof(MyClass).GetTypeInfo().Assembly);
        result = System.Text.RegularExpressions.Regex.Unescape(temp.GetString("Backspace"));
   }
}

现在我有一个元素我 ResourceStrings 名为退格,我试图让与此相关的字符串这是我想成为键 Android的退格 -

now I have an element in my ResourceStrings called Backspace and I am trying to get the string associated with this key which I want to be the Android Backspace -

所以最初我设置资源等于符号但这只是给了我,包括一个标签

So initially I set the resource equal to the symbol but this just gives me a label containing ?

现在我尝试将其设置为从的这里&放大器;#x232b; 但是这给了我&放大器;#x232b;

Now I try set it equal to the HTML hex code from here: &#x232b; but this gives me &#x232b;

我如何得到我的标签显示符号?

How do I get my label to display the symbol?

PS - 即使我尝试:

PS. - Even if I try:

<Label Text="⌫"/>

我得到一个空白标签

I get a blank label

推荐答案

您需要将标签的字体更改为包含退格作为glyphicon字体。

You'll need to change your label's font to a font which contains backspace as glyphicon.

您将需要两件事情:

  • Appropriate font. Probably Noto Sans Symbols https://www.google.com/get/noto/#sans-zsym. ⌫ symbol
  • Label renderer which allows custom fonts. See here: https://github.com/XLabs/Xamarin-Forms-Labs/wiki/ExtendedLabel

Xamarin链接将提供在使用字体查看详细信息

This Xamarin link will provide more infomation on working with Fonts

这篇关于如何显示&QUOT; Android的退格&QUOT; - 在⌫标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆