using PDF_Master.ViewModels.EditTools.Background; using System.Windows.Controls; namespace PDF_Master.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); } } } }