BaseCardView class

Primitive base class for Card views.

Extends

BaseView<TProperties, TState>

Remarks

This class is marked as @sealed. Subclasses should not extend it.

No third-party Card views should inherit from this class.

Properties

cardSize

See BaseAdaptiveCardExtension.cardSize.

isCacheEnabled

If true, this Card view will be cached and rendered at next load.

onCardSelection

Action to invoke when the card is selected.

Methods

onAction(action)

Action handler for Adaptive Card Actions.

onActionError(error)

Error handler for Adaptive Card Actions.

setVisibility(isVisible)

Sets visibility to false and rerenders the card. See BaseAdaptiveCardExtension.isVisible.

Property Details

cardSize

See BaseAdaptiveCardExtension.cardSize.

get cardSize(): CardSize;

Property Value

isCacheEnabled

If true, this Card view will be cached and rendered at next load.

/** @virtual */
get isCacheEnabled(): boolean;

Property Value

boolean

onCardSelection

Action to invoke when the card is selected.

/** @virtual */
get onCardSelection(): IQuickViewCardAction | IExternalLinkCardAction | ISelectMediaCardAction | IGetLocationCardAction | IShowLocationCardAction | IExecuteCardAction | undefined;

Property Value

Method Details

onAction(action)

Action handler for Adaptive Card Actions.

/** @virtual */
onAction(action: IActionArguments): void;

Parameters

action
IActionArguments

The IActionArguments for the current event.

Returns

void

onActionError(error)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Error handler for Adaptive Card Actions.

/** @virtual */
onActionError(error: IActionErrorArguments): void;

Parameters

error
IActionErrorArguments

The IActionErrorArguments for the current event.

Returns

void

setVisibility(isVisible)

Sets visibility to false and rerenders the card. See BaseAdaptiveCardExtension.isVisible.

setVisibility(isVisible: boolean): void;

Parameters

isVisible

boolean

Returns

void