Detecting language please wait for.......
I am referring to this article that describes how to use WPF in Studio 2021 compatible plugins:
I read through this piece of documentation and I have tried to use the information and create a view for one of my plugins using WPF. But I not getting anywhere with this description.
Question: If upgrading existing plugins that implement views and view parts - are we forced to use WPF from now on or can we still use Windows forms as before?
Can you describe what would be necessary to upgrade the plugins and keep existing views/view parts intact?
Hi Tom Imhof,
You are not forced to use WPF, below you can find a code sample of a plugin migrated to Studio 2021 which has a view part in Windows Forms.
Is your VB control implementing IUIControl interface?
I had a look at the CleanupTasks plugin and there I found that you initialize the view with this command:
var control = GetControl() as CleanUpSourceSettingsControl;
Is that correct?
Question: The interface in Studio 2021 is set to type IUIControl and not Control as the line above would suggest:
Accordingly, I construct it like this:
The plugin then compiles fine, but when I launch Studio 2021, I am getting:
If I change the code to this (resembling the line above "var control = GetControl() as CleanUpSourceSettingsControl;" in VB.net, i.e. using the Control interface and a Function (not a Protected override function), like this:
I am getting the same error when Studio 2021 is launched with the plugin:
Can you tell me what I am doing wrong?
Many thanks in advance!
Many thanks - this was the hint I needed :)
Starting from this:
I added this to my ViewControl:
Inherits UserControl Implements IUIControl
This did the trick