Name
IButtonControl
Synopsis
This interface is implemented by Control objects
such as Button and LinkLabel,
which provide button-like behavior.
The framework requires the PerformClick() method
to provide a way of programmatically clicking the button.
NotifyDefault() is called by the framework when
the button becomes the default (i.e., when it is set as the active
Form object’s
AcceptButton).
Finally, DialogResult is the property you should
implement to maintain the result code that will be set if the button
is clicked to terminate a Form that has been shown
modally with the ShowDialog() method.
public interface IButtonControl { // Public Instance Properties public DialogResult DialogResult{set; get; } // Public Instance Methods public void NotifyDefault(bool value); public void PerformClick(); }
Implemented By
Button, LinkLabel
Returned By
Form.{AcceptButton,
CancelButton},
PrintPreviewDialog.{AcceptButton,
CancelButton}
Passed To
Form.{AcceptButton,
CancelButton},
PrintPreviewDialog.{AcceptButton,
CancelButton}
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access