Hosam Aly
Hosam Aly

Reputation: 42474

Is it possible to customize a WindowsForms ColorDialog in .NET?

Is it somehow possible to customize or subclass System.Windows.Forms.ColorDialog to add a few buttons? I know that it uses the native Windows color dialog, but is there a way to customize it from .NET?

Upvotes: 1

Views: 393

Answers (1)

ShuggyCoUk
ShuggyCoUk

Reputation: 36476

Since the class is not sealed you could extend it and attempt to modify its behaviour but the underlying display of the dialog is via creation of the plain win32 dialog and hooking into it's message dispatch loop. As such simply attempting to add managed controls would not work.

Several people have implemented their own fully managed variants which you may wish to use/alter to your needs instead. This example is probably one of the best places to start since it covers several different approaches and contains the source.

Upvotes: 2

Related Questions