Search code examples
c#.netwinformscolor-picker

How to make ColorDialog to allow to set chosen color's transparency?


I don't see any fields available for that. I tried all this:

        ColorDialog cd = new ColorDialog();
        cd.AnyColor = true;
        cd.AllowFullOpen = true;
        cd.SolidColorOnly = false;   

but it probably does something else.

If it impossible to do so with win forms control, maybe there is WPF color picker that I could use in WPFHost element?


Solution

  • The AlphaColorDialog project can be downloaded from sourceforge at: https://sourceforge.net/projects/alpha-color-dialog/

    Source C# files are in the src folder in the zip file.

    enter image description here