/// <summary> /// Initializes a new instance of the DateTimeTextBox class by explicitly assigning its Behavior field. </summary> /// <param name="behavior"> /// The <see cref="DateTimeBehavior" /> object to associate the textbox with. </param> public DateTimeTextBox(DateTimeBehavior behavior) : base(behavior) { }
/// <summary> /// Initializes a new instance of the DateTimeBehavior class by copying it from /// another DateTimeBehavior object. </summary> /// <param name="behavior"> /// The DateTimeBehavior 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 DateTimeBehavior(DateTimeBehavior behavior) : base(behavior) { m_dateBehavior = new DateBehavior(m_textBox, false); // does not add the event handlers }
/// <summary> /// Initializes a new instance of the DateTimeTextBox class by assigning its Behavior field /// to an instance of <see cref="DateTimeBehavior" />. </summary> public DateTimeTextBox() : base(null) { m_behavior = new DateTimeBehavior(this); }