Context Buttons

Shows combination of Add/Edit/Delete buttons.

Namespace: LSOne.Controls

Assembly: LSOne.Controls

Syntax

public partial class ContextButtons : UserControl

Context buttons full enabled Context buttons partially enabled Context buttons partially hidden

 

Constructors

Name Description
ContextButtons() Default constructor.

 

Properties

Name Description
AddButtonEnabled Gets or sets if the "Add" button is enabled.
AddButtonImage Gets an image that is generated to look exactly like the "Add"button when it's being drawn in it's default Enabled state
Context

Gets or sets a combination of the buttons to be displayed:

  • EditAddRemove - shows all buttons
  • EditAdd - shows only Add and Edit
  • EditRemove - shows only Edit and Remove
  • AddRemove - shows only Add and Remove
EditButtonEnabled Gets or sets if the "Edit" button is enabled.
EditButtonImage Gets an image that is generated to look exactly like the "Edit"button when it's being drawn in it's default Enabled state
RemoveButtonEnabled Gets or sets if the "Delete" button is enabled.
RemoveButtonImage Gets an image that is generated to look exactly like the "Remove"button when it's being drawn in it's default Enabled state

 

Methods

Name Description
GetAddButtonImage() Static method to retrieve the "Add" image
GetEditButtonImage() Static method to retrieve the "Edit" image
GetRemoveButtonImage() Static method to retrieve the "Remove" image

 

Events

Name Description
AddButtonClicked Raised when the "Add" button is clicked.
AddButtonMouseDown Raised when the mouse button is pressed on the "Add" button
EditButtonClicked Raised when the "Edit" button is clicked.
EditButtonMouseDown Raised when the mouse button is pressed on the "Edit" button
RemoveButtonClicked Raised when the "Remove" button is clicked.
RemoveButtonMouseDown Raised when the mouse button is pressed on the "Remove" button.

Remarks

Context buttons are located below every Site Manager list view.

Examples

 

See Source\SM\Plugins\Administration\ViewPages\AdministrationBlankOperationsPage.cs from DevPack for usage examples.

 

Disable "Add" button

btnsContext.AddButtonEnabled = false;

 

See also