diff --git a/Directory.Packages.props b/Directory.Packages.props index 2728da34da..006e45297a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -26,7 +26,7 @@ - + diff --git a/Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs b/Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs index a4326f1575..9b41f04a26 100644 --- a/Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs +++ b/Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs @@ -16,7 +16,7 @@ public override void Main () using Window window = new () { Title = GetQuitKeyAndName () }; - var txt = $"Hello World{Environment.NewLine}HELLO WORLD{Environment.NewLine}?? ??"; + var txt = $"Hello World{Environment.NewLine}HELLO WORLD{Environment.NewLine}🦮 👨‍👩‍👧"; SchemeManager.AddScheme ("TextAlignmentAndDirection1", new Scheme { Normal = new Attribute (Color.Black, Color.Gray) }); SchemeManager.AddScheme ("TextAlignmentAndDirection2", new Scheme { Normal = new Attribute (Color.Black, Color.DarkGray) }); @@ -423,21 +423,27 @@ public override void Main () Text = "Edit Text:" }; - Editor editText = new () { X = Pos.Right (label) + 1, Y = Pos.Top (label), Width = Dim.Fill (31), Height = 3 }; - editText.Text = txt; + Editor editText = new () + { + X = Pos.Right (label) + 1, + Y = Pos.Top (label), + Width = Dim.Fill (31), + Height = 3, + Text = txt + }; - window.KeyDown += (_, _) => - { - foreach (View v in singleLineLabels) - { - v.Text = editText.Text; - } + editText.Document?.Changed += (_, _) => + { + foreach (View v in singleLineLabels) + { + v.Text = editText.Text; + } - foreach (View v in multiLineLabels) - { - v.Text = editText.Text; - } - }; + foreach (View v in multiLineLabels) + { + v.Text = editText.Text; + } + }; editText.SetFocus ();