Coded
Topic Author
Posts: 26
Joined: 23 Jul 2022, 21:46

Emoticons

08 Jan 2023, 06:20

hello, I wanted to know if it is possible to make a TextBlock show emoji on the screen through the text like this: :( flip > πŸ˜• ;D flip >😁 among others...

if possible do you have any example or doc? I did not find
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Emoticons

10 Jan 2023, 15:09

Yes, COLR/CPAL fonts are supported. (ony v0 for now, but there are plans to support v1 gradients).
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
  <Viewbox>
    <Viewbox Height="600">
        <StackPanel TextElement.FontFamily="Fonts/#Twemoji Mozilla">
          <TextBlock FontSize="120" TextWrapping="Wrap">
              πŸ˜€πŸ˜πŸ˜‚πŸ€£πŸ˜ƒπŸ˜„πŸ˜…πŸ˜†πŸ˜‰
          </TextBlock>
        </StackPanel>
    </Viewbox>
  </Viewbox>
</Grid>
 
Coded
Topic Author
Posts: 26
Joined: 23 Jul 2022, 21:46

Re: Emoticons

17 Jan 2023, 21:28

I tried to use it that way but if the user writes the text containing :( :) :D among others it is not becoming an emoticon only when he pastes an emoticon from some site
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Emoticons

18 Jan 2023, 11:18

You need to manually convert the ":)" to the corresponding emoji. I recommend extending our RichText class (source code is available in the SDK)

Who is online

Users browsing this forum: No registered users and 73 guests