Пример #1
0
        private void Accelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
        {
            TextBox editCaptionBox  = sender.GetValue(TextBoxProperty) as TextBox;
            string  _number         = editCaptionBox.Name.Replace("subtitleText", "");
            TextBox editSubtitleBox = (TextBox)appendSubtitles.FindName("subtitleEdit" + _number);

            editSubtitleBox.Text = editCaptionBox.Text;
            foreach (var _ in lyrics)
            {
                if (_.id == int.Parse(_number))
                {
                    _.subtitle = editCaptionBox.Text;
                    break;
                }
            }
        }
Пример #2
0
 public static object GetCommandParameter(KeyboardAccelerator ka) => ka.GetValue(CommandParameterProperty);
Пример #3
0
 public static ICommand GetCommand(KeyboardAccelerator ka) => ka.GetValue(CommandProperty) as ICommand;