MainWindow.xaml.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. namespace Xilium.CefGlue.Samples.WpfOsr
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. /// <summary>
  17. /// Interaction logic for MainWindow.xaml
  18. /// </summary>
  19. public partial class MainWindow : Window
  20. {
  21. public MainWindow()
  22. {
  23. InitializeComponent();
  24. }
  25. protected override void OnClosed(EventArgs e)
  26. {
  27. browser.Dispose();
  28. base.OnClosed(e);
  29. }
  30. private void addressTextBox_KeyDown_1(object sender, KeyEventArgs e)
  31. {
  32. if (e.Key == Key.Return)
  33. {
  34. browser.NavigateTo(addressTextBox.Text);
  35. }
  36. }
  37. }
  38. }