public void CreateContextMenu(ContextMenuControlProperties props, string id, string title, string description, string maxWidth) { ContextMenu menu = new ContextMenu(this, id, title, description, null); if (props == null) { props = new ContextMenuControlProperties(); } props.CommandMenuOpen = ContextMenuRootProperties.CommandMenuOpen; props.CommandMenuClose = ContextMenuRootProperties.CommandMenuClose; ContextMenuControl control = new ContextMenuControl( this, id + "Launcher", props, menu); _createdMenuControls[id] = control; ContextMenuDock dock = new ContextMenuDock(this, "dock" + id); dock.AddChild(control.CreateComponentForDisplayMode("Menu")); this.AddChild(dock); this.Refresh(); }
public void CreateContextMenu(ContextMenuControlProperties props, string id, string title, string description, string maxWidth) { ContextMenu menu = new ContextMenu(this, id, title, description, null); if (props == null) props = new ContextMenuControlProperties(); props.CommandMenuOpen = ContextMenuRootProperties.CommandMenuOpen; props.CommandMenuClose = ContextMenuRootProperties.CommandMenuClose; ContextMenuControl control = new ContextMenuControl( this, id + "Launcher", props, menu); _createdMenuControls[id] = control; ContextMenuDock dock = new ContextMenuDock(this, "dock" + id); dock.AddChild(control.CreateComponentForDisplayMode("Menu")); this.AddChild(dock); this.Refresh(); }