I want to define a big icon group like ‘select’ and put these three icons as its children, also I want to define some big icon like ‘move’. How to do?
I am also interested in this question, hope someone can give some suggestions…
Got it.
1.define a Interface.
` interface IMideaCommand
{
}`
2.add a Export type in the Action Command.
[Export(typeof(IPlugin))] [Export(typeof(IActionItem))] [Export(typeof(IMideaCommand))] public class ProductivityPredictionActionItem : ActionItem, IPlugin, IHandle<ManipulationModeChangedMessage>, IMideaCommand
3.define the MenuTool button.
` [Export(typeof(IActionItem))]
public class GalleryMenuId01Action : ActionItem, IMenuToolCommand
public GalleryMenuId01Action() : base("GalleryMenuId01", "gallerywidgets1", "rDetach", null, MenuTools.MenuTool, true, true)
private void InitMyActionItems()
{
var mediaCommands = IoC.GetAll<IMideaCommand>();
foreach (var command in mediaCommands)
{
var actionitem = command as IActionItem;
MenuItemBase item = new MenuItemBase(actionitem.Id, actionitem.Content, actionitem.IconName, this, true);
item.Execute = () => actionitem.Execute();
items.Add(item);
}
}
var item01 = new UXSiteSetup
{
UXSiteIdPath = TabAndCommand.TabID + "/" + AssemblingGroupRibbon.GroupId,
EntryId = "GalleryMenuId01",
//IconRelativePath = Method.GetResxByName("ICON") + "RULA_ANALYSIS"//"/MIoT.Resource/Image/icon/RULA_ANALYSIS.svg"
};
var actionItemtest1 = cmdRegistry.FindItem("GalleryMenuId01");
cmdRegistry.RegisterActionItem(actionItemtest1, item01, "AssemblingGroupRibbonId", -1);
`
2 Likes