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

RadWindow.Prompt textbox as password

3 Answers 330 Views
Window
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 19 Feb 2018, 04:11 PM

In one of our applications, we want to restrict access to a configuration page.

Throughout the application, we are using RadWindow.Alert, Confirm and Prompt as our UI messaging system.

We don't need a crazy overdoing of security to restrict the configuration page, but it would be nice if we could change the TextBox of the RadWindow.Prompt to be a PasswordBox so the contents of the box are not visible to anyone looking at the screen.

Is there any way to do this? I would rather stay with the consistent look/behavior of using the RadWindow since we are already using it in several other places.

Thanks!!

Paul

 

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 22 Feb 2018, 03:18 PM
Hello Paul,

To achieve your requirement you can extract and modify the ControlTemplate of the RadPrompt control. You can see how to apply the style in the following article.

Additionally, I attached a sample project showing this approach with the template from the default Office_Black theme. I hope that helps.

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.
0
Paul
Top achievements
Rank 1
answered on 22 Feb 2018, 04:21 PM

That works great!

Now, one last bit of gold plating. 

Is it possible for the new password box to have focus when opened? Right now the user needs to click in the box to receive focus.

Paul

0
Martin Ivanov
Telerik team
answered on 23 Feb 2018, 09:07 AM
Hello Paul,

To achieve your requirement you can use the PasswordBoxUtilities class defined in my project. You can include a new attached property there and in its PropertyChangedCallback you can call the Focus() method of the passwordbox. I updated my project to show this approach.

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
Window
Asked by
Paul
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Paul
Top achievements
Rank 1
Share this question
or