BackgroundDocumentContent.xaml.cs 749 B

12345678910111213141516171819202122232425
  1. using PDF_Office.ViewModels.EditTools.Background;
  2. using System.Windows.Controls;
  3. namespace PDF_Office.Views.EditTools.Background
  4. {
  5. /// <summary>
  6. /// Interaction logic for BackgroundDocumentContent
  7. /// </summary>
  8. public partial class BackgroundDocumentContent : UserControl
  9. {
  10. public BackgroundDocumentContent()
  11. {
  12. InitializeComponent();
  13. }
  14. private void CurrentPageIndexBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
  15. {
  16. if(e.Key == System.Windows.Input.Key.Enter)
  17. {
  18. var data = this.DataContext as BackgroundDocumentContentViewModel;
  19. data.GoToPageCommand?.Execute(sender);
  20. }
  21. }
  22. }
  23. }