Mohsan
Mohsan

Reputation: 2509

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 ??

Upvotes: 1

Views: 3638

Answers (2)

Chris Porter
Chris Porter

Reputation: 3687

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.

Upvotes: 0

Laurent Etiemble
Laurent Etiemble

Reputation: 27909

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.

Upvotes: 4

Related Questions