This project has moved. For the latest updates, please go here.

How To Load Xaml As GUI

Topics: Editor UI
Apr 25, 2013 at 9:45 PM
Hi Jacobi, its been a while...

Could you give me some pointers on how to show a xaml file as the plugin GUI

I understand you create a PluginEditor file which Inherits the IVstPluginEditor interface
and on the VB.Net side you load the xaml file dynamically but I can't figure out how to deliver
the UI. Would it be in the open method?

I would greatly appreciate a small example in VB.Net if possible.

Apr 26, 2013 at 5:43 AM

Take a look at the CorePlugin Sample project. It demonstrates how to use WPF as a GUI - although its in C# I am sure its not too difficult to translate that to VB.NET. One trick you could try is to compile the project and load it into Reflecor (not sure if IL Spy supports multiple langauges) and display the byte-code as it were VB.NET.

The WpfControlWrapper<T> class adapts the WPF UserControl to work with the Plugin Editor object.

Note that the sample defaults to WinForms. Read the readme.txt and execute the steps described there.

Hope it helps.
Apr 26, 2013 at 7:21 AM
Thanks, I managed to compile the example but I get this error when I run the plugin

Apr 26, 2013 at 9:20 AM
The EditorControl.AddLine method is called on a different thread as the thread that created the control.

You can fix this by using Dispatcher.Invoke.

I will fix it also in the source code.
Apr 26, 2013 at 9:21 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Apr 26, 2013 at 1:54 PM
Ok thanks