ClassMessageBase
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:
public abstract class MessageBase : IReportMessageResult, INotifyPropertyChanged
Inheritance: objectMessageBase
Derived Classes:
Implements:
Constructors
MessageBase(MessageDisplayPosition, Author, MessageType, DateTime)
Initializes a new instance of the MessageBase class.
Declaration
public MessageBase(MessageDisplayPosition displayPosition, Author author, MessageType messageType, DateTime creationDate = default)
Parameters
displayPosition
author
messageType
creationDate
Properties
Author
Gets the author of the message.
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.
CloseAfterReport
Gets or sets a value that indicates whether the message will be removed after it reports a result.
Declaration
public bool CloseAfterReport { get; set; }
Property Value
Implements
CreationDate
Gets the time when the message was created.
DisplayPosition
Gets the DisplayPosition.
Declaration
public MessageDisplayPosition DisplayPosition { get; }
Property Value
MessageType
Gets the MessageType.
Declaration
public MessageType MessageType { get; set; }
Property Value
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
public bool PostResultInline { get; set; }
Property Value
Implements
ReportActions
Gets the collection of ReportActions that are associated with the message. The default UI implementation will visualize them as buttons.
Declaration
public RadObservableCollection<ResponseAction> ReportActions { get; }
Property Value
Implements
ReportViewModel
Gets the view model instance that handles report results. It is initialized in accordance of the MessageDisplayPosition of the message.
Declaration
public ReportResultViewModel ReportViewModel { get; }
Property Value
Methods
OnPropertyChanged(string)
Raises the PropertyChanged event.
Declaration
protected void OnPropertyChanged(string propertyName)
Parameters
propertyName
SubscribeToMessageResult(Action<object, MessageResultEventArgs>)
Subscribes to child response actions.
Declaration
protected virtual void SubscribeToMessageResult(Action<object, MessageResultEventArgs> callBack)
Parameters
callBack
ValidateMessageDisplayPosition()
Validates whether the chosen DisplayPosition is supported by the message.
Declaration
protected void ValidateMessageDisplayPosition()
Events
PropertyChanged
Event is raised when a property of the type changes its value.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements