Jump to content

Tutorial: Removing dividing lines from your Visual Studio based Paint.NET v5.0 Plugin!


BoltBait

Recommended Posts

Tutorial: Removing dividing lines from your Visual Studio based Paint.NET Plugin!

 (This is written from the perspective of you already having written an effect as a vs project and you want to remove

lines from it.  CodeLab can create a Visual Studio project of a CodeLab script*, and from there you can follow this tutorial.)

 

Paint.NET v5.0 really gave us plugin authors a TON of new toys.  This version introduces a completely new type of effect pipeline, a GPU accelerated pipeline.  And, most of these new toys are restricted to this new type of effect.  However, Rick did give us 2 new features for classic effects:  1) the ability to organize our UI into sections by using tabs, and 2) the ability to clean up our UI by removing the horizontal dividers between controls--described below.

 

Starting with Paint.NET v5.0, it is possible to remove the horizontal dividing lines from IndirectUI controls.

 

Compare the Brightness / Contrast dialog boxes from Paint.NET v4.3.12 (left) and v5.0a (right):

 

image.png    :RightArrowBlue:    image.png

 

This is a built-in effect dialog box, but we can use the same technique to remove the dividing lines from our own plugins.  It's easy:

 

The box on the left was built with something like this in OnCreateConfigUI():
 

configUI.SetPropertyControlValue(PropertyNames.Brightness, ControlInfoPropertyNames.DisplayName, "Brightness");
configUI.SetPropertyControlValue(PropertyNames.Contrast, ControlInfoPropertyNames.DisplayName, "Contrast");

 

and the box on the right was built like this:
 

configUI.SetPropertyControlValue(PropertyNames.Brightness, ControlInfoPropertyNames.DisplayName, "Brightness");
configUI.SetPropertyControlValue(PropertyNames.Brightness, ControlInfoPropertyNames.ShowHeaderLine, false);
configUI.SetPropertyControlValue(PropertyNames.Contrast, ControlInfoPropertyNames.DisplayName, "Contrast");
configUI.SetPropertyControlValue(PropertyNames.Contrast, ControlInfoPropertyNames.ShowHeaderLine, false);

 

 

We just need to tell IndirectUI not to show the header line for the desired controls.

 

 

  • Like 1
  • Thanks 1
  • Upvote 1
Link to comment
Share on other sites

  • BoltBait changed the title to Tutorial: Removing dividing lines from your Visual Studio based Paint.NET v5.0 Plugin!
  • Rick Brewster pinned this topic
  • BoltBait unpinned and featured this topic
  • BoltBait unpinned this topic

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.

×
×
  • Create New...