From 3e778a08038f378744ff4aa9ea0935ce33699673 Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Wed, 24 Jul 2013 10:03:02 +0300 Subject: [PATCH] Disabled stuff which isn't working properly at the moment, and made the URL textbox at least *display* the current URL being browsed to... --- CefSharp.Wpf.Example/MainWindow.xaml | 7 +++++-- CefSharp.Wpf.Example/MainWindow.xaml.cs | 2 +- CefSharp.Wpf/WebView.cs | 12 ++++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CefSharp.Wpf.Example/MainWindow.xaml b/CefSharp.Wpf.Example/MainWindow.xaml index f26c960d5..52db32070 100644 --- a/CefSharp.Wpf.Example/MainWindow.xaml +++ b/CefSharp.Wpf.Example/MainWindow.xaml @@ -100,10 +100,13 @@ + DockPanel.Dock="Right" + IsEnabled="False">Go + KeyDown="OnUrlTextBoxKeyDown" + Text="{Binding Uri, Mode=OneWay, ElementName=webView}" + IsEnabled="False" /> diff --git a/CefSharp.Wpf.Example/MainWindow.xaml.cs b/CefSharp.Wpf.Example/MainWindow.xaml.cs index 8bbf20620..6f4e4e757 100644 --- a/CefSharp.Wpf.Example/MainWindow.xaml.cs +++ b/CefSharp.Wpf.Example/MainWindow.xaml.cs @@ -91,7 +91,7 @@ namespace CefSharp.Wpf.Example } } - private void urlTextBox_KeyDown(object sender, KeyEventArgs e) + private void OnUrlTextBoxKeyDown(object sender, KeyEventArgs e) { if (e.Key != Key.Enter) { diff --git a/CefSharp.Wpf/WebView.cs b/CefSharp.Wpf/WebView.cs index d674c23cc..b335bccae 100644 --- a/CefSharp.Wpf/WebView.cs +++ b/CefSharp.Wpf/WebView.cs @@ -196,11 +196,18 @@ namespace CefSharp.Wpf private void OnBrowserCorePropertyChanged(Object sender, PropertyChangedEventArgs e) { - if (e.PropertyName != "TooltipText") + if (e.PropertyName == "TooltipText") { - return; + HandleTooltipUpdate(); } + else if (e.PropertyName == "Address") + { + Uri = browserCore.Address; + } + } + private void HandleTooltipUpdate() + { timer.Stop(); if (String.IsNullOrEmpty(browserCore.TooltipText)) @@ -248,6 +255,7 @@ namespace CefSharp.Wpf var point = e.GetPosition(this); renderClientAdapter.OnMouseMove((int) point.X, (int) point.Y, mouseLeave: false); } + protected override void OnMouseWheel(System.Windows.Input.MouseWheelEventArgs e) { base.OnMouseWheel(e);