RadWindow.Prompt not displaying when providing WindowClosedEvent

3 posts, 1 answers
  1. Guillaume
    Guillaume avatar
    2 posts
    Member since:
    Jul 2012

    Posted 06 Dec 2011 Link to this post

    Hello,
    The following code displays a prompt as expected only when I don't provide the event handler :
    var DialogParam = new DialogParameters
                {
                    Content = new TextBlock()
                    {
                        Text = "..."
                    },
                    Header = new TextBlock()
                    {
                        Text="",
                    }
                };
                RadWindow.Prompt(DialogParam);
                RadWindow.Prompt(DialogParam, ActionOnClose);

    In the second case It displays "Telerik.Windows.Controls.DialogParameters " instead of "..." :-/
  2. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 07 Dec 2011 Link to this post

    Hello Guillaume,

    The second call uses the wrong overload - the first parameter is the content of the Prompt. That is why the content is Telerik.Windows.Controls.DialogParameters. In order to pass the Closed handler when using DialogParameters you should use the Closed property of the DialogParameters object.

    Hope this helps.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Guillaume
    Guillaume avatar
    2 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2011 Link to this post

    That's it, thanks !
Back to Top