Message 1 of 3

Not applicable
11-03-2016
07:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I hope to add the context menu to the Blockreference and on the specific Layrer(eg,the block on the TestLayer show contextmenu)
how to do?
private static ContextMenuExtension menuExtension; internal static void Attach() { menuExtension = new ContextMenuExtension(); MenuItem item = new MenuItem("To Red"); item.Click += new EventHandler(item_Click); menuExtension.MenuItems.Add(item); => RXClass rxClass = Entity.GetClass(typeof(BlockReference)); .....=>(how to add Layer filter) Application.AddObjectContextMenuExtension(rxClass, menuExtension); }
Solved! Go to Solution.