Skip to main content
Version: 4.1

Button

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Represents a button control.

public class Button : ButtonBase, IButtonControl

Constructors

Instance member Button()

Initializes a new instance of the Button class.

Instance member Button(text, onClick)

Initializes a new instance of the Button class with specific initial settings.

NameTypeDescription
textStringInitial text.
onClickAction<Object, EventArgs>Optional Click handler.

Instance member Button(text, location, size, onClick)

Initializes a new instance of the Button class with specific initial settings.

NameTypeDescription
textStringInitial text.
locationPointInitial location.
sizeSizeInitial size.
onClickAction<Object, EventArgs>Optional click handler.

Instance member Button(text, ImageSource, location, size, onClick)

Initializes a new instance of the Button class with specific initial settings.

NameTypeDescription
textStringInitial text.
ImageSourceStringImage source.
locationPointInitial location.
sizeSizeInitial size.
onClickAction<Object, EventArgs>Optional click handler.

Properties

Instance member AutoSizeMode

AutoSizeMode: Returns or sets the mode by which the Button automatically resizes itself. (Default: GrowOnly)

Instance member AutoToolTip

Boolean: Returns or sets whether a tooltip is displayed when the text extends beyond the size of the control. (Default: False)

The auto tooltip is set on the browser using the title attribute managed by the browser, does not use the themed tooltip managed by Wisej.NET.

Instance member BorderStyle

BorderStyle: Returns or sets the border style of the button control. (Default: Solid)

Instance member DialogResult

DialogResult: Returns or sets a value that is returned to the parent form when the button is clicked. (Default: None)

Instance member Display

Display: Returns or sets the Display mode of the control to determine whether to display the icon, the text or both. (Default: Both)

Instance member ImageSpacing

Nullable<Int32>: Returns or sets the distance in pixels between the image and the label inside the button. (Default: null)

MenuItemCollection: Returns the collection of MenuItem objects associated with the button.

Instance member Repeat

Boolean: Enables or disables the auto-repeat feature. When enabled, the button keeps firing click events at an increasing rate while the user keeps the button pressed. (Default: False)

Instance member Shortcut

Shortcut: Returns or sets a value indicating the shortcut key associated with the button. (Default: None)

Methods

Protected member Dispose(disposing)

Disposes the control.

ParameterTypeDescription
disposingBooleantrue when this method is called by the application rather than a finalizer.

Protected member OnAddReferences(items)

Adds references components to the list. Referenced components can be added individually or as a reference to a collection.

ParameterTypeDescription
itemsIListContainer for the referenced components or collections.

Protected member OnBindingContextChanged(e)

Fires the BindingContextChanged event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnClick(e)

Fires the Click event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnItemClick(e)

Fires the ItemClicked event.

ParameterTypeDescription
eMenuButtonItemClickedEventArgsA MenuButtonItemClickedEventArgs that contains the event data.

Protected member OnMenuCollapse(e)

Fires the MenuCollapse event. Since 3.5.5

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnMenuPopup(e)

Fires the MenuPopup event. Since 3.5.5

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnWebRender(config)

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Instance member PerformClick()

Generates a Click event for a button.

Events

Instance member ItemClicked

MenuButtonItemClickedEventHandler Fired when the user clicks one of the drop down menu items.

EventHandler Fired when the button menu is closed. Since 3.5.5

EventHandler Fired after the button menu is displayed on the client. Since 3.5.5

Inherited By

NameDescription
SplitButtonRepresents a split button control.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IButtonControlAllows a control to act like a button on a Form.
ICommandSourceDefines an object that can invoke a Command.
IDropTargetControls that support drag & drop operations implement this interface.
IImageProvides access to common image properties across the controls that implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.