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

Radwindow.Alert and close event causes error

2 Answers 79 Views
Window
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 11 Jul 2011, 06:27 PM
I'm executing following code:
RadWindow.Alert(
        new DialogParameters()
        {
          Header = new ContentPresenter() { Content = "Cancel Changes" } //,
        },
        new EventHandler<WindowClosedEventArgs>(OnClosed));

this is how my event looks like
private static void OnClosed(object sender, WindowClosedEventArgs e)
    {
       
    }

When i execute this code, i'm not seeing an alert window with caption "cancel changes" (see attachment for what is displayed)

If i don't set the OnClosed event in the call to alert then the dialog window does show the correct caption.
 
what am i missing?








2 Answers, 1 is accepted

Sort by
0
Accepted
Ivo
Telerik team
answered on 12 Jul 2011, 04:04 PM
Hi Peter,

To achieve your goal I would suggest you try this code:

RadWindow.Alert(
    new DialogParameters()
    {
        Header = new ContentPresenter() { Content = "Cancel changes" },
        Closed = new EventHandler<WindowClosedEventArgs>(OnClosed)
    });

Hope this helps.

Kind regards,
Ivo
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
HDC
Top achievements
Rank 1
answered on 12 Jul 2011, 06:30 PM
Thanks a lot, that solved it!
Tags
Window
Asked by
HDC
Top achievements
Rank 1
Answers by
Ivo
Telerik team
HDC
Top achievements
Rank 1
Share this question
or