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

Focus problem with material theme

2 Answers 321 Views
WatermarkTextBox
This is a migrated thread and some comments may be shown as answers.
Luiz
Top achievements
Rank 1
Luiz asked on 05 Apr 2018, 12:36 AM

Setting focus programatically or on xaml declaration doesnt fit its purpose, when using the material theme.

The textbox gets the carret, but its not blinking, keypresses doesnt change the text, and the "selected color bar" in the bottom does not fill up.

 

suggestions??

[code]

<telerik:RadPasswordBox x:Name="txt" Background="White" WatermarkContent="Digite a Senha" HorizontalContentAlignment="Center"  Margin="20 0 20 0" WatermarkBehavior="HideOnTextEntered">
                        <telerik:RadWatermarkTextBox.InputBindings>
                            <KeyBinding Command="{Binding ValidarSenhaCommand}" CommandParameter="{Binding ElementName=txt}" Key="Enter" />
                        </telerik:RadWatermarkTextBox.InputBindings>
                    </telerik:RadPasswordBox>

 

[/code]

 

[code]

 private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            txt.Focus();
            
        }

[/code]

2 Answers, 1 is accepted

Sort by
0
Luiz
Top achievements
Rank 1
answered on 05 Apr 2018, 12:39 AM

the problem occurs with any rad-textboxes.

 

btw, i'm using Mvvm and Prism.

0
Sia
Telerik team
answered on 09 Apr 2018, 10:09 AM
Hello,

Currently we are not aware of such behavior. What comes to my mind is that something in the specific setup leads to the wrong behavior, so any additional information would be appreciated.

In our Material theme, the focus visual when focused is represented by a 3px line under the input.

Do you have the FocusManager.IsFocusScope set somewhere in your application? And how do you manipulate the focus by code? Is it possible something to steal the focus from the PasswordBox?

Looking forward your reply.

Regards,
Sia
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
WatermarkTextBox
Asked by
Luiz
Top achievements
Rank 1
Answers by
Luiz
Top achievements
Rank 1
Sia
Telerik team
Share this question
or