public override void RunCommand(ICommand command, ExecutedRoutedEventArgs args) { if (command == ViewCommands.ToggleVisibility) { ToggleVisibility(); } else if (command == ViewCommands.GetWebViewBounds) { ShowWebViewBounds(); } else if (command == ViewCommands.ZoomHalf) { SetZoomFactor(.5f); } else if (command == ViewCommands.ZoomWhole) { SetZoomFactor(1f); } else if (command == ViewCommands.ZoomTwice) { SetZoomFactor(2f); } else if (command == ViewCommands.Area25Percent) { } else if (command == ViewCommands.Area50Percent) { } else if (command == ViewCommands.Area75Percent) { } else if (command == ViewCommands.Area100Percent) { } else if (command == ViewCommands.SetFocus) { _webView2.Focus(); } else if (command == ViewCommands.TabIn) { _webView2.MoveFocus(WEBVIEW2_MOVE_FOCUS_REASON.WEBVIEW2_MOVE_FOCUS_REASON_NEXT); } else if (command == ViewCommands.ReverseTabIn) { _webView2.MoveFocus(WEBVIEW2_MOVE_FOCUS_REASON.WEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS); } else if (command == ViewCommands.ToggleTabHandling) { _parent.AutoTabHandle = !_parent.AutoTabHandle; } }
private void tabInToolStripMenuItem_Click(object sender, EventArgs e) { _webView2Control.MoveFocus(WEBVIEW2_MOVE_FOCUS_REASON.WEBVIEW2_MOVE_FOCUS_REASON_NEXT); }