Input scope

4 posts, 0 answers
  1. Spaso
    Spaso avatar
    5 posts
    Member since:
    Nov 2010

    Posted 03 Dec 2012 Link to this post

    How to use input scope (Search) for RadTextBox.
    It seems that whatever scope I choose, I get default keyboard.

    Best regards
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 04 Dec 2012 Link to this post

    Hello Spaco,

    Thank you for contacting us. 

    The InputScope property in RadTextBox is inherited from the native TextBox so it behaves the same way. For Search, it changes the enter key and adds suggestions over the keyboard (see attached image). I have added a sample project, which adds a command for the action of RadTextBox and executes it on both pressing the action button and pressing the enter key on the keyboard. The sample also demonstrates email and numeric keyboards.

    I hope this sample will make the InputScope easier to understand and use. Let me know if you need further assistance.


    All the best,
    Todor
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Spaso
    Spaso avatar
    5 posts
    Member since:
    Nov 2010

    Posted 04 Dec 2012 Link to this post

    Thanks Todor for answer.
    I know what you are talking about but for me it doesn't work, I don't know why?
    Here is the code:
    <telerikPrimitives:RadTextBox InputScope="Search" x:Name="SearchContactFilter"
            Foreground="{StaticResource PageForeground}"
            ActionButtonVisibility="Visible"
            Grid.Row="0" Grid.ColumnSpan="2"
            Watermark="Search contact"
            ActionButtonTap="SearchContactFilter_ActionButtonTap_1"
            ExecuteActionOnReturn="True" KeyDown="SearchContactFilter_KeyDown"
            Margin="0,-18,0,0" BorderBrush="#CECCCA">
        <telerikPrimitives:RadTextBox.ClearButtonStyle>
            <Style TargetType="telerikPrimitives:RadImageButton">
                <Setter Property="Foreground" Value="White"/>
                <Setter Property="Background" Value="{StaticResource PageBackground}"/>
            </Style>
        </telerikPrimitives:RadTextBox.ClearButtonStyle>
        <telerikPrimitives:RadTextBox.ActionButtonStyle>
            <Style TargetType="telerikPrimitives:RadImageButton">
                <Setter Property="Foreground" Value="White"/>
                <Setter Property="Background" Value="{StaticResource PageBackground}"/>
            </Style>
        </telerikPrimitives:RadTextBox.ActionButtonStyle>
    </telerikPrimitives:RadTextBox>


    Best regards
    Spaso
  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 05 Dec 2012 Link to this post

    Hi Spaso,

    When I test your code it works as expected - the arrow is shown instead of the default enter key symbol and suggestions are displayed when you start typing. Furthermore, I changed the input scope to Number and the keyboard is changed again - this time with numbers. Could please elaborate a bit more about your scenario? What exactly is not working? You don't see suggestions and arrow or no keyboard at all? Does the demo I sent you work as expected? We will be able to assist you much faster if you are able to send us a sample project that reproduces the issue so we can see exactly what is wrong.

    Please note that in order to attach a project, you must open a new support ticket.

     

    Greetings,
    Todor
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top