How to create & larr; in xaml

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

+4
source share
3 answers

If direct input ← does not work, try

 ← 
+5
source

I'm sure there should be a better way than this, but you can just use the special character directly in xaml.

I managed to cut and paste the back arrow into the contents of the text block, and it displayed correctly.

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

Therefore, you should be able to use this text block as part of the template for the control.

I'm not sure exactly what you need, but I think this will give a better effect for using the image for the back arrow instead of using text.

+1
source

File encoding is UTF-8, so you can simply write the arrow directly in the file.

eg.

 <Label>←</Label> <Label Content="←" /> 
+1
source

Source: https://habr.com/ru/post/1315611/


All Articles