This is a migrated thread and some comments may be shown as answers.

TextChangedEvent and Focus Event not Fired

2 Answers 27 Views
Chat (Conversational UI)
This is a migrated thread and some comments may be shown as answers.
Vuyiswa
Top achievements
Rank 2
Vuyiswa asked on 27 Jun 2020, 11:03 PM

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}">

2 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 30 Jun 2020, 03:54 PM

Hi Vuyiswa,

We have discussed this exact same topic, with the same exact question in the other forum thread you started here https://www.telerik.com/forums/textchangedevent-and-focus-event-not-fired-50968a392cab 

Regards,
Lance | Manager - Technical Support
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Vuyiswa
Top achievements
Rank 2
answered on 30 Jun 2020, 06:39 PM
Sorry it was a duplicate 
Tags
Chat (Conversational UI)
Asked by
Vuyiswa
Top achievements
Rank 2
Answers by
Lance | Manager Technical Support
Telerik team
Vuyiswa
Top achievements
Rank 2
Share this question
or