Jump to content

Creating an effect dialog without IndirectUI


davidf
 Share

Recommended Posts

IndirectUI is great, but for a plugin I am thinking of writing I will need to use some other kinds of controls ... but I still want it to feel like Paint.net.

Is there anywhere I can find the code used to create the various controls that exist in IndirectUI (i.e. to do what PropertyBasedEffect.OnCreateConfigUI() does by hand?).

Link to comment
Share on other sites

There's no way of using IndirectUI like that. If you want a custom dialog, you can't derive from PropertyBasedEffect or use IndirectUI. You'll have to create a WinForms dialog and do all the data binding yourself, a fragile and bug prone way of doing things (which is why IndirectUI exists).

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Seen the Visual Studio plugin template? Find it here:

It works with a bit of tinkering. Follow BoltBait's guide in post #4 of that thread.

I use it with the Express Edition of VS - so you don't even need to spend $$.

Link to comment
Share on other sites

There's no way of using IndirectUI like that. If you want a custom dialog, you can't derive from PropertyBasedEffect or use IndirectUI. You'll have to create a WinForms dialog and do all the data binding yourself, a fragile and bug prone way of doing things (which is why IndirectUI exists).

OK, that's fine -- I can understand the reason for doing things that way. But it would be great if there was a way to extend PropertyBasedEffect one day to allow custom WinForms controls to be added to it.

Thanks! (I really do appreciate the existence of IndirectUI after coding an effect that uses it ... it definitely makes things easier).

Seen the Visual Studio plugin template? Find it here: http://forums.getpai...lugin-template/

It works with a bit of tinkering. Follow BoltBait's guide in post #4 of that thread.

I use it with the Express Edition of VS - so you don't even need to spend $$.

Yep, I've had a go at using it already -- thanks.

Edited by davidf
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...