New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public abstract class MessageBase : IReportMessageResult, INotifyPropertyChanged

Inheritance: objectMessageBase

Derived Classes: AIMessageCalendarMessageCardMessageCarouselMessageDataFormMessageFlightCardMessageGifMessageImageMessageListMessageTextMessage...

Implements: INotifyPropertyChangedIReportMessageResult

Constructors

Initializes a new instance of the MessageBase class.

C#
public MessageBase(MessageDisplayPosition displayPosition, Author author, MessageType messageType, DateTime creationDate = default)
Parameters:displayPositionMessageDisplayPositionauthorAuthormessageTypeMessageTypecreationDateDateTime

Properties

Gets the author of the message.

C#
public Author Author { get; }

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.

C#
public bool AutoReport { get; set; }

Implements: IReportMessageResult.AutoReport

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

C#
public bool CloseAfterReport { get; set; }

Implements: IReportMessageResult.CloseAfterReport

Gets the time when the message was created.

C#
public DateTime CreationDate { get; }

Gets the DisplayPosition.

C#
public MessageDisplayPosition DisplayPosition { get; }

Gets the MessageType.

C#
public MessageType MessageType { get; set; }

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.

C#
public bool PostResultInline { get; set; }

Implements: IReportMessageResult.PostResultInline

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

C#
public RadObservableCollection<ResponseAction> ReportActions { get; }

Implements: IReportMessageResult.ReportActions

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

C#
public ReportResultViewModel ReportViewModel { get; }

Methods

Raises the PropertyChanged event.

C#
protected void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

Subscribes to child response actions.

C#
protected virtual void SubscribeToMessageResult(Action<object, MessageResultEventArgs> callBack)
Parameters:callBackAction<object, MessageResultEventArgs>

Validates whether the chosen DisplayPosition is supported by the message.

C#
protected void ValidateMessageDisplayPosition()

Events

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

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged