Пример #1
0
 private async Task OnElementKeyDownAsync(KeyRoutedEventArgs e, [FromDI] IDependency1 dependency1, [FromDI] IDependency2 dependency2, [FromDI] IDependency3 dependency3)
 {
     await Task.Run(() =>
     {
         KeyDownAssertionHandler?.Invoke(e.Key());
         DependencyArgumentsHandler?.Invoke(dependency1, dependency2, dependency3);
     });
 }
Пример #2
0
        private void OnTodoContentTextBoxKeyDown(KeyRoutedEventArgs e)
        {
            if (e.Key() != VirtualKey.Enter)
            {
                return;
            }

            Content.AddCurrentTodoContent();
        }
Пример #3
0
        private void OnTodoContentTextBoxKeyDown(KeyRoutedEventArgs e)
        {
            switch (e.Key())
            {
            case VirtualKey.Enter:
                TodoItem.CompleteEdit();
                break;

            case VirtualKey.Escape:
                TodoItem.CancelEdit();
                break;
            }
        }
Пример #4
0
 protected void OnElementKeyDown(KeyRoutedEventArgs e)
 {
     KeyDownAssertionHandler?.Invoke(e.Key());
 }
Пример #5
0
 protected void OnElementKeyDown(KeyRoutedEventArgs e, [FromDI] IDependency1 dependency1, [FromDI] IDependency2 dependency2, [FromDI] IDependency3 dependency3)
 {
     KeyDownAssertionHandler?.Invoke(e.Key());
     DependencyArgumentsHandler?.Invoke(dependency1, dependency2, dependency3);
 }
Пример #6
0
 private async Task OnElementKeyDown(KeyRoutedEventArgs e)
 {
     await Task.Run(() => KeyDownAssertionHandler?.Invoke(e.Key()));
 }