Class
MessageBase

Represents the most basic abstraction of message that can report action results.

Definition

Namespace:Telerik.Windows.Controls.ConversationalUI

Assembly:Telerik.Windows.Controls.ConversationalUI.dll

Syntax:

cs-api-definition
public abstract class MessageBase : IReportMessageResult, INotifyPropertyChanged

Inheritance: objectMessageBase

Derived Classes: AIMessageCalendarMessageCardMessageCarouselMessageDataFormMessageFlightCardMessageGifMessageImageMessageListMessageTextMessage

Implements: INotifyPropertyChangedIReportMessageResult

Constructors

MessageBase(MessageDisplayPosition, Author, MessageType, DateTime)

Initializes a new instance of the MessageBase class.

Declaration

cs-api-definition
public MessageBase(MessageDisplayPosition displayPosition, Author author, MessageType messageType, DateTime creationDate = default)

Parameters

displayPosition

MessageDisplayPosition

author

Author

messageType

MessageType

creationDate

DateTime

Properties

Author

Gets the author of the message.

Declaration

cs-api-definition
public Author Author { get; }

Property Value

Author

AutoReport

Gets or sets a value that indicates whether the message will automatically report results. Setting it to true will force any properties that are marked with ReportResult attribute to raise the ReportMessageResult event of RadChat.

Declaration

cs-api-definition
public bool AutoReport { get; set; }

Property Value

bool

Implements IReportMessageResult.AutoReport

CloseAfterReport

Gets or sets a value that indicates whether the message will be removed after it reports a result.

Declaration

cs-api-definition
public bool CloseAfterReport { get; set; }

Property Value

bool

Implements IReportMessageResult.CloseAfterReport

CreationDate

Gets the time when the message was created.

Declaration

cs-api-definition
public DateTime CreationDate { get; }

Property Value

DateTime

DisplayPosition

Gets the DisplayPosition.

Declaration

cs-api-definition
public MessageDisplayPosition DisplayPosition { get; }

Property Value

MessageDisplayPosition

MessageType

Gets the MessageType.

Declaration

cs-api-definition
public MessageType MessageType { get; set; }

Property Value

MessageType

PostResultInline

Gets or sets a value that indicates whether response action should create a text inline message with its result. The formatted text result can be found and modified in ReportMessageResult's event arguments.

Declaration

cs-api-definition
public bool PostResultInline { get; set; }

Property Value

bool

Implements IReportMessageResult.PostResultInline

ReportActions

Gets the collection of ReportActions that are associated with the message. The default UI implementation will visualize them as buttons.

Declaration

cs-api-definition
public RadObservableCollection<ResponseAction> ReportActions { get; }

Property Value

RadObservableCollection<ResponseAction>

Implements IReportMessageResult.ReportActions

ReportViewModel

Gets the view model instance that handles report results. It is initialized in accordance of the MessageDisplayPosition of the message.

Declaration

cs-api-definition
public ReportResultViewModel ReportViewModel { get; }

Property Value

ReportResultViewModel

Methods

OnPropertyChanged(string)

Raises the PropertyChanged event.

Declaration

cs-api-definition
protected void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

SubscribeToMessageResult(Action<object, MessageResultEventArgs>)

Subscribes to child response actions.

Declaration

cs-api-definition
protected virtual void SubscribeToMessageResult(Action<object, MessageResultEventArgs> callBack)

Parameters

callBack

Action<object, MessageResultEventArgs>

ValidateMessageDisplayPosition()

Validates whether the chosen DisplayPosition is supported by the message.

Declaration

cs-api-definition
protected void ValidateMessageDisplayPosition()

Events

PropertyChanged

Event is raised when a property of the type changes its value.

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged