开发者

C# : How to apply Krypton ToolKit on User Control

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜