Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }