简体   繁体   中英

How do I display “Android backspace” - ⌫ in Label

I have a Xamarin application with a Label which is Bound like so:

<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"));
   }
}

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 ?

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. - Even if I try:

<Label Text="⌫"/>

I get a blank label

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

You'll need two things:

This Xamarin link will provide more infomation on working with Fonts

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM