Upgrading plugins for Studio 2021

Hi there,

I am referring to this article that describes how to use WPF in Studio 2021 compatible plugins:

https://community.sdl.com/developers-more/developers/language-developers/w/wiki/5294/api-improvements-in-studio-2021

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?

thanks

Tom

Top Replies

Parents Reply
  • Hello Andrea, 

    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!

    Tom

Children