Skip to content

Commit 1986f9e

Browse files
committed
WPF Example - Add Zoom out to menu
1 parent cf97324 commit 1986f9e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CefSharp.Wpf.Example/MainWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<MenuItem Header="_Close Tab" Command="Close"/>
1717
<MenuItem Header="_Open DevTools" Command="controls:CefSharpCommands.CustomCommand" CommandParameter="OpenDevTools"/>
1818
<MenuItem Header="Zoom In" Command="controls:CefSharpCommands.CustomCommand" CommandParameter="ZoomIn"/>
19+
<MenuItem Header="Zoom Out" Command="controls:CefSharpCommands.CustomCommand" CommandParameter="ZoomOut"/>
1920
<MenuItem Header="Zooom Reset" Command="controls:CefSharpCommands.CustomCommand" CommandParameter="ZoomReset"/>
2021
<MenuItem Header="_Exit" Command="controls:CefSharpCommands.Exit"/>
2122
</MenuItem>

CefSharp.Wpf.Example/MainWindow.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ private void CustomCommandBinding(object sender, ExecutedRoutedEventArgs e)
119119
cmd.Execute(null);
120120
}
121121

122+
if (param == "ZoomOut")
123+
{
124+
var cmd = browserViewModel.WebBrowser.ZoomOutCommand;
125+
cmd.Execute(null);
126+
}
127+
122128
if (param == "ZoomReset")
123129
{
124130
var cmd = browserViewModel.WebBrowser.ZoomResetCommand;

0 commit comments

Comments
 (0)