DateTimePicker.Checked DateTimePicker.Checked DateTimePicker.Checked DateTimePicker.Checked Property

定義

取得或設定值,表示 Value屬性是否已經使用有效的日期/時間值設定,而且顯示的值能夠更新。Gets or sets a value indicating whether the Value property has been set with a valid date/time value and the displayed value is able to be updated.

public:
 property bool Checked { bool get(); void set(bool value); };
[System.ComponentModel.Bindable(true)]
public bool Checked { get; set; }
member this.Checked : bool with get, set
Public Property Checked As Boolean

屬性值

如果 Value 屬性已經使用有效的 DateTime 值設定,而且顯示的值能夠更新,則為 true,否則為 falsetrue if the Value property has been set with a valid DateTime value and the displayed value is able to be updated; otherwise, false. 預設為 trueThe default is true.

備註

這個屬性是用來取得ShowCheckBox屬性值為true時所顯示之核取方塊的狀態。This property is used to obtain the state of the check box that is displayed if the ShowCheckBox property value is true. true DateTimePicker如果屬性值為, 控制項會顯示格式Value正確的屬性值; 否則, 控制項會Value顯示指派給屬性的最後一個有效日期/時間值, 或Checked目前的日期和時間DateTime.Now() (如果尚未指派任何值)。If the Checked property value is true, the DateTimePicker control displays the properly formatted Value property value; otherwise, the control displays the last valid date/time value assigned to the Value property or the current date and time (DateTime.Now) if no value has ever been assigned.

適用於

另請參閱