tags:

views:

34

answers:

3

How to create ← (←) in XAML? I want to create backspace button.

A: 

I am certain there must be a better way than this, but you can just use the special character directly in the xaml.

I was able to cut and paste a back arrow into the content of a text block and it displayed correctly.

    <TextBlock Height="23" Width=20 HorizontalAlignment="Left" Name="textBlock1" Text="" VerticalAlignment="Top" >
        ←
    </TextBlock>

So you should be able to use that text block as part of the template for a control.

I'm not sure exactly what you need, but I think it would give a better effect to use an image for the back arrow instead of using text.

David Hall
+1  A: 

The encoding of the files are UTF-8 so you can just write in the arrow right in the file.

e.g.,

<Label>←</Label>
<Label Content="←" />
Jeff M
Nitpick: the encoding is UTF-8 unless there is an XML declaration stating some other encoding.
Christopher Creutzig
+1  A: 

If directly entering does not work, try

&#x2190;
KennyTM