using PDF_Office.ViewModels.EditTools.Background; using System.Windows.Controls; namespace PDF_Office.Views.EditTools.Background { /// /// Interaction logic for BackgroundDocumentContent /// public partial class BackgroundDocumentContent : UserControl { public BackgroundDocumentContent() { InitializeComponent(); } private void CurrentPageIndexBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if(e.Key == System.Windows.Input.Key.Enter) { var data = this.DataContext as BackgroundDocumentContentViewModel; data.GoToPageCommand?.Execute(sender); } } } }