Did I make a mistake with Native UI Menu?
-
Ok, so I spent a couple hours creating a Native UI Menu in VB.Net from a C# Template. The image below shows the WIP, very simple but customized to my use.
All good except when I got to the most important part. Capturing the selection and running the associated code. Why? Because the method from C# is not there for VB.Net. So I'm now thinking, does Native UI support VB.Net? If no, I'll rewrite everything in C#, if it does, can some kind soul provide some guidance?
This is the code from the c# template. The missing method is OnItemSelect.var button1 = new UIMenuItem("Button 1", "Description for ~b~Button 1"); // Creates a button that displays text sub1.AddItem(button1); // Adds the created item onto the menu/submenu sub1.OnItemSelect += (sender, item, index) => // Checks if the button is selected { if (item == button1) // If statement { // Add code here } };