public MaskedTextBoxTextEditorDropDown(MaskedTextBox maskedTextBox)
        {
            _cloneMtb      = MaskedTextBoxDesigner.GetDesignMaskedTextBox(maskedTextBox);
            _errorProvider = new ErrorProvider();
            ((System.ComponentModel.ISupportInitialize)(_errorProvider)).BeginInit();

            SuspendLayout();
            //
            // maskedTextBox
            //
            _cloneMtb.Dock = DockStyle.Fill;

            // Include prompt and literals always so editor can process the text value in a consistent way.
            _cloneMtb.TextMaskFormat = MaskFormat.IncludePromptAndLiterals;

            // Escape prompt, literals and space so input is not rejected due to one of these characters.
            _cloneMtb.ResetOnPrompt = true;
            _cloneMtb.SkipLiterals  = true;
            _cloneMtb.ResetOnSpace  = true;

            _cloneMtb.Name               = "MaskedTextBoxClone";
            _cloneMtb.TabIndex           = 0;
            _cloneMtb.MaskInputRejected += new MaskInputRejectedEventHandler(maskedTextBox_MaskInputRejected);
            _cloneMtb.KeyDown           += new KeyEventHandler(maskedTextBox_KeyDown);

            //
            // errorProvider
            //
            _errorProvider.BlinkStyle       = ErrorBlinkStyle.NeverBlink;
            _errorProvider.ContainerControl = this;

            //
            // MaskedTextBoxTextEditorDropDown
            //
            Controls.Add(_cloneMtb);

            BackColor   = Drawing.SystemColors.Control;
            BorderStyle = BorderStyle.FixedSingle;
            Name        = "MaskedTextBoxTextEditorDropDown";
            Padding     = new Padding(16);
            Size        = new Drawing.Size(100, 52);
            ((System.ComponentModel.ISupportInitialize)(_errorProvider)).EndInit();
            ResumeLayout(false);
            PerformLayout();
        }
 private void maskedTextBox_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
 {
     _errorProvider.SetError(_cloneMtb, MaskedTextBoxDesigner.GetMaskInputRejectedErrorMessage(e));
 }