MainMenuOwnCustomItem
interface cAlgo.API Since 5.4
DesktopCLICloud
Represents a custom item in main menu which is owned / added by plugin.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
public interface MainMenuOwnCustomItem
Namespace: cAlgo.API · Group: MainMenu · Implements: MainMenuCustomItem, MainMenuItem
Examples
var icon = new SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>");
MainMenuOwnCustomItem item = MainMenu.AddItem("My Item", icon);
var webView = new WebView();
webView.Loaded += _ => webView.NavigateAsync("https://help.ctrader.com/");
item.Child = webView;
MainMenu.TryChangeSelectedItem(item);
icon = SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>")
item = api.MainMenu.AddItem("My Item", icon)
webView = WebView()
webView.Loaded += lambda _: webView.NavigateAsync("https://help.ctrader.com/")
item.Child = webView
api.MainMenu.TryChangeSelectedItem(item)
Properties
| Name | Description |
|---|---|
ChildDesktopCLICloudControlBase | Get / set content of item. |
Inherited members
From MainMenuCustomItem: Name