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

Make Window Prompt Required

1 Answer 64 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ajeet
Top achievements
Rank 1
Ajeet asked on 29 Nov 2013, 02:02 PM
Hi,

I would like to make window.prompt to required or at least if no input is entered it remains open. I don't want to open another prompt over this. 

Please let me know if anyone can help me.

Thanks

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 02 Dec 2013, 04:01 PM
Hi Ajeet,

The desired scenario can be easily implemented by modifying the default Prompt ControlTemplate in order to disable the Ok Button if the TextBox is empty using ValueConverter. And you can also remove the Cancel Button and the Close Button, so the user will be only able to press Ok if there is entered text. I have prepared a sample project which demonstrates the exact approach, note that I have used Implicit Styles to Style the Window.

Hope this helps.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Window
Asked by
Ajeet
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or