samhocevar / emoji.wpf

😸 Emoji support for WPF
Do What The F*ck You Want To Public License
369 stars 43 forks source link

Icon Emoji.Wpf

Emoji.Wpf adds Emoji rendering support to WPF applications.

Demo 1

Features

Available classes

Available dependency properties

Available runtime flags

Examples

Here is how to use Emoji.Wpf in your XAML:

    <Window ...
            xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
            ...>
        <Window.Resources>
            <DrawingImage x:Key="MyImageSource" emoji:Image.Source="πŸ‘»"/>
        </Window.Resources>
        ...
        <emoji:RichTextBox FontSize="24" Margin="5"/>
        ...
        <emoji:TextBlock FontSize="24" Text="Hello! πŸ’–πŸ˜πŸ¨πŸ±β€πŸ‰πŸ‘©πŸΏβ€πŸ‘©πŸ»β€πŸ‘¦πŸ½ lol"/>
        ...
        <emoji:Picker FontSize="40"/>
        ...
        <Image Source="{StaticResource MyImageSource}"/>
        ...
        <Image emoji:Image.Source="πŸ¦‘"/>
        ...
    </Window>

More classes are to come, but feedback on what is needed is welcome.

Demo 2

Help needed!

I am not a very good WPF or even C# developer, but I think this could become a very useful and robust library if given enough care. Any help appreciated!

Version changelog

How does it work?

Emoji.Wpf renders emoji as vector images, using the WPF text rendering engine. The geometry information is found in the Segoe UI Emoji font glyphs. The colour information is found in the same font, using Microsoft’s COLR/CPAL format extensions.