/// <summary> /// Initializes a new instance of the MaskedBehavior class by copying it from /// another MaskedBehavior object. </summary> /// <param name="behavior"> /// The MaskedBehavior object to copied (and then disposed of). It must not be null. </param> /// <exception cref="ArgumentNullException">behavior is null. </exception> /// <remarks> /// After the behavior.TextBox object is copied, Dispose is called on the behavior parameter. </remarks> public MaskedBehavior(MaskedBehavior behavior) : base(behavior) { m_mask = behavior.m_mask; m_symbols = behavior.m_symbols; }
/// <summary> /// Initializes a new instance of the MaskedTextBox class by assigning its Behavior field /// to an instance of <see cref="MaskedBehavior" /> and setting its mask. </summary> /// <param name="mask"> /// The mask string to use for validating and/or formatting the characters entered by the user. /// By default, the <c>#</c> symbol is configured to represent a digit placeholder on the mask. </param> public MaskedTextBox(string mask) { m_behavior = new MaskedBehavior(this, mask); }
/// <summary> /// Initializes a new instance of the MaskedTextBox class by explicitly assigning its Behavior field. </summary> /// <param name="behavior"> /// The <see cref="MaskedBehavior" /> object to associate the textbox with. </param> public MaskedTextBox(MaskedBehavior behavior) : base(behavior) { }
/// <summary> /// Initializes a new instance of the MaskedTextBox class by assigning its Behavior field /// to an instance of <see cref="MaskedBehavior" />. </summary> public MaskedTextBox() { m_behavior = new MaskedBehavior(this); }