HeaderFooterDocumentContent.xaml.cs 785 B

123456789101112131415161718192021222324
  1. using PDF_Master.ViewModels.EditTools.HeaderFooter;
  2. using System.Windows.Controls;
  3. namespace PDF_Master.Views.EditTools.HeaderFooter
  4. {
  5. /// <summary>
  6. /// Interaction logic for HeaderFooterDocumentContent
  7. /// </summary>
  8. public partial class HeaderFooterDocumentContent : UserControl
  9. {
  10. public HeaderFooterDocumentContent()
  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 HeaderFooterDocumentContentViewModel;
  19. data.GoToPageCommand?.Execute(sender);
  20. }
  21. }
  22. }
  23. }