Skip to content

iNKORE-NET/UI.WPF.Emojis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iNKORE Logo

System emoji support for your WPF applications.

iNKORE.UI.WPF.Emojis

Give us a star if you like this!

Release Downloads GitHub Repo Size Last Commit Issues Latest Version Release Date Commit Activity Nuget latest version Nuget download conut

Forks Stars Watches Discussions Discord NotYoojun's Twitter

✨ Features

  • Provides drop-in replacements for TextBlock and RichTextBox, no additional code required.
  • Colored emoji! 😨 💩 🍰 ✈️ ✏️ 📞 ☘️
  • Multiracial family emoji! 👩🏿‍👩🏻‍👦🏽 👨🏻‍👩🏿‍👧🏽‍👦🏽 👩🏻‍👶🏽
  • Emoji for flags!
  • Win11 style flags!
  • Full vector emoji! Render at huge sizes without quality loss.
  • Optional support for subpixel antialiasing.
  • Lightweight; does not embed a font or emoji images; just uses the system font.
  • Works with old .NET versions such as .NET Framework 4.0.
  • Can work on Windows 7 or Windows 8 by installing the Segoe UI Emoji font in C:/Windows/Fonts.
  • Available as a Nuget package.

🧾 Details

Available classes

  • EmojiedTextBlock: an emoji-aware version of System.Windows.Controls.TextBlock.
  • EmojiedRichTextBox: an emoji-aware version of System.Windows.Controls.RichTextBox.
  • EmojiPicker: an emoji picker

Available dependency properties

  • EmojiImage.Source: attach to either System.Windows.Controls.Image control or System.Windows.Media.DrawingImage object in order to manipulate emoji images

Available runtime flags

  • bool EmojiData.EnableSubPixelRendering: enable subpixel rendering, defaults to false
  • bool EmojiData.EnableWindowsStyleFlags: enable flag rendering, defaults to autodetected

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.

🤔 Examples

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

<Window x:Class="Demo.DemoWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:clr="clr-namespace:System;assembly=mscorlib"
        xmlns:emoji="http://schemas.inkore.net/lib/ui/wpf/emojis"
        mc:Ignorable="d"
        Title="iNKORE.UI.WPF.Emojis Demo" Width="640" Height="480">
        <Window.Resources>
            <DrawingImage x:Key="MyImageSource" emoji:Image.Source="👻"/>
        </Window.Resources>
        
        <StackPanel>
            <emoji:EmojiedRichTextBox FontSize="24" Margin="5"/>
            <emoji:EmojiedTextBlock FontSize="24" Text="Hello! 💖😁🐨🐱‍🐉👩🏿‍👩🏻‍👦🏽 lol"/>
            <emoji:EmojiPicker FontSize="40"/>
            <Image Source="{StaticResource MyImageSource}"/>
            <Image emoji:EmojiImage.Source="🦑"/>
        </StackPanel>
    </Window>

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

🙋🏻‍♂️ Contribution