DialogParameters does not show up properly

2 posts, 0 answers
  1. Edward
    Edward avatar
    84 posts
    Member since:
    Feb 2011

    Posted 22 Nov 2011 Link to this post

                    RadWindow.Confirm(new DialogParameters() { OkButtonContent = "something", Content = "Some other text"  }, (s, e1) =>
    // do something

    It will just give me a confirm dialog that has "Telerik.Windows.Controls.DialogParameters" as the content.as if it fail to cast it automatically.

    Also tried to declare DialogParameters outside but same error.  It works properly if I remove the closed handler, or move the closed handler into DialogParameters though.  Is this a bug?
  2. George
    George avatar
    1332 posts

    Posted 23 Nov 2011 Link to this post

    Hello Edward,

    Thank you for contacting us.

    The code below uses the second override for the Confirm method which accepts for first parameter content, not DialogParameters. This is the reason why you get the "Telerik.Windows.Controls.DialogParameters" string as content. 

    What I would suggest is passing the handler using the DialogParamaters.Closed property. Please, refer to the code snipet below:

    RadWindow.Confirm(new DialogParameters()
        OkButtonContent = "something",
        Content = "Some other text",
        Closed = (s, e1) =>
                // do something

    Hope this helps.

    the Telerik team

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

Back to Top