Skip to main content
Version: 4.2

ActionCard

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays an actionable card with plain-text details, icon, badge, commands, and optional hosted content.

public class ActionCard : Control

Clicking the card header raises Click and toggles Selected when Selectable is true. Actions and hosted controls have independent input and never invoke the card header. All text is literal, not HTML.

Example:

var card = new ActionCard
{
Title = "Rotate TLS certificates", Description = "12 gateways in Europe and Africa",
Badge = "Due in 3 days", BadgeTone = ActionCardTone.Warning, Selectable = true
};
card.Actions.Add(new CardAction { Name = "snooze", Text = "Snooze" });
card.Actions.Add(new CardAction { Name = "run", Text = "Run now", Primary = true });
card.ActionClick += (sender, e) => MessageBox.Show(e.Action.Name);
this.Controls.Add(card);

Constructors​

Instance member ActionCard()​

Initializes a flat card without commands or hosted content.

Properties​

Instance member Actions​

CardActionCollection: Gets the ordered command collection. Edits update the card automatically.

Instance member Badge​

String: Gets or sets the plain-text badge label. The default is empty. (Default: "")

Instance member BadgeTone​

ActionCardTone: Gets or sets the badge's semantic color. The default is Neutral. (Default: Neutral)

Instance member Content​

Control: Gets or sets the optional Wisej control displayed below the header. (Default: null)

Content must be unparented and cannot contain the card. The card owns attached content and disposes it with the card. Replacing or clearing Content detaches the old control without disposing it. Content fills the card width and retains its Height; choose a card height large enough to contain it.

Example:

card.Content = new TextBox { Watermark = "Deployment notes", Height = 32 };
var reusable = card.Content;
card.Content = null; // The control remains alive for reuse.

Protected member DefaultSize​

Size: Gets the default card size.

Instance member Description​

String: Gets or sets the plain-text description. The default is empty. (Default: "")

Instance member Elevation​

ActionCardElevation: Gets or sets the themed surface elevation. The default is Flat. (Default: Flat)

Instance member Focusable​

Boolean: Gets or sets root focusability. The header remains keyboard accessible. (Default: False)

Instance member Icon​

String: Gets or sets the icon source URL or Wisej theme image name. The default is empty. (Default: "")

Instance member IconTone​

ActionCardTone: Gets or sets the icon's semantic color. The default is Primary. (Default: Primary)

Instance member Meta​

String: Gets or sets the plain-text metadata line. The default is empty. (Default: "")

Instance member Selectable​

Boolean: Gets or sets whether header activation toggles Selected. The default is false. (Default: False)

Click is raised even when Selectable is false. Changing Selectable does not reset an existing selection. This member hides Control.Selectable, which controls browser text selection rather than card selection.

Instance member Selected​

Boolean: Gets or sets the selected state. The default is false. (Default: False)

Code can set Selected regardless of Selectable. Each actual change raises SelectedChanged.

Instance member TabStop​

Boolean: Gets or sets root tab-stop participation. The header and commands manage their own keyboard focus. (Default: False)

Instance member Title​

String: Gets or sets the plain-text title. The default is empty. (Default: "")

Methods​

Protected member Dispose(disposing)​

Releases command subscriptions and disposes currently attached content through the base control.

ParameterTypeDescription
disposingBooleanWhether managed resources should be released.

Protected member OnActionClick(e)​

Raises ActionClick.

ParameterTypeDescription
eCardActionEventArgsInvoked command.

Protected member OnSelectedChanged(e)​

Raises SelectedChanged.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnWebEvent(e)​

Dispatches client events, suppressing duplicate standard tap handling.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Serializes the current card and independently wires normal events.

ParameterTypeDescription
configObjectClient configuration.

Events​

Instance member ActionClick​

EventHandler<CardActionEventArgs> Occurs when an enabled command is invoked by pointer or keyboard.

Instance member SelectedChanged​

EventHandler Occurs after Selected changes through user interaction or code.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations 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.