Skip to content

WebView.StopAsync

method · WebView · cAlgo.API

DesktopCLICloud

Stops asynchronously all navigations and pending resource fetches.

Environment behaviour

CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Definition

public void StopAsync()
webView.StopAsync() -> None

Examples

var webView = new WebView { Height = 300 };
webView.NavigateAsync("https://ctrader.com/");
var stopButton = new Button { Text = "Stop loading" };
stopButton.Click += args => webView.StopAsync();
var panel = new StackPanel();
panel.AddChild(stopButton);
panel.AddChild(webView);
Chart.AddControl(panel);
webView = WebView()
webView.Height = 300
webView.NavigateAsync("https://ctrader.com/")
stopButton = Button()
stopButton.Text = "Stop loading"
stopButton.Click += lambda args: webView.StopAsync()
panel = StackPanel()
panel.AddChild(stopButton)
panel.AddChild(webView)
api.Chart.AddControl(panel)