Skip to main content
Version: 4.1

Component

Namespace: Wisej.Base

Assembly: Wisej.Framework (4.1.0.0)

The base class for Wisej components that are not controls. Wisej components are still managed on the client and the server but are not present on the designer surface. Examples of wisej components are: menu items, image lists, tree nodes, list items.

public class Component : IDisposable, IWisejComponent, IWisejSerializable, IUserData

Constructors

Instance member Component()

Default constructor

Instance member Component(embedded)

Default constructor

NameTypeDescription
embeddedBooleanIndicates whether the component is embedded in a parent component. Embedded components don't update themselves, instead their parent is in charge of updating the corresponding client widget.

Properties

Instance member HasUserData

Boolean: Checks if the UserData dynamic object was created and has any value. (Default: False)

Instance member InClientEvent

Boolean: Returns true if the component is processing a client event.

Instance member IsDisposed

Boolean: Indicates that the component has been disposed. (Default: False)

Instance member UserData

Object: Returns a dynamic object that can be used to store custom data in relation to this component.

Default value is {}.

Methods

Instance member Call(function, args)

Runs the JavaScript function within the component's context in the browser.

ParameterTypeDescription
functionStringThe name of the JavaScript function to execute.
argsObject[]The arguments to pass to the function.

Instance member Call(function, callback, args)

Runs the JavaScript function within the component's context in the browser and returns the value to the callback method.

ParameterTypeDescription
functionStringThe name of the JavaScript function to execute.
callbackAction<Object>Asynchronous callback method that receives the return value.
argsObject[]The arguments to pass to the function.

Instance member CallAsync(function, args)

Asynchronously runs the JavaScript function within the component's context in the browser and returns an awaitable Task containing the value returned by the remote call.

ParameterTypeDescription
functionStringThe name of the JavaScript function to execute.
argsObject[]The arguments to pass to the function.

Returns: Task<Object>. An awaitable Task that represents the asynchronous operation.

Instance member Dispose()

Releases all resources used by the Component.

Protected member Dispose(disposing)

Marks this component as disposed.

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

Instance member Eval(javaScript)

Runs the javaScript code within the component's context in the browser.

ParameterTypeDescription
javaScriptStringThe JavaScript code to run on the client.

Instance member Eval(javaScript, callback)

Runs the javaScript code within the component's context in the browser and returns the value to the callback method.

ParameterTypeDescription
javaScriptStringThe JavaScript code to evaluate on the client.
callbackAction<Object>Asynchronous callback method that receives the return value.

Instance member EvalAsync(javaScript)

Asynchronously runs the javaScript code within the component's context in the browser and returns an awaitable Task that contains the value returned by the remote call.

ParameterTypeDescription
javaScriptStringThe JavaScript code to evaluate on the client.

Returns: Task<Object>. An awaitable Task that represents the asynchronous operation.

Protected member Finalize()

Destructor dispose pattern.

Protected member InvokeFilter(data, type)

Invokes the Filter method.

ParameterTypeDescription
dataObjectData passed to the filter implementation.
typeStringName of the filter being invoked.

Returns: Object.

Protected member OnAddReferences(list)

Returns a collection of referenced components or collection of components.

ParameterTypeDescription
listIListList of referenced components or collection of components.

Protected member OnWebEvent(e)

Processes the event from the client.

ParameterTypeDescription
eWisejEventArgsEvent arguments.

Protected member OnWebRender(config)

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Protected member OnWebUpdate(state)

Updates the client component using the state information.

ParameterTypeDescription
stateObjectDynamic state object.

Instance member Update()

Updates the component on the client.

Events

Instance member Disposed

EventHandler Fired when the component is disposed.

Inherited By

NameDescription
BindableComponentExtends Component and enables the component to participated if data binding operations and have their own DataBindings.
ComponentExtends Component and enables the components to appear on the designer surface.
MessageBoxDisplays a message box that can contain text, buttons, and symbols that inform and instruct the user.
TimerImplements a timer that raises an event at user-defined intervals.
DesktopTaskBarItemRepresents a component in the Desktop control's taskbar.
DesktopTaskBarItemControlRepresents a component in the Desktop control's taskbar that can host any Control.
DesktopTaskBarItemDateTimeRepresents a DateTime component in the Desktop control's taskbar.
AnimationProvides support for animating controls or windows using predefined animations definitions or custom animations in response to certain events.
ErrorProviderProvides a user interface for indicating that a control on a form has an error associated with it.
HelpTipRepresents a small rectangular pop-up window that displays a brief help text next to a control when it gets activated (focused).
JavaScriptAllows controls to execute javascript code.
RotationAdd rotation capabilities along the X,Y,Z axis to Control controls.
StyleSheetAdds CSS styling to controls.
ToolTipRepresents a small rectangular pop-up window that displays a brief description of a control's purpose when the user rests the pointer on the control.
AlertBoxDisplays an alert box that can contain an icon and text that inform and instruct the user. Alert boxes are not modal and can disappear automatically.
ToastDisplays a toast that can contain an icon and text.
ComponentToolRepresent a tool widget that can be displayed inside another control. A tool widget is different from other child controls: it's displayed inside the parent's layout. For example, the Form control shows tool widgets inside the caption bar. When a tool widget is pressed, it fires the toolClicked event on the container.
ImageListProvides methods to manage a collection of Image objects. This class cannot be inherited.
ColumnHeaderDisplays a standard column header in a ListView control.
ImageColumnHeaderDisplays an image column header in a ListView control.
CheckedMenuItemRepresents an individual menu item that is displayed within a MainMenu or ContextMenu and always shows a checkbox next to the label.
ContextMenuRepresents a context menu associated to a Control.
LinkMenuItemRepresents an individual menu item that is displayed within a MainMenu or ContextMenu rendered using the <a> link element to let the browser process the specified HRef URL.
MainMenuRepresents the main menu in a Form.
MenuRepresents the base functionality for all menus.
MenuItemRepresents an individual item that is displayed within a MainMenu or ContextMenu.
StatusBarControlRepresents a panel in a StatusBar control that can host any Control.
StatusBarPanelRepresents a panel in a StatusBar control.
ToolBarButtonRepresents an item in the ToolBar.
TreeNodeRepresents a node of a TreeView.

Implements

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IWisejComponentAll wisej components implement this interface.
IWisejSerializableAllows an object to serialize itself.