DekGenius.com
[ Team LiB ] Previous Section Next Section

ColorDialogmarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)class

This common dialog allows you to present a standard interface to allow the user to select and define a color. You can programmatically show or hide the custom color definition part of the dialog by default by specifying the FullOpen property, and you can predefine the set of custom colors by using the CustomColors property. Unfortunately, this betrays its interop origins, because the colors have to be specified as Int32 values encapsulating the ARGB color, rather than as an array of System.Drawing.Color values.

You can retrieve the user's selection through the System.Drawing.Color property.

public class ColorDialog : CommonDialog {
// Public Constructors
   public ColorDialog();
// Public Instance Properties
   public virtual bool AllowFullOpen{set; get; }
   public virtual bool AnyColor{set; get; }
   public Color Color{set; get; }
   public int[ ] CustomColors{set; get; }
   public virtual bool FullOpen{set; get; }
   public virtual bool ShowHelp{set; get; }
   public virtual bool SolidColorOnly{set; get; }
// Protected Instance Properties
   protected virtual IntPtr Instance{get; }
   protected virtual int Options{get; }
// Public Instance Methods
   public override void Reset();  // overrides CommonDialog
   public override string ToString();  // overrides System.ComponentModel.Component
// Protected Instance Methods
   protected override bool RunDialog(IntPtr hwndOwner);  // overrides CommonDialog
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) CommonDialog ColorDialog

    [ Team LiB ] Previous Section Next Section