How can i know If user click Enter
in keyboard in RichEditBox
?
this code does not work
private void Editor_KeyDown(object sender, KeyRoutedEventArgs e)
{
var dia = new MessageDialog(e.Key + "");
dia.ShowAsync();
}
also This code does not work
private void Editor_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.OriginalKey == (VirtualKey)(char)13)
{
NumberEditor.Text += Convert.ToString(_LineNum) + Environment.NewLine;
++_LineNum;
}
}
How can i get line of row in RichEditBox
and how can i change text from code in RichEditBox
?
I want to make an Editor and any help is appreciated.
Regards