Skip to content

WebViewNavigationCompletedEventArgs.WebView

property · WebViewNavigationCompletedEventArgs · cAlgo.API

DesktopCLICloud

The WebView control.

Environment behaviour

CLI — not supported. Never raised in the CLI: the events that pass it never fire there (WebView.NavigationCompleted).

Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (WebView.NavigationCompleted).

Definition

public WebView WebView {get;}
webViewNavigationCompletedEventArgs.WebView: WebView

Returns WebView

Examples

protected override void OnStart()
{
    var webView = new WebView();
    webView.NavigationCompleted += OnNavigationCompleted;
    Chart.AddControl(webView);
    webView.NavigateAsync("https://ctrader.com/");
}

private void OnNavigationCompleted(WebViewNavigationCompletedEventArgs args)
{
    args.WebView.ExecuteScriptAsync("document.body.style.zoom = '80%'");
}
def on_start(self):
    webView = WebView()
    webView.NavigationCompleted += self.on_navigation_completed
    api.Chart.AddControl(webView)
    webView.NavigateAsync("https://ctrader.com/")

def on_navigation_completed(self, args):
    args.WebView.ExecuteScriptAsync("document.body.style.zoom = '80%'")