Exemplo n.º 1
0
        protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
        {
            base.OnPropertyChanged(e);

            if (e.Property == TextProperty)
            {
                Inlines.Clear();

                var canvas = new EmojiCanvas();
                canvas.Reset(Text, FontSize);
                Inlines.Add(new InlineUIContainer(canvas));
            }
        }
Exemplo n.º 2
0
 // Need an empty constructor for serialisation (undo/redo)
 public EmojiInline()
 {
     // FIXME: not sure this is the correct value; but Baseline does not work.
     BaselineAlignment = BaselineAlignment.TextBottom;
     Child             = new EmojiCanvas();
 }