Habanero.Faces.Base.DateTimePickerManager.ChangeToNullMode C# (CSharp) Method

ChangeToNullMode() public method

Changes the DatetTimePicker control to the null mode
public ChangeToNullMode ( ) : bool
return bool
        public bool ChangeToNullMode()
        {
            if (ApplyBlankFormat())
            {
                FireValueChanged();
                return true;
            }
            return false;
        }
    }

Usage Example

#pragma warning disable 1911
        ///<summary>
        /// Constructs the <see cref="DateTimePickerVWG"/>
        ///</summary>
        ///<param name="controlFactory"></param>
        public DateTimePickerVWG(IControlFactory controlFactory)
        {
            DateTimePickerManager.ValueGetter<DateTime> valueGetter = () => base.Value;

            DateTimePickerManager.ValueSetter<DateTime> valueSetter = delegate(DateTime value)
            {
                base.Value = value;
            };
            _manager = new DateTimePickerManager(controlFactory, this, valueGetter, valueSetter);
            //Note: by default the Checkbox is shown because the VWG DateTimePicker does not support representing the null state visually without it.
            this.ShowCheckBox = true;
            _manager.ChangeToNullMode();
            this.SetGlobalDefaultFormat();
            this.ObserveGlobalUIHints();
        }