Hello,
I have a problem when the keyboard pops up and the ChatEntry input box pops up with the keyboard. The text does not appear in it.
On the other hand, when the tablet keyboard is closed, the text entered before is displayed correctly in the area.
This is a display bug that I reproduced with your example of ConvertionalUI. Do you have a solution, I'm looking in vain?
Thank you
PS : See the screenshots to show the problem.
Good Day
i use ControlTemplate to customize the chat UI the way i want it and all is working well. im now creating the ability to delete chat messages and that works fine but the problem i have to reload the list of chat which is not good. i want to only delete a chat item
This is how i load my chat , when the chat window is opened
Author senderitem = new Author();
senderitem.Name = m.AUTHOR;
TextMessage textMessage = new TextMessage();
textMessage.Data = m;
textMessage.Author = senderitem;
textMessage.Text = Functions.DecodeString(m.CHAT_MESSAGE);
Device.BeginInvokeOnMainThread(() =>
{
chat.Items.Add(textMessage);
chat.AutoScrollMode = AutoScrollMode.Always;
});
This works well . now i use a Swipe View to get Delete which carries the Message_ID , and i just go delete the record in the database and that works well. My issue is that after deleting i dont want to reload the loadchat list again , i want to remove only the one that was deleted
How do i use Removeat(), if i am using a Template , how do i get an index of this chat item , because the Message_ID is just a model field
i have tried this but it does not
chat.Items.RemoveAt(model.CHAT_MESSAGES_ID);
which will obviously fail if the index is not correct.
Thanks
Hi,
I am exploring RadChat for Xamarin forms and wanted to know what is the most efficient way for:
Thanks,
Abhi
I use the RadChat control within a simple page in full size (no padding) on android.
When I tab the input message box, the keyboard shows up and the complete control is moving up without resizing.
This means the recent message is not visible (if it is a new conversation). How can I adjust the control resize behaviour that the keyboard is not hiding the messages?
Also how can I activate a whatsapp like scrollbar at the right side?
I'm using RadChat control.
I use MVVM approach to bind the control's ItemSource to an ObservableCollection property in my ViewModel.
So in my xaml I have something like this:
<
telerikConversationalUI:RadChat
Author
=
"{Binding Me}"
ItemsSource
=
"{Binding Messages}"
ItemConverter
=
"{StaticResource SimpleChatItemConverter}"
SendMessageCommand
=
"{Binding SendMessageTappedCommand}"
ItemTemplateSelector
=
"{StaticResource MyChatItemTemplateSelector}"
ControlTemplate
=
"{StaticResource RadChat_ControlTemplate}"
>
In my ViewModel I have something like this:
public ObservableCollection<
CustomMessage
> Messages { set; get; }
I have CustomMessage class which contains additional properties like MessagePostedDate (which is of type DateTime, it contains the DateTime of when the message was posted)
I've also bound SendMessageCommand in RadChat control to a command (SendMessageTappedCommand) in my ViewModel.
What I've noticed is that when the Send button is tapped, the component automatically adds a new TextMessage (with Text property set to whatever the user typed) to the list, and only then does it call the SendMessageTappedCommand in my ViewModel. However, I do not want the automatic addition of a new TextMessage since I add a new CustomMessage item to Messages collection, which is bound to the RadChat control, and the SimpleChatItemConverter (which I've bound to ItemConverter of the RadChat control) converts that CustomMessage, and displays the posted date.
So the problem is everytime the user inputs a message and clicks on Send, the message ends up showing twice. First one shows up without the posted date (because a new TextMessage is automatically appended by the component), and the second message is with posted date, which was added by my SendMessageTappedCommand.
How do I stop the automatic creation of a new TextMessage when user taps on Send button?
Hi,
I am using RadChat control on a ContentView with the top navigation bar. On iOS, when the keyboard appears, the control scrolls correctly with the top navigation bar visible all the time. On android, however, as soon as the keyboard appears for the user to start typing, the whole view scrolls resulting on the top navigation bar to slide too. Is there a workaround that you would suggest for only the control to scroll and not the whole view?
Thanks
Hi,
I am trying to set custom font defined as a style in the xaml for ChatEntry. It throws error at execution time. I know there have been issues reported with fontfamily setup in the past, has it been resolved yet? Secondly, we need ChatEntry text to wrap and not be a free floating entry field, is there wordwrap/multiline ChatEntry setup possible?
Good Day
i have a control template define like the one below . Inside the ControlTemplate there is ChatEntry control named "txtchatmessage" and a TextChanged event handler named txtchatmessage_TextChanged and Focus , when i enter text this even does not get fired
<p>
private
void
Txtchatmessage_TextChanged(
object
sender, TextChangedEventArgs e)<br>
{<br>
//my logic<br>
}</p> <p></p>
<
ControlTemplate
x:Key
=
"CustomChatControlTemplate"
><
br
>
<
Grid
telerikInput:KeyboardHelper.IsTranslationTarget
=
"True"
<br>
RowSpacing="2"> <
br
>
<
Grid.RowDefinitions
><
br
>
<
RowDefinition
/><
br
>
<
RowDefinition
Height
=
"Auto"
/><
br
>
<
RowDefinition
Height
=
"Auto"
/><
br
>
</
Grid.RowDefinitions
><
br
>
<
Image
HorizontalOptions
=
"FillAndExpand"
x:Name
=
"ctr1"
VerticalOptions
=
"FillAndExpand"
Aspect
=
"AspectFill"
Source
=
"chat_background.png"
/> <
br
>
<
br
>
<
Grid
Grid.Row
=
"2"
Padding
=
"5, 0, 0, 0"
><
br
>
<
Grid.ColumnDefinitions
> <
br
>
<
ColumnDefinition
Width
=
"Auto"
/><
br
>
<
ColumnDefinition
Width
=
"Auto"
/><
br
>
</
Grid.ColumnDefinitions
><
br
>
<
br
>
<
StackLayout
Orientation
=
"Vertical"
BackgroundColor
=
"White"
><
br
>
<
StackLayout
Orientation
=
"Horizontal"
BackgroundColor
=
"Transparent"
> <
br
>
<
telerikConversationalUI:ChatEntry
x:Name
=
"txtchatmessage"
Keyboard
=
"Chat"
TextChanged
=
"txtchatmessage_TextChanged"
<br>
HorizontalOptions="StartAndExpand" WidthRequest="280" <
br
>
telerikInput:KeyboardHelper.IsTranslationSource="True" /><
br
>
<
br
>
<
StackLayout
Orientation
=
"Horizontal"
><
br
>
<
Button
x:Name
=
"btnattach"
<br>
ImageSource="attach_final.png"<
br
>
BackgroundColor="Transparent" <
br
>
WidthRequest="30" <
br
>
Clicked="btnattach_Clicked"<
br
>
HeightRequest="30"<
br
>
VerticalOptions="Center" /><
br
>
<
br
>
<
Button
<br>
ImageSource="send_final.png" <
br
>
BackgroundColor="Transparent" <
br
>
Clicked="chat_send"<
br
>
x:Name="btnsend" <
br
>
WidthRequest="30"<
br
>
HeightRequest="30"<
br
>
VerticalOptions="Center" /><
br
>
</
StackLayout
> <
br
>
<
br
>
</
StackLayout
><
br
>
</
StackLayout
><
br
>
</
Grid
><
br
>
</
Grid
><
br
>
</
ControlTemplate
>
this controlTemplate is defined in
<
VisualElement.Resources
>
<
ResourceDictionary
>
and used in the chat control like this
<
telerikConversationalUI:RadChat
x:Name
=
"chat"
Grid.Row
=
"1"
<br> AutoScrollMode="Automatic" SendMessageButtonImage="" ControlTemplate="{StaticResource RadChat_ControlTemplate}">