Set the "Title" when using the "RadWindow.Alert()" method.

5 posts, 1 answers
  1. haochen
    haochen avatar
    13 posts
    Member since:
    Jun 2014

    Posted 02 Jul 2014 Link to this post

    Hi,

    I want to change the Title when I using "RadWindow.Alert()" and "RadWindow.Confirm()" method.

    Please watch this codes:
    RadWindow.Alert("aaaa");

    and please watch the attachment.

  2. Answer
    Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 02 Jul 2014 Link to this post

    Hello Haochen,

    What you need to do is to use the first overload of the RadWindow.Alert() method and pass an object of type
    DialogParameters - the object contains all of the needed properties:
    RadWindow.Alert(new DialogParameters { Header = "Test", Content = "aaaa" });

    For more details about the predefined dialogs you can check the following article from our online help documentation
    http://www.telerik.com/help/wpf/radwindow-features-predefined-dialogs.html:

    Hope this helps.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. haochen
    haochen avatar
    13 posts
    Member since:
    Jun 2014

    Posted 02 Jul 2014 in reply to Kalin Link to this post

    Thank you
  5. Hakem
    Hakem avatar
    2 posts
    Member since:
    Dec 2015

    Posted 02 Aug Link to this post

    How to set Header/Title of Radwindow, when using onClose event in confirm method? The first parameter must be the text.
  6. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 04 Aug Link to this post

    Hello Hakem,

    For this scenario you would need to pass new instance of DialogParameters with the required properties set to the RadWindow.Confirm static method as shown below:

    RadWindow.Confirm(new DialogParameters
    {
        Header = "Header Text",
        Content = "Content Text",
        Closed = ClosedEventHandler
    });

    Hope this helps.

    Regards,
    Kalin
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready