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

DialogParameters does not show up properly

1 Answer 74 Views
Window
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 22 Nov 2011, 05:16 PM
                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?

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 23 Nov 2011, 10:46 AM
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.

Regards,
George
the Telerik team

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

Tags
Window
Asked by
Edward
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or