Hi,
I'm working with the Telerik RadPasswordBox
and I'm currently using the Windows 11 theme along with the NoXAML DLL in a WPF project. However, I am unable to apply a dark background color to the RadPasswordBox
when it's hovered over or clicked.
Here’s what I’m trying to achieve:
RadPasswordBox
, I want the background to change to a dark color.RadPasswordBox
is clicked, the background should remain dark until the focus is lost.I have tried setting the Background
property in the relevant triggers, but it does not seem to work as expected. Could anyone provide guidance or a solution on how to implement this with the Windows 11 theme and NoXAML DLL?
Thank you for your help!
below is my code
<telerik:RadPasswordBox
x:Name="ClientIdTextBox"
Grid.Column="1"
Width="600"
BorderThickness="0"
FontSize="20"
Foreground="#A7A3DC"
Style="{StaticResource CustomPasswordBoxStyle}"
WatermarkContent="ClientID">
<telerik:RadPasswordBox.WatermarkTemplate>
<DataTemplate>
<TextBlock
Foreground="#A7A3DC"
Opacity="0.7"
Text="{Binding}" />
</DataTemplate>
</telerik:RadPasswordBox.WatermarkTemplate>
</telerik:RadPasswordBox>
<Style x:Key="CustomPasswordBoxStyle" TargetType="telerik:RadPasswordBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="#A7A3DC" />
<Setter Property="FontSize" Value="20" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#080812" />
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="#080812" />
</Trigger>
</Style.Triggers>
</Style>
Steps to reproduce:
I have built a wpf application with 2 telerik controls: a WatermarkTextBox and a PasswordBox.
1. In a Windows session, I launch my wpf application
2. Enter text in both controls
3. Leave the application up and running and disconnect from the Windows session
4. I reconnect to (log back in) the Windows session, the PasswordBox field gets cleared.
[In a different scenario, when having multiple WatermarkTextBox, some of the WatermarkTextBox get cleared when reconnecting to the session]
Any idea what is going? I did some research and could not find anything helpful. Thanks.
Good day.
National characters in RadPasswordBox are displayed as a
question mark, if the password is inserted through the clipboard.
This behavior is not observed in either RadWatermarkTextBox or PasswordBox.
Please tell me how to solve this problem.
Below is a link to the project and files.
https://drive.google.com/open?id=1fnNaE2Gs0SLVfnf2jvBHpyL4pJLhlF9i
Regards,
Denis
I already set PasswordBox properties:
<
telerik:RadPasswordBox
Password
=
"111111"
WatermarkContent
=
"password"
ShowPasswordButtonVisibility
=
"Auto"
WatermarkBehavior
=
"HideOnTextEntered"
HorizontalAlignment
=
"Center"
Background
=
"Transparent"
Height
=
"30"
Width
=
"280"
Grid.Column
=
"1"
Grid.Row
=
"4"
Name
=
"txtPassword"
>
<
telerik:RadPasswordBox.Effect
>
<
DropShadowEffect
Color
=
"Gray"
Opacity
=
".50"
ShadowDepth
=
"4"
/>
</
telerik:RadPasswordBox.Effect
>
</
telerik:RadPasswordBox
>
I'm using UI for WPF 2018.3.1016.
In the Crystal theme, the RadPasswordBox.IsTabStop property defaults to False. This is different than in the other themes I've tried (Material, Expression_Dark), where it defaults to True.
In the Material theme, the RadPasswordBox's watermark foreground is different than the color of the RadWatermarkTextBox's. It's obvious when you have both controls visible in the same UI, such as in a login form.
Thx,
Pat
Hi Telerik,
I know binding the password should not be done due to the password being in the RAM is bad practice.
Now everything I want is to let the database tell me if there even is a password (I'm NOT loading the password/password hash) so I can set the Variable I was planning on binding to some garbage text (eg. ********) so the user is visually informed there has been a password set before.
What is a way I can archive this?
BTW: What is best practice to use/get the actual password the user entered to store it? Your examples and documentation on this topic are - as often - paper thin.
Thanks a lot
I have two buttons in my login dialog.
<
telerik:RadButton
x:Name
=
"btnCancel"
Grid.Row
=
"3"
Grid.Column
=
"0"
Grid.ColumnSpan
=
"2"
Width
=
"100"
Height
=
"30"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
Margin
=
"10,5,0,0"
IsCancel
=
"True"
Click
=
"btnCancel_Click"
>Abbrechen</
telerik:RadButton
>
<
telerik:RadButton
x:Name
=
"btnOK"
Grid.Column
=
"1"
Grid.Row
=
"3"
Width
=
"100"
Height
=
"30"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
Margin
=
"0,5,10,0"
IsDefault
=
"True"
Click
=
"btnOK_Click"
>OK</
telerik:RadButton
>
After I changed the default PasswordBox to the new RadPasswordbox, the user can no longer use the Enter-Key to finish the Login. How can I restore this function?