hi i am migrating an application to Kryption Tookit(free version)
i have to change the base class of each form from System.Windows.Form to开发者_运维技巧 KryptonForm. it is ok.. but i have many controls which are driving from UserControl not from Form.
how can i apply krypton on this..... did anyone face such scenario ??
KryptonToolkit does not provide a replacement for UserControl
. It only provides replacement for most of the System.Windows.Forms
controls like Label
, Button
, etc.
If the UserControl
does its own painting, you can use the KryptonManager
to access all the current style attributes (colors, borders, placements, ...), and use them.
You do not need to change all your forms to inherit from KryptonForm unless you want them to have the Krypton borders and buttons. You probably want the forms to have the Krypton UI but this change is an optional change.
UserControls are just control containers and don't typically alter the rendering of the application. As Laurent suggested, the KryptonManager offers the rendering properties to your code if you are doing custom rendering. If you are using UserControls as containers then they don't need to be aware of the Krypton objects. You will need to change your input controls (text boxes, dropdowns, labels) to use the Krypton versions though.
精彩评论