System emoji support for your WPF applications.
Give us a star if you like this!
- Provides drop-in replacements for
TextBlock
andRichTextBox
, 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.
EmojiedTextBlock
: an emoji-aware version ofSystem.Windows.Controls.TextBlock
.EmojiedRichTextBox
: an emoji-aware version ofSystem.Windows.Controls.RichTextBox
.EmojiPicker
: an emoji picker
EmojiImage.Source
: attach to eitherSystem.Windows.Controls.Image
control orSystem.Windows.Media.DrawingImage
object in order to manipulate emoji images
bool EmojiData.EnableSubPixelRendering
: enable subpixel rendering, defaults tofalse
bool EmojiData.EnableWindowsStyleFlags
: enable flag rendering, defaults to autodetected
- 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.
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.
-
This repository is based on https://github.com/samhocevar/emoji.wpf
-
Want to contribute? The team encourages community feedback and contributions.
-
If the project is not working properly, please file a report. We welcome any issues and pull requests submitted on GitHub.
-
Sponsor us at https://inkore.net/about/members/notyoojun#sponsor