Beispiel #1
0
        private void commentBox_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Return && commentBox.Text.Trim() != string.Empty)
            {
                if (App.IS_LOGGED)
                {
                    ViewModel.PostComment(App.USER_IDX, commentBox.Text);
                }
                else
                {
                    ShowLoginDialog();
                }

                commentBox.Text = string.Empty;

                Keyboard.ClearFocus();
            }
        }