Skip to content

Commit f110c7d

Browse files
Update messages.md
1 parent 351d3d9 commit f110c7d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

MAUI/Chat/messages.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,9 +1314,9 @@ We have loaded a custom template if the message's text contains a particular tex
13141314

13151315
![Message template in .NET MAUI Chat](images/messages/maui-chat-message-template.png)
13161316

1317-
### Template selector to return base template
1317+
### Using ChatMessageTemplateSelector for custom templates
13181318

1319-
Create a custom class that inherits from `ChatMessageTemplateSelector`, and override the `OnSelectTemplate` method to return the base template for that item.
1319+
Create a custom class that extends `ChatMessageTemplateSelector` and override the `OnSelectTemplate` method to return either a custom template or default templates based on the message item.
13201320

13211321
{% tabs %}
13221322
{% highlight c# tabtitle="MessageTemplateSelector.cs" %}
@@ -1432,6 +1432,7 @@ The `SfChat` allows you to target and fully customize views within the chat cont
14321432
</Setter.Value>
14331433
</Setter>
14341434
</Style>
1435+
...
14351436
</ResourceDictionary>
14361437
</ContentPage.Resources>
14371438

@@ -1516,6 +1517,7 @@ namespace MauiChat
15161517
}
15171518
}
15181519
};
1520+
...
15191521

15201522
Resources.Add(incomingStyle);
15211523
Resources.Add(outgoingStyle);

0 commit comments

Comments
 (0)