Hack Forums
[.NET] Custom theme controls not showing in designer. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Custom theme controls not showing in designer. (/showthread.php?tid=5218200)



Custom theme controls not showing in designer. - Specs - Mar 28, 2016

Hey guys, im not one to usually ask for help around here, but i've run into an issue i cant seem to fix and i cant find a working solution online.

I compiled the ModernUI .dll and imported it into my project. It skins my form perfectly but when i drag on controls it doesn't display but goes onto the panel below where you usually see timers. The only thing that seemed to work was a ComboBox.

Would anyone happen to know why they wont display & possibly how to resolve the issue? Any help would be great! 🙂


* - Hawk HF - Mar 28, 2016

I've never heard of ModernUI. Can you link us to the source?


* - Specs - Mar 28, 2016

(Mar 28, 2016 04:33 AM)Hawk HF Wrote:  I've never heard of ModernUI. Can you link us to the source?

Its the MetroFramework ModernUI, you can find it here: https://github.com/dennismagno/metroframework-modern-ui


* - Hawk HF - Mar 28, 2016

I'm not exactly sure what's causing this. The controls seem to inherit from relevant classes.
Code
public class MetroButton : Button, IMetroControl

It may be something to do with this line (can be found in most of the controls):
Code
[Designer("MetroFramework.Design.Controls.MetroTextBoxDesigner, " + AssemblyRef.MetroFrameworkDesignSN)]



* - Odus - Mar 28, 2016

You may have added them incorrectly. Right click toolbox -> choose items -> browse -> select lib -> rebuild

Also have your form inherit from MetroForm instead of the standard Form control. That might have something to do with it.


* - Specs - Mar 28, 2016

(Mar 28, 2016 05:25 AM)Odus Wrote:  You may have added them incorrectly. Right click toolbox -> choose items -> browse -> select lib -> rebuild

Also have your form inherit from MetroForm instead of the standard Form control. That might have something to do with it.

My form is already Inheriting from the MetroForm, and i tried to reinstall them, still unsuccessful. Thanks for the help though.


* - Odus - Mar 28, 2016

(Mar 28, 2016 05:33 AM)Specs Wrote:  My form is already Inheriting from the MetroForm, and i tried to reinstall them, still unsuccessful. Thanks for the help though.

Hrm. Try it on a new project and install from NuGet.


* - Specs - Mar 28, 2016

(Mar 28, 2016 05:35 AM)Odus Wrote:  Hrm. Try it on a new project and install from NuGet.

Okay, i forgot to try NuGet, ill try now & let you know how it goes.

EDIT: Yes, installing from NuGet seemed to get it to work for me, thank you @Odus