Make Window Prompt Required

2 posts, 0 answers
  1. Ajeet
    Ajeet avatar
    3 posts
    Member since:
    Jun 2012

    Posted 29 Nov 2013 Link to this post

    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
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 02 Dec 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top