-
Notifications
You must be signed in to change notification settings - Fork 121
/
MainWindow.xaml.cs
41 lines (36 loc) · 1.15 KB
/
MainWindow.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Windows;
using Neutronium.WebBrowserEngine.ChromiumFx;
using System.Diagnostics;
namespace Example.ChromiumFX.Vue.UI
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
DataContext = new object();
wcBrowser.OnDisplay += WcBrowser_OnDisplay;
}
private void WcBrowser_OnDisplay(object sender, Neutronium.Core.Navigation.DisplayEvent e)
{
var windowCfx = wcBrowser.WPFWebWindow as IWPFCfxWebWindow;
windowCfx.ChromiumWebBrowser.DragHandler.OnDragEnter += DragHandler_OnDragEnter;
}
private void DragHandler_OnDragEnter(object sender, Chromium.Event.CfxOnDragEnterEventArgs e)
{
Trace.WriteLine("OnDragEnter fired");
}
protected override void OnClosed(EventArgs e)
{
this.wcBrowser.Dispose();
base.OnClosed(e);
}
}
}