RadAutoCompleteBox text displayed in reverse order

2 posts, 0 answers
  1. sumith
    sumith avatar
    1 posts
    Member since:
    Nov 2017

    Posted 09 Nov 2017 Link to this post


    I am using RadAutoCompleteBox in one of my WPF application. I am facing an issue when typing any text on it  -  the cursor displayed on the beginning of the entered character and text displays in reverse order. For example, if I type "ABC" , control displays it as "CBA" and the cursor will be displayed on the beginning of the text. If type any letter next, it will be displayed before the previously entered text. I could not find why this is happening. Please suggest me how to fix it.

    Code used in XAML is as below:

    <telerik:RadAutoCompleteBox Name="Sec4AutoCompleteBox" 
                                                                                    IsEnabled="{Binding IsLine4Editmode,UpdateSourceTrigger=PropertyChanged}"  HorizontalContentAlignment="Left" VerticalContentAlignment="Center"
                                                                                    FontFamily="Arial" Foreground="#525252"
                                                                                    Margin="0,0,0,5" FontSize="16" FontWeight="Bold"
                                                                                    MinHeight="26" MaxHeight="30"  Width="450"
                                                                                    SearchText="{Binding Sec4MeetAtText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                                    SelectedItem="{Binding Sec4MeetAt, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                                    ItemsSource="{Binding Sec4Location}"   >
                                                                <Style TargetType="TextBox"   BasedOn="{StaticResource TextBoxStyle}">
                                                                    <Setter Property="MaxLength" Value="30"/>

  2. Martin Ivanov
    Martin Ivanov avatar
    1880 posts

    Posted 14 Nov 2017 Link to this post

    Hello Sumith,

    This happens because the FlowDirection of the application is set to RightToLeft. The flow direction determines that text and other UI elements are ordered within the parent that holds them. The value of the FlowDirection is also affected by the operational system's culture. Can you try setting the FlowDirection to LeftToRight?
    <telerik:RadAutoCompleteBox FlowDirection="LeftToRight"/>

    Martin Ivanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top