diff --git a/src/Eto/Forms/Controls/CheckBox.cs b/src/Eto/Forms/Controls/CheckBox.cs index ef9f01761f..f96c51dff0 100644 --- a/src/Eto/Forms/Controls/CheckBox.cs +++ b/src/Eto/Forms/Controls/CheckBox.cs @@ -3,20 +3,27 @@ namespace Eto.Forms { /// - /// Control to show a two or three state check box + /// A control that shows a two or three state check box. /// /// - /// Two state is either checked (true) or unchecked (false). + /// A two state check box is either checked () or unchecked (). /// - /// Three state check box can also have a null value. + /// A three state check box can also have an additional value. /// + /// + /// An example to create a two and a three state check box: + /// + /// var twoStateCheckBox = new Checkbox() { Text = "Two state checkbox" }; + /// var threeStateCheckBox = new Checkbox() { Text = "Three state checkbox", ThreeState = true }; + /// + /// [Handler(typeof(CheckBox.IHandler))] public class CheckBox : TextControl { new IHandler Handler { get { return (IHandler)base.Handler; } } /// - /// Occurs when property is changed by the user + /// Occurs when the property is changed by the user. /// public event EventHandler CheckedChanged { @@ -29,19 +36,19 @@ public event EventHandler CheckedChanged /// /// Raises the event. /// - /// Event arguments + /// Event arguments. protected virtual void OnCheckedChanged(EventArgs e) { Properties.TriggerEvent(CheckedChangedKey, this, e); } /// - /// Gets or sets the checked state + /// Gets or sets the checked state. /// /// - /// When is true, null signifies an indeterminate value. + /// When is , signifies an indeterminate value. /// - /// The checked value + /// The checked value. public virtual bool? Checked { get { return Handler.Checked; } @@ -49,9 +56,9 @@ public virtual bool? Checked } /// - /// Gets or sets a value indicating whether this CheckBox allows three states: true, false, or null + /// Gets or sets a value indicating whether this allows three states: , , or . /// - /// true if three state; otherwise, false. + /// if this allows three state; otherwise, . public bool ThreeState { get { return Handler.ThreeState; } @@ -59,9 +66,9 @@ public bool ThreeState } /// - /// Gets a binding for the property + /// Gets a binding for the property. /// - /// The binding for the checked property. + /// The binding for the property. public BindableBinding CheckedBinding { get @@ -77,20 +84,19 @@ public bool ThreeState } static readonly object callback = new Callback(); - /// - /// Gets an instance of an object used to perform callbacks to the widget from handler implementations - /// - /// The callback instance to use for this widget + + /// protected override object GetCallback() { return callback; } /// - /// Callback interface for the + /// Callback interface for the . /// public new interface ICallback : TextControl.ICallback { /// - /// Raises the checked changed event. + /// Raises the event. /// + // TODO: undocumented properties void OnCheckedChanged(CheckBox widget, EventArgs e); } @@ -99,9 +105,7 @@ public bool ThreeState /// protected new class Callback : TextControl.Callback, ICallback { - /// - /// Raises the checked changed event. - /// + /// public void OnCheckedChanged(CheckBox widget, EventArgs e) { using (widget.Platform.Context) @@ -110,23 +114,14 @@ public void OnCheckedChanged(CheckBox widget, EventArgs e) } /// - /// Handler interface for the control + /// Handler interface for the control. /// public new interface IHandler : TextControl.IHandler { - /// - /// Gets or sets the checked state - /// - /// - /// When is true, null signifies an indeterminate value. - /// - /// The checked value + /// bool? Checked { get; set; } - /// - /// Gets or sets a value indicating whether this CheckBox allows three states: true, false, or null - /// - /// true if three state; otherwise, false. + /// bool ThreeState { get; set; } }