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

RadAutoCompleteBox text displayed in reverse order

1 Answer 109 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
sumith
Top achievements
Rank 1
sumith asked on 09 Nov 2017, 09:38 AM

Hi,

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"
                                                                                BorderThickness="1"
                                                                                BorderBrush="LightGray"
                                                                                SelectionMode="Single"
                                                                                telerik:StyleManager.Theme="Windows8"
                                                                                AutoCompleteMode="Suggest"
                                                                                SearchText="{Binding Sec4MeetAtText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                                SelectedItem="{Binding Sec4MeetAt, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                                ItemsSource="{Binding Sec4Location}"   >
                                                        <telerik:RadAutoCompleteBox.TextBoxStyle>
                                                            <Style TargetType="TextBox"   BasedOn="{StaticResource TextBoxStyle}">
                                                                <Setter Property="MaxLength" Value="30"/>
                                                            </Style>
                                                        </telerik:RadAutoCompleteBox.TextBoxStyle>
                                                    </telerik:RadAutoCompleteBox>

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 14 Nov 2017, 08:13 AM
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"/>

Regards,
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.
Tags
AutoCompleteBox
Asked by
sumith
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or