diff --git a/CefFlashBrowser/Views/BrowserWindow.xaml b/CefFlashBrowser/Views/BrowserWindow.xaml
index 380bcdc..2488a81 100644
--- a/CefFlashBrowser/Views/BrowserWindow.xaml
+++ b/CefFlashBrowser/Views/BrowserWindow.xaml
@@ -187,8 +187,8 @@
Command="{Binding ElementName=browser, Path=StopCommand}"/>
-
+
diff --git a/CefFlashBrowser/Views/BrowserWindow.xaml.cs b/CefFlashBrowser/Views/BrowserWindow.xaml.cs
index 2d3bdc3..dfa44a5 100644
--- a/CefFlashBrowser/Views/BrowserWindow.xaml.cs
+++ b/CefFlashBrowser/Views/BrowserWindow.xaml.cs
@@ -4,10 +4,12 @@
using CefFlashBrowser.Utils;
using CefFlashBrowser.WinformCefSharp4WPF;
using CefSharp;
+using SimpleMvvm.Command;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
+using System.Windows.Input;
using System.Windows.Interop;
namespace CefFlashBrowser.Views
@@ -119,6 +121,9 @@ public override bool OnContextMenuCommand(IWebBrowser chromiumWebBrowser, IBrows
private bool _isMaximizedBeforeFullScreen = false;
+ public ICommand ToggleFullScreenCommand { get; }
+
+
public bool FullScreen
{
get { return (bool)GetValue(FullScreenProperty); }
@@ -132,6 +137,8 @@ public bool FullScreen
public BrowserWindow()
{
+ ToggleFullScreenCommand = new DelegateCommand(() => { FullScreen = !FullScreen; });
+
InitializeComponent();
WindowSizeInfo.Apply(GlobalData.Settings.BrowserWindowSizeInfo, this);
@@ -151,13 +158,13 @@ private static void OnFullScreenChange(DependencyObject d, DependencyPropertyCha
if (window._isMaximizedBeforeFullScreen)
window.WindowState = WindowState.Normal;
- window.Topmost = true;
+ //window.Topmost = true;
window.WindowStyle = WindowStyle.None;
window.WindowState = WindowState.Maximized;
}
else
{
- window.Topmost = false;
+ //window.Topmost = false;
window.WindowStyle = WindowStyle.SingleBorderWindow;
window.WindowState = WindowState.Normal;