Radwindow.Alert and close event causes error

3 posts, 1 answers
  1. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 11 Jul 2011 Link to this post

    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. Answer
    Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 12 Jul 2011 Link to this post

    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!

  3. DevCraft banner
  4. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 12 Jul 2011 Link to this post

    Thanks a lot, that solved it!
Back to Top