ExecuteActionOnReturn=true Not firing

2 posts, 0 answers
  1. Eitan
    Eitan avatar
    26 posts
    Member since:
    Jun 2012

    Posted 23 May 2015 Link to this post

    Hi.

     I have a RadTextBox defined like this:

    <telerikPrimitives:RadTextBox x:Name="SearchWord"
         FontSize="18.667"
         TextWrapping="NoWrap"
         Watermark="Search Word"
         VerticalContentAlignment="Stretch"
         HorizontalContentAlignment="Stretch"
         Padding="12,2,2,2"
         ActionButtonVisibility="Visible"
         VerticalAlignment="Center"
         Height="80"
         ActionButtonTap="SearchWord_ActionButtonTap"
         InputScope="Search"
         ExecuteActionOnReturn="True" />

     

    private async void SearchWord_ActionButtonTap( object sender, EventArgs e )
        {
        await SearchTheWeb();
        }

     

    I was expecting the SearchWord_ActionButtonTap to fire when pressing the Enter (right arrow key)?

    However this doesn't happen. What am I missing here?

    Thanks,
    Eitan

     

  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 27 May 2015 Link to this post

    Hello Eitan,

    Thank you for contacting us.

    The ActionButtonTap event is raised only when you tap the action button. In your case you can use the KeyDown event:
    private async void SearchWord_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.Key == Key.Enter)
        {
            await SearchTheWeb();
        }
    }

    I hope this helps.

    Regards,
    Rosy Topchiyska
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top