Skip to content

MainMenuOwnCustomItem.Child

property · MainMenuOwnCustomItem · cAlgo.API Since 5.4

DesktopCLICloud

Get / set content of item.

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

ControlBase Child {get; set;}
mainMenuOwnCustomItem.Child: ControlBase

Returns ControlBase

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>");
var item = MainMenu.AddItem("My Item", icon);
var panel = new StackPanel();
panel.AddChild(new TextBlock { Text = "Plugin page content" });
item.Child = panel;
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)
panel = StackPanel()
textBlock = TextBlock()
textBlock.Text = "Plugin page content"
panel.AddChild(textBlock)
item.Child = panel